Fix asterisks in block quotes
Remove double asterisks from block quotes.
git grep -lP '^[*][*]' | xargs sed 's/^[*][*]/ \*/' -i
Fix asterisk line lengths
git grep -l '^[ /][*]\{79,\}[*/]' | \
xargs sed -i s,"^\([ /]\)[*]\([*]\{78\}\)[*]*\([*/]\)","\1\2\3",
Test: mma -j32
Change-Id: Ie3fd375ac2f804cb0f53bf1314a005e85973b3d7
diff --git a/audio_a2dp_hw/audio_a2dp_hw.cc b/audio_a2dp_hw/audio_a2dp_hw.cc
index b00a021..9c00b81 100644
--- a/audio_a2dp_hw/audio_a2dp_hw.cc
+++ b/audio_a2dp_hw/audio_a2dp_hw.cc
@@ -50,8 +50,8 @@
#include "osi/include/socket_utils/sockets.h"
/*****************************************************************************
-** Constants & Macros
-******************************************************************************/
+ * Constants & Macros
+ *****************************************************************************/
#define CTRL_CHAN_RETRY_COUNT 3
#define USEC_PER_SEC 1000000L
@@ -70,8 +70,8 @@
#define ASSERTC(cond, msg, val) if (!(cond)) {ERROR("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);}
/*****************************************************************************
-** Local type definitions
-******************************************************************************/
+ * Local type definitions
+ *****************************************************************************/
typedef enum {
AUDIO_A2DP_STATE_STARTING,
@@ -121,27 +121,27 @@
};
/*****************************************************************************
-** Static variables
-******************************************************************************/
+ * Static variables
+ *****************************************************************************/
/*****************************************************************************
-** Static functions
-******************************************************************************/
+ * Static functions
+ *****************************************************************************/
static size_t out_get_buffer_size(const struct audio_stream *stream);
/*****************************************************************************
-** Externs
-******************************************************************************/
+ * Externs
+ *****************************************************************************/
/*****************************************************************************
-** Functions
-******************************************************************************/
+ * Functions
+ *****************************************************************************/
static void a2dp_open_ctrl_path(struct a2dp_stream_common *common);
/*****************************************************************************
-** Miscellaneous helper functions
-******************************************************************************/
+ * Miscellaneous helper functions
+ *****************************************************************************/
/* logs timestamp with microsec precision
pprev is optional in case a dedicated diff is required */
@@ -181,10 +181,10 @@
}
/*****************************************************************************
-**
-** bluedroid stack adaptation
-**
-*****************************************************************************/
+ *
+ * bluedroid stack adaptation
+ *
+ ****************************************************************************/
static int skt_connect(const char *path, size_t buffer_sz)
{
@@ -304,10 +304,10 @@
/*****************************************************************************
-**
-** AUDIO CONTROL PATH
-**
-*****************************************************************************/
+ *
+ * AUDIO CONTROL PATH
+ *
+ ****************************************************************************/
static int a2dp_ctrl_receive(struct a2dp_stream_common *common, void* buffer, int length)
{
@@ -447,10 +447,10 @@
}
/*****************************************************************************
-**
-** AUDIO DATA PATH
-**
-*****************************************************************************/
+ *
+ * AUDIO DATA PATH
+ *
+ ****************************************************************************/
static void a2dp_stream_common_init(struct a2dp_stream_common *common)
{
@@ -558,10 +558,10 @@
/*****************************************************************************
-**
-** audio output callbacks
-**
-*****************************************************************************/
+ *
+ * audio output callbacks
+ *
+ ****************************************************************************/
static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
size_t bytes)
diff --git a/audio_a2dp_hw/audio_a2dp_hw.h b/audio_a2dp_hw/audio_a2dp_hw.h
index af3f219..35a0852 100644
--- a/audio_a2dp_hw/audio_a2dp_hw.h
+++ b/audio_a2dp_hw/audio_a2dp_hw.h
@@ -28,8 +28,8 @@
#define AUDIO_A2DP_HW_H
/*****************************************************************************
-** Constants & Macros
-******************************************************************************/
+ * Constants & Macros
+ *****************************************************************************/
#define A2DP_AUDIO_HARDWARE_INTERFACE "audio.a2dp"
#define A2DP_CTRL_PATH "/data/misc/bluedroid/.a2dp_ctrl"
@@ -96,20 +96,20 @@
/*****************************************************************************
-** Type definitions for callback functions
-******************************************************************************/
+ * Type definitions for callback functions
+ *****************************************************************************/
/*****************************************************************************
-** Type definitions and return values
-******************************************************************************/
+ * Type definitions and return values
+ *****************************************************************************/
/*****************************************************************************
-** Extern variables and functions
-******************************************************************************/
+ * Extern variables and functions
+ *****************************************************************************/
/*****************************************************************************
-** Functions
-******************************************************************************/
+ * Functions
+ *****************************************************************************/
#ifdef __cplusplus
extern "C" {
diff --git a/bta/dm/bta_dm_api.cc b/bta/dm/bta_dm_api.cc
index 3cf2560..2dac457 100644
--- a/bta/dm/bta_dm_api.cc
+++ b/bta/dm/bta_dm_api.cc
@@ -845,7 +845,7 @@
/*******************************************************************************
* BLE ADV data management API
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
@@ -1001,7 +1001,7 @@
/*******************************************************************************
* BLE ADV data management API
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
diff --git a/bta/dm/bta_dm_sco.cc b/bta/dm/bta_dm_sco.cc
index 094906f..aaa5c94 100644
--- a/bta/dm/bta_dm_sco.cc
+++ b/bta/dm/bta_dm_sco.cc
@@ -625,7 +625,7 @@
#endif
}
-/**************************************************************************************
+/*******************************************************************************
* Function BTA_DmPcmResample
*
* Description Down sampling utility to convert higher sampling rate into
@@ -640,7 +640,7 @@
*
* Returns int32_t: number of samples converted.
*
- *************************************************************************************/
+ ******************************************************************************/
int32_t BTA_DmPcmResample(void* p_src, uint32_t in_bytes, void* p_dst) {
uint32_t out_sample;
diff --git a/bta/gatt/bta_gattc_act.cc b/bta/gatt/bta_gattc_act.cc
index 5504da1..306fe27 100644
--- a/bta/gatt/bta_gattc_act.cc
+++ b/bta/gatt/bta_gattc_act.cc
@@ -958,7 +958,7 @@
* Description read multiple
*
* Returns None.
- ********************************************************************************/
+ ******************************************************************************/
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;
@@ -1028,7 +1028,7 @@
* Description send execute write
*
* Returns None.
- ********************************************************************************/
+ ******************************************************************************/
void bta_gattc_execute(tBTA_GATTC_CLCB* p_clcb, tBTA_GATTC_DATA* p_data) {
tBTA_GATT_STATUS status;
@@ -1695,7 +1695,7 @@
*
* Returns void
*
- *******************************************************************************/
+ ******************************************************************************/
static void bta_gattc_cong_cback(uint16_t conn_id, bool congested) {
tBTA_GATTC_CLCB* p_clcb;
tBTA_GATTC cb_data;
diff --git a/bta/hh/bta_hh_api.cc b/bta/hh/bta_hh_api.cc
index 26c9051..be30ccb 100644
--- a/bta/hh/bta_hh_api.cc
+++ b/bta/hh/bta_hh_api.cc
@@ -363,9 +363,9 @@
bta_sys_sendmsg(p_buf);
}
-/*******************************************************************************/
+/******************************************************************************/
/* Utility Function */
-/*******************************************************************************/
+/******************************************************************************/
/*******************************************************************************
*
diff --git a/bta/include/bta_api.h b/bta/include/bta_api.h
index 14a33b8..f40d990 100644
--- a/bta/include/bta_api.h
+++ b/bta/include/bta_api.h
@@ -1569,7 +1569,7 @@
extern void BTA_DmPcmInitSamples(uint32_t src_sps, uint32_t bits,
uint32_t n_channels);
-/**************************************************************************************
+/*******************************************************************************
* Function BTA_DmPcmResample
*
* Description Down sampling utility to convert higher sampling rate into
@@ -1585,7 +1585,7 @@
*
* Returns int32_t: number of samples converted.
*
- *************************************************************************************/
+ ******************************************************************************/
extern int32_t BTA_DmPcmResample(void* p_src, uint32_t in_bytes, void* p_dst);
#endif
diff --git a/bta/include/bta_gatt_api.h b/bta/include/bta_gatt_api.h
index d1af8d1..a0372dd 100644
--- a/bta/include/bta_gatt_api.h
+++ b/bta/include/bta_gatt_api.h
@@ -922,7 +922,7 @@
/*******************************************************************************
* BTA GATT Server API
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
diff --git a/bta/include/bta_jv_api.h b/bta/include/bta_jv_api.h
index ed8ffe5..8d06297 100644
--- a/bta/include/bta_jv_api.h
+++ b/bta/include/bta_jv_api.h
@@ -817,7 +817,7 @@
* calls automatically
* BTA_JV_CONN_CLOSE to remove in case of connection close!
*
- *******************************************************************************/
+ ******************************************************************************/
tBTA_JV_STATUS BTA_JvSetPmProfile(uint32_t handle, tBTA_JV_PM_ID app_id,
tBTA_JV_CONN_STATE init_st);
diff --git a/bta/jv/bta_jv_act.cc b/bta/jv/bta_jv_act.cc
index 82d97b7..a2e8f0d 100644
--- a/bta/jv/bta_jv_act.cc
+++ b/bta/jv/bta_jv_act.cc
@@ -412,7 +412,7 @@
* BTA_JV_FAILURE in case of no profile has been registered or
* already freed
*
- *******************************************************************************/
+ ******************************************************************************/
static tBTA_JV_STATUS bta_jv_free_set_pm_profile_cb(uint32_t jv_handle) {
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_PM_CB** p_cb;
@@ -495,7 +495,7 @@
*
* Returns pointer to allocated cb or NULL in case of failure
*
- *******************************************************************************/
+ ******************************************************************************/
static tBTA_JV_PM_CB* bta_jv_alloc_set_pm_profile_cb(uint32_t jv_handle,
tBTA_JV_PM_ID app_id) {
bool bRfcHandle = (jv_handle & BTA_JV_RFCOMM_MASK) != 0;
@@ -1979,7 +1979,7 @@
*
* Returns void
*
- *******************************************************************************/
+ ******************************************************************************/
void bta_jv_set_pm_profile(tBTA_JV_MSG* p_data) {
tBTA_JV_STATUS status;
tBTA_JV_PM_CB* p_cb;
@@ -2016,7 +2016,7 @@
*
* Returns void
*
- *******************************************************************************/
+ ******************************************************************************/
void bta_jv_change_pm_state(tBTA_JV_MSG* p_data) {
tBTA_JV_API_PM_STATE_CHANGE* p_msg = (tBTA_JV_API_PM_STATE_CHANGE*)p_data;
@@ -2037,7 +2037,7 @@
*
* Returns BTA_JV_SUCCESS, BTA_JV_FAILURE (buffer allocation, or NULL ptr!)
*
- *******************************************************************************/
+ ******************************************************************************/
tBTA_JV_STATUS bta_jv_set_pm_conn_state(tBTA_JV_PM_CB* p_cb,
const tBTA_JV_CONN_STATE new_st) {
if (p_cb == NULL) return BTA_JV_FAILURE;
@@ -2065,7 +2065,7 @@
*
* Returns void
*
- *******************************************************************************/
+ ******************************************************************************/
static void bta_jv_pm_conn_busy(tBTA_JV_PM_CB* p_cb) {
if ((NULL != p_cb) && (BTA_JV_PM_IDLE_ST == p_cb->state))
bta_jv_pm_state_change(p_cb, BTA_JV_CONN_BUSY);
@@ -2081,7 +2081,7 @@
*
* Returns void
*
- *******************************************************************************/
+ ******************************************************************************/
static void bta_jv_pm_conn_idle(tBTA_JV_PM_CB* p_cb) {
if ((NULL != p_cb) && (BTA_JV_PM_IDLE_ST != p_cb->state))
bta_jv_pm_state_change(p_cb, BTA_JV_CONN_IDLE);
@@ -2097,7 +2097,7 @@
*
* Returns void
*
- *******************************************************************************/
+ ******************************************************************************/
static void bta_jv_pm_state_change(tBTA_JV_PM_CB* p_cb,
const tBTA_JV_CONN_STATE state) {
APPL_TRACE_API(
@@ -2146,7 +2146,7 @@
break;
}
}
-/**********************************************************************************************/
+/******************************************************************************/
static struct fc_channel* fcchan_get(uint16_t chan, char create) {
struct fc_channel* t = fc_channels;
diff --git a/bta/jv/bta_jv_api.cc b/bta/jv/bta_jv_api.cc
index 31aa2e4..7c80a99 100644
--- a/bta/jv/bta_jv_api.cc
+++ b/bta/jv/bta_jv_api.cc
@@ -969,7 +969,7 @@
* calls automatically
* BTA_JV_CONN_CLOSE to remove in case of connection close!
*
- *******************************************************************************/
+ ******************************************************************************/
tBTA_JV_STATUS BTA_JvSetPmProfile(uint32_t handle, tBTA_JV_PM_ID app_id,
tBTA_JV_CONN_STATE init_st) {
tBTA_JV_API_SET_PM_PROFILE* p_msg = (tBTA_JV_API_SET_PM_PROFILE*)osi_malloc(
diff --git a/bta/pan/bta_pan_act.cc b/bta/pan/bta_pan_act.cc
index 5512c89..131edf1 100644
--- a/bta/pan/bta_pan_act.cc
+++ b/bta/pan/bta_pan_act.cc
@@ -52,7 +52,7 @@
*
* Returns void
*
- *******************************************************************************/
+ ******************************************************************************/
static void bta_pan_pm_conn_busy(tBTA_PAN_SCB* p_scb) {
if ((p_scb != NULL) && (p_scb->state != BTA_PAN_IDLE_ST))
bta_sys_busy(BTA_ID_PAN, p_scb->app_id, p_scb->bd_addr);
@@ -68,7 +68,7 @@
*
* Returns void
*
- *******************************************************************************/
+ ******************************************************************************/
static void bta_pan_pm_conn_idle(tBTA_PAN_SCB* p_scb) {
if ((p_scb != NULL) && (p_scb->state != BTA_PAN_IDLE_ST))
bta_sys_idle(BTA_ID_PAN, p_scb->app_id, p_scb->bd_addr);
diff --git a/btif/co/bta_ag_co.cc b/btif/co/bta_ag_co.cc
index 32709fd..075c492 100644
--- a/btif/co/bta_ag_co.cc
+++ b/btif/co/bta_ag_co.cc
@@ -144,7 +144,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_ag_co_tx_write(uint16_t handle, UNUSED_ATTR uint8_t* p_data,
uint16_t len) {
BTIF_TRACE_DEBUG("bta_ag_co_tx_write: handle: %d, len: %d", handle, len);
diff --git a/btif/co/bta_av_co.cc b/btif/co/bta_av_co.cc
index e51df17..068c664 100644
--- a/btif/co/bta_av_co.cc
+++ b/btif/co/bta_av_co.cc
@@ -127,7 +127,7 @@
**
** Returns The current flag value
**
- *******************************************************************************/
+ ******************************************************************************/
static uint8_t bta_av_co_cp_get_flag(void) { return bta_av_co_cb.cp.flag; }
/*******************************************************************************
@@ -141,7 +141,7 @@
**
** Returns true if setting the SCMS flag is supported else false
**
- *******************************************************************************/
+ ******************************************************************************/
static bool bta_av_co_cp_set_flag(uint8_t cp_flag) {
APPL_TRACE_DEBUG("%s: cp_flag = %d", __func__, cp_flag);
@@ -163,7 +163,7 @@
**
** Returns the control block
**
- *******************************************************************************/
+ ******************************************************************************/
static tBTA_AV_CO_PEER* bta_av_co_get_peer(tBTA_AV_HNDL hndl) {
uint8_t index;
@@ -192,7 +192,7 @@
**
** Returns Stream codec and content protection capabilities info.
**
- *******************************************************************************/
+ ******************************************************************************/
bool bta_av_co_audio_init(tA2DP_CODEC_SEP_INDEX codec_sep_index,
tAVDT_CFG* p_cfg) {
/* reset remote preference through setconfig */
@@ -213,7 +213,7 @@
**
** Returns void.
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_audio_disc_res(tBTA_AV_HNDL hndl, uint8_t num_seps,
uint8_t num_sink, uint8_t num_src, BD_ADDR addr,
uint16_t uuid_local) {
@@ -259,7 +259,7 @@
**
** Returns Pass or Fail for current getconfig.
**
- *******************************************************************************/
+ ******************************************************************************/
static tA2DP_STATUS bta_av_audio_sink_getconfig(
tBTA_AV_HNDL hndl, uint8_t* p_codec_info, uint8_t* p_sep_info_idx,
uint8_t seid, uint8_t* p_num_protect, uint8_t* p_protect_info) {
@@ -365,7 +365,7 @@
**
** Returns Stream codec and content protection configuration info.
**
- *******************************************************************************/
+ ******************************************************************************/
tA2DP_STATUS bta_av_co_audio_getconfig(tBTA_AV_HNDL hndl, uint8_t* p_codec_info,
uint8_t* p_sep_info_idx, uint8_t seid,
uint8_t* p_num_protect,
@@ -527,7 +527,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_audio_setconfig(tBTA_AV_HNDL hndl, const uint8_t* p_codec_info,
UNUSED_ATTR uint8_t seid,
UNUSED_ATTR BD_ADDR addr, uint8_t num_protect,
@@ -647,7 +647,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_audio_open(tBTA_AV_HNDL hndl, uint8_t* p_codec_info,
uint16_t mtu) {
tBTA_AV_CO_PEER* p_peer;
@@ -675,7 +675,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_audio_close(tBTA_AV_HNDL hndl, UNUSED_ATTR uint16_t mtu)
{
@@ -707,7 +707,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_audio_start(UNUSED_ATTR tBTA_AV_HNDL hndl,
UNUSED_ATTR uint8_t* p_codec_info,
UNUSED_ATTR bool* p_no_rtp_hdr) {
@@ -724,7 +724,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_audio_stop(UNUSED_ATTR tBTA_AV_HNDL hndl) {
APPL_TRACE_DEBUG("%s", __func__);
}
@@ -739,7 +739,7 @@
** Returns Pointer to the GKI buffer to send, NULL if no buffer to
** send
**
- *******************************************************************************/
+ ******************************************************************************/
void* bta_av_co_audio_src_data_path(const uint8_t* p_codec_info,
uint32_t* p_timestamp) {
BT_HDR* p_buf;
@@ -788,7 +788,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_audio_drop(tBTA_AV_HNDL hndl) {
APPL_TRACE_ERROR("%s: dropped audio packet on handle 0x%x", __func__, hndl);
}
@@ -804,7 +804,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_audio_delay(tBTA_AV_HNDL hndl, uint16_t delay) {
APPL_TRACE_ERROR("%s: handle: x%x, delay:0x%x", __func__, hndl, delay);
}
@@ -817,7 +817,7 @@
**
** Returns true if this CP is SCMS-T, false otherwise
**
- *******************************************************************************/
+ ******************************************************************************/
static bool bta_av_co_cp_is_scmst(const uint8_t* p_protectinfo) {
APPL_TRACE_DEBUG("%s", __func__);
@@ -843,7 +843,7 @@
**
** Returns true if the sink supports this CP, false otherwise
**
- *******************************************************************************/
+ ******************************************************************************/
static bool bta_av_co_audio_sink_has_scmst(const tBTA_AV_CO_SINK* p_sink) {
uint8_t index;
const uint8_t* p;
@@ -873,7 +873,7 @@
**
** Returns true if the sink supports this CP, false otherwise
**
- *******************************************************************************/
+ ******************************************************************************/
static bool bta_av_co_audio_sink_supports_cp(const tBTA_AV_CO_SINK* p_sink) {
APPL_TRACE_DEBUG("%s", __func__);
@@ -893,7 +893,7 @@
**
** Returns The peer sink that supports the codec, otherwise NULL.
**
- *******************************************************************************/
+ ******************************************************************************/
static const tBTA_AV_CO_SINK* bta_av_co_find_peer_sink_supports_codec(
const uint8_t* codec_config, const tBTA_AV_CO_PEER* p_peer) {
APPL_TRACE_DEBUG("%s: peer num_sup_sinks = %d", __func__,
@@ -919,7 +919,7 @@
**
** Returns The peer source that supports the codec, otherwise NULL.
**
- *******************************************************************************/
+ ******************************************************************************/
static const tBTA_AV_CO_SINK* bta_av_co_find_peer_src_supports_codec(
const tBTA_AV_CO_PEER* p_peer) {
APPL_TRACE_DEBUG("%s: peer num_sup_srcs = %d", __func__,
@@ -945,7 +945,7 @@
**
** Returns true if successful, false otherwise
**
- *******************************************************************************/
+ ******************************************************************************/
bool bta_av_co_audio_set_codec(const tA2DP_FEEDING_PARAMS* p_feeding_params) {
uint8_t new_config[AVDT_CODEC_SIZE];
@@ -1049,7 +1049,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
static void bta_av_co_audio_codec_reset(void) {
APPL_TRACE_DEBUG("%s", __func__);
@@ -1186,7 +1186,7 @@
**
** Returns Nothing
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_init(void) {
APPL_TRACE_DEBUG("%s", __func__);
diff --git a/btif/include/btif_api.h b/btif/include/btif_api.h
index 685a354..e066b83 100644
--- a/btif/include/btif_api.h
+++ b/btif/include/btif_api.h
@@ -25,7 +25,7 @@
* require headerfiles as they would be accessed through
* callout/callins.
*
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_API_H
#define BTIF_API_H
@@ -37,7 +37,7 @@
/*******************************************************************************
* BTIF CORE API
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
@@ -189,7 +189,7 @@
/*******************************************************************************
* BTIF DM API
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
diff --git a/btif/include/btif_av.h b/btif/include/btif_av.h
index 02f8521..7c54c94 100644
--- a/btif/include/btif_av.h
+++ b/btif/include/btif_av.h
@@ -23,7 +23,7 @@
* Description: Main API header file for all BTIF AV functions accessed
* from internal stack.
*
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_AV_H
#define BTIF_AV_H
@@ -34,7 +34,7 @@
/*******************************************************************************
* Type definitions for callback functions
- *******************************************************************************/
+ ******************************************************************************/
typedef enum {
/* Reuse BTA_AV_XXX_EVT - No need to redefine them here */
@@ -50,7 +50,7 @@
/*******************************************************************************
* BTIF AV API
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
@@ -171,7 +171,7 @@
* Description Clears remote suspended flag
*
* Returns Void
- *******************************************************************************/
+ ******************************************************************************/
void btif_av_clear_remote_suspend_flag(void);
/*******************************************************************************
diff --git a/btif/include/btif_av_co.h b/btif/include/btif_av_co.h
index f6e3a2d..40efbeb 100644
--- a/btif/include/btif_av_co.h
+++ b/btif/include/btif_av_co.h
@@ -24,7 +24,7 @@
/*******************************************************************************
* Constants & Macros
- *******************************************************************************/
+ ******************************************************************************/
#ifdef __cplusplus
extern "C" {
@@ -32,7 +32,7 @@
/*******************************************************************************
* Functions
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
**
@@ -45,7 +45,7 @@
**
** Returns true if successful, false otherwise
**
- *******************************************************************************/
+ ******************************************************************************/
bool bta_av_co_audio_set_codec(const tA2DP_FEEDING_PARAMS* p_feeding_params);
// Prepares a message to initialize the encoder. The prepared message is
@@ -73,7 +73,7 @@
**
** Returns Nothing
**
- *******************************************************************************/
+ ******************************************************************************/
void bta_av_co_init(void);
#ifdef __cplusplus
diff --git a/btif/include/btif_common.h b/btif/include/btif_common.h
index d7b9047..cca9ae9 100644
--- a/btif/include/btif_common.h
+++ b/btif/include/btif_common.h
@@ -31,7 +31,7 @@
/*******************************************************************************
* Constants & Macros
- *******************************************************************************/
+ ******************************************************************************/
#define ASSERTC(cond, msg, val) \
do { \
@@ -178,14 +178,14 @@
/*******************************************************************************
* Type definitions for callback functions
- *******************************************************************************/
+ ******************************************************************************/
typedef void(tBTIF_CBACK)(uint16_t event, char* p_param);
typedef void(tBTIF_COPY_CBACK)(uint16_t 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 {
@@ -199,7 +199,7 @@
/*******************************************************************************
* Functions
- *******************************************************************************/
+ ******************************************************************************/
tBTA_SERVICE_MASK btif_get_enabled_services_mask(void);
bt_status_t btif_enable_service(tBTA_SERVICE_ID service_id);
diff --git a/btif/include/btif_dm.h b/btif/include/btif_dm.h
index 555d58f..f06272a 100644
--- a/btif/include/btif_dm.h
+++ b/btif/include/btif_dm.h
@@ -23,9 +23,9 @@
#include "bte_appl.h"
#include "btif_uid.h"
-/************************************************************************************
+/*******************************************************************************
* Functions
- *******************************************************************************/
+ ******************************************************************************/
void btif_dm_init(uid_set_t* set);
void btif_dm_cleanup(void);
diff --git a/btif/include/btif_hh.h b/btif/include/btif_hh.h
index 39d1a11..3b35304 100644
--- a/btif/include/btif_hh.h
+++ b/btif/include/btif_hh.h
@@ -28,7 +28,7 @@
/*******************************************************************************
* Constants & Macros
- *******************************************************************************/
+ ******************************************************************************/
#define BTIF_HH_MAX_HID 8
#define BTIF_HH_MAX_ADDED_DEV 32
@@ -43,7 +43,7 @@
/*******************************************************************************
* Type definitions and return values
- *******************************************************************************/
+ ******************************************************************************/
typedef enum {
BTIF_HH_DISABLED = 0,
@@ -91,7 +91,7 @@
/*******************************************************************************
* Functions
- *******************************************************************************/
+ ******************************************************************************/
extern btif_hh_cb_t btif_hh_cb;
diff --git a/btif/include/btif_hl.h b/btif/include/btif_hl.h
index 94cd108..9dc4df9 100644
--- a/btif/include/btif_hl.h
+++ b/btif/include/btif_hl.h
@@ -27,7 +27,7 @@
/*******************************************************************************
* Constants & Macros
- *******************************************************************************/
+ ******************************************************************************/
#define BTIF_HL_DATA_TYPE_NONE 0x0000
#define BTIF_HL_DATA_TYPE_PULSE_OXIMETER 0x1004 /* from BT assigned number */
@@ -47,7 +47,7 @@
/*******************************************************************************
* Type definitions and return values
- *******************************************************************************/
+ ******************************************************************************/
typedef enum {
BTIF_HL_SOC_STATE_IDLE,
@@ -273,7 +273,7 @@
/*******************************************************************************
* Functions
- *******************************************************************************/
+ ******************************************************************************/
#define BTIF_HL_GET_CB_PTR() &(btif_hl_cb)
#define BTIF_HL_GET_APP_CB_PTR(app_idx) &(btif_hl_cb.acb[(app_idx)])
diff --git a/btif/include/btif_mce.h b/btif/include/btif_mce.h
index beca0a2..dabcb39 100644
--- a/btif/include/btif_mce.h
+++ b/btif/include/btif_mce.h
@@ -23,7 +23,7 @@
*
* Description: Bluetooth MCE Interface
*
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_MCE_H
#define BTIF_MCE_H
diff --git a/btif/include/btif_pan.h b/btif/include/btif_pan.h
index ecb480a..96874d6 100644
--- a/btif/include/btif_pan.h
+++ b/btif/include/btif_pan.h
@@ -22,7 +22,7 @@
*
* Description: Bluetooth pan Interface
*
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_PAN_H
#define BTIF_PAN_H
diff --git a/btif/include/btif_pan_internal.h b/btif/include/btif_pan_internal.h
index 462f787..0f47802 100644
--- a/btif/include/btif_pan_internal.h
+++ b/btif/include/btif_pan_internal.h
@@ -22,7 +22,7 @@
*
* Description: Bluetooth pan internal
*
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_PAN_INTERNAL_H
#define BTIF_PAN_INTERNAL_H
@@ -32,7 +32,7 @@
/*******************************************************************************
* Constants & Macros
- *******************************************************************************/
+ ******************************************************************************/
#define PAN_NAP_SERVICE_NAME "Android Network Access Point"
#define PANU_SERVICE_NAME "Android Network User"
@@ -54,7 +54,7 @@
/*******************************************************************************
* Type definitions and return values
- *******************************************************************************/
+ ******************************************************************************/
typedef struct eth_hdr {
unsigned char h_dest[ETH_ADDR_LEN];
@@ -86,7 +86,7 @@
/*******************************************************************************
* Functions
- *******************************************************************************/
+ ******************************************************************************/
extern btpan_cb_t btpan_cb;
btpan_conn_t* btpan_new_conn(int handle, const BD_ADDR addr, int local_role,
diff --git a/btif/include/btif_profile_queue.h b/btif/include/btif_profile_queue.h
index f6e01a0..01aa8f0 100644
--- a/btif/include/btif_profile_queue.h
+++ b/btif/include/btif_profile_queue.h
@@ -22,7 +22,7 @@
*
* Description: Bluetooth remote device connection queuing
*
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_PROFILE_QUEUE_H
#define BTIF_PROFILE_QUEUE_H
diff --git a/btif/include/btif_sdp.h b/btif/include/btif_sdp.h
index 2fe8b63..7e224b0 100644
--- a/btif/include/btif_sdp.h
+++ b/btif/include/btif_sdp.h
@@ -22,7 +22,7 @@
*
* Description: Bluetooth SDP search Interface
*
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_SDP_H
#define BTIF_SDP_H
diff --git a/btif/include/btif_sock_l2cap.h b/btif/include/btif_sock_l2cap.h
index 480ee6d..37fa90e 100644
--- a/btif/include/btif_sock_l2cap.h
+++ b/btif/include/btif_sock_l2cap.h
@@ -1,6 +1,6 @@
/*******************************************************************************
* L2CAP Socket Interface
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_SOCK_L2CAP_H
#define BTIF_SOCK_L2CAP_H
diff --git a/btif/include/btif_sock_rfc.h b/btif/include/btif_sock_rfc.h
index 93129e2..50aecd7 100644
--- a/btif/include/btif_sock_rfc.h
+++ b/btif/include/btif_sock_rfc.h
@@ -22,7 +22,7 @@
*
* Description: Bluetooth socket Interface
*
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_SOCK_RFC_H
#define BTIF_SOCK_RFC_H
diff --git a/btif/include/btif_sock_thread.h b/btif/include/btif_sock_thread.h
index 207d5fc..d50a09d 100644
--- a/btif/include/btif_sock_thread.h
+++ b/btif/include/btif_sock_thread.h
@@ -26,7 +26,7 @@
/*******************************************************************************
* Constants & Macros
- *******************************************************************************/
+ ******************************************************************************/
#define SOCK_THREAD_FD_RD 1 /* BT socket read signal */
#define SOCK_THREAD_FD_WR (1 << 1) /* BT socket write signal */
@@ -37,7 +37,7 @@
/*******************************************************************************
* Functions
- *******************************************************************************/
+ ******************************************************************************/
typedef void (*btsock_signaled_cb)(int fd, int type, int flags,
uint32_t user_id);
diff --git a/btif/include/btif_sock_util.h b/btif/include/btif_sock_util.h
index eb915f9..90cfb9a 100644
--- a/btif/include/btif_sock_util.h
+++ b/btif/include/btif_sock_util.h
@@ -22,7 +22,7 @@
*
* Description: Bluetooth socket Interface Helper functions
*
- *******************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_SOCK_UTIL_H
#define BTIF_SOCK_UTIL_H
diff --git a/btif/include/btif_storage.h b/btif/include/btif_storage.h
index 2bdc96f..a2b0959 100644
--- a/btif/include/btif_storage.h
+++ b/btif/include/btif_storage.h
@@ -26,7 +26,7 @@
/*******************************************************************************
* Constants & Macros
- *******************************************************************************/
+ ******************************************************************************/
#define BTIF_STORAGE_FILL_PROPERTY(p_prop, t, l, p_v) \
do { \
(p_prop)->type = (t); \
@@ -36,7 +36,7 @@
/*******************************************************************************
* Functions
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
diff --git a/btif/include/btif_util.h b/btif/include/btif_util.h
index 58ff18f..5dba43c 100644
--- a/btif/include/btif_util.h
+++ b/btif/include/btif_util.h
@@ -30,7 +30,7 @@
/*******************************************************************************
* Constants & Macros
- *******************************************************************************/
+ ******************************************************************************/
#define CASE_RETURN_STR(const) \
case const: \
@@ -38,11 +38,11 @@
/*******************************************************************************
* Type definitions for callback functions
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
* Functions
- *******************************************************************************/
+ ******************************************************************************/
const char* dump_bt_status(bt_status_t status);
const char* dump_dm_search_event(uint16_t event);
diff --git a/btif/src/bluetooth.cc b/btif/src/bluetooth.cc
index 2551433..31595c3 100644
--- a/btif/src/bluetooth.cc
+++ b/btif/src/bluetooth.cc
@@ -16,13 +16,13 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: bluetooth.c
*
* Description: Bluetooth HAL implementation
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif"
@@ -64,16 +64,16 @@
#include "osi/include/wakelock.h"
#include "stack_manager.h"
-/************************************************************************************
+/*******************************************************************************
* Static variables
- ***********************************************************************************/
+ ******************************************************************************/
bt_callbacks_t* bt_hal_cbacks = NULL;
bool restricted_mode = false;
-/************************************************************************************
+/*******************************************************************************
* Externs
- ***********************************************************************************/
+ ******************************************************************************/
/* list all extended interfaces here */
@@ -103,9 +103,9 @@
/*SDP search client*/
extern btsdp_interface_t* btif_sdp_get_interface();
-/************************************************************************************
+/*******************************************************************************
* Functions
- ***********************************************************************************/
+ ******************************************************************************/
static bool interface_ready(void) { return bt_hal_cbacks != NULL; }
diff --git a/btif/src/btif_av.cc b/btif/src/btif_av.cc
index c8e4dd9..11db9c1 100644
--- a/btif/src/btif_av.cc
+++ b/btif/src/btif_av.cc
@@ -1631,17 +1631,17 @@
}
/*******************************************************************************
-**
-** Function btif_av_move_idle
-**
-** Description Opening state is intermediate state. It cannot handle
-** incoming/outgoing connect/disconnect requests.When ACL
-** is disconnected and we are in opening state then move back
-** to idle state which is proper to handle connections.
-**
-** Returns Void
-**
-*******************************************************************************/
+ *
+ * Function btif_av_move_idle
+ *
+ * Description Opening state is intermediate state. It cannot handle
+ * incoming/outgoing connect/disconnect requests.When ACL
+ * is disconnected and we are in opening state then move back
+ * to idle state which is proper to handle connections.
+ *
+ * Returns Void
+ *
+ ******************************************************************************/
void btif_av_move_idle(bt_bdaddr_t bd_addr) {
/* inform the application that ACL is disconnected and move to idle state */
btif_sm_state_t state = btif_sm_get_state(btif_av_cb.sm_handle);
diff --git a/btif/src/btif_core.cc b/btif/src/btif_core.cc
index aeb6448..8a48092 100644
--- a/btif/src/btif_core.cc
+++ b/btif/src/btif_core.cc
@@ -17,14 +17,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_core.c
*
* Description: Contains core functionality related to interfacing between
* Bluetooth HAL and BTE core stack.
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_core"
@@ -66,9 +66,9 @@
#include "osi/include/thread.h"
#include "stack_manager.h"
-/************************************************************************************
+/*******************************************************************************
* Constants & Macros
- ***********************************************************************************/
+ ******************************************************************************/
#ifndef BTE_DID_CONF_FILE
// TODO(armansito): Find a better way than searching by a hardcoded path.
@@ -79,9 +79,9 @@
#endif // defined(OS_GENERIC)
#endif // BTE_DID_CONF_FILE
-/************************************************************************************
+/*******************************************************************************
* Local type definitions
- ***********************************************************************************/
+ ******************************************************************************/
/* These type definitions are used when passing data from the HAL to BTIF
* context
@@ -109,9 +109,9 @@
BTIF_CORE_STATE_DISABLING
} btif_core_state_t;
-/************************************************************************************
+/*******************************************************************************
* Static variables
- ***********************************************************************************/
+ ******************************************************************************/
bt_bdaddr_t btif_local_bd_addr;
@@ -131,9 +131,9 @@
base::MessageLoop* message_loop_ = NULL;
base::RunLoop* jni_run_loop = NULL;
-/************************************************************************************
+/*******************************************************************************
* Static functions
- ***********************************************************************************/
+ ******************************************************************************/
static void btif_jni_associate();
static void btif_jni_disassociate();
static bool btif_fetch_property(const char* key, bt_bdaddr_t* addr);
@@ -141,9 +141,9 @@
/* sends message to btif task */
static void btif_sendmsg(void* p_msg);
-/************************************************************************************
+/*******************************************************************************
* Externs
- ***********************************************************************************/
+ ******************************************************************************/
extern fixed_queue_t* btu_hci_msg_queue;
void btif_dm_execute_service_request(uint16_t event, char* p_param);
diff --git a/btif/src/btif_dm.cc b/btif/src/btif_dm.cc
index 95826c0..c2c4740 100644
--- a/btif/src/btif_dm.cc
+++ b/btif/src/btif_dm.cc
@@ -16,14 +16,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_dm.c
*
* Description: Contains Device Management (DM) related functionality
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_dm"
@@ -186,9 +186,9 @@
/* This flag will be true if HCI_Inquiry is in progress */
static bool btif_dm_inquiry_in_progress = false;
-/************************************************************************************
+/*******************************************************************************
* Static variables
- ***********************************************************************************/
+ ******************************************************************************/
static char btif_default_local_name[DEFAULT_LOCAL_NAME_MAX + 1] = {'\0'};
static uid_set_t* uid_set = NULL;
diff --git a/btif/src/btif_gatt.cc b/btif/src/btif_gatt.cc
index e0aa685..1e05aa2 100644
--- a/btif/src/btif_gatt.cc
+++ b/btif/src/btif_gatt.cc
@@ -22,7 +22,7 @@
*
* Description: GATT Profile Bluetooth Interface
*
- *******************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_gatt"
diff --git a/btif/src/btif_gatt_client.cc b/btif/src/btif_gatt_client.cc
index 79c170c..d21e85f 100644
--- a/btif/src/btif_gatt_client.cc
+++ b/btif/src/btif_gatt_client.cc
@@ -22,7 +22,7 @@
*
* Description: GATT client implementation
*
- *******************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_gattc"
@@ -62,7 +62,7 @@
/*******************************************************************************
* Constants & Macros
- *******************************************************************************/
+ ******************************************************************************/
#define CLI_CBACK_IN_JNI(P_CBACK, ...) \
do { \
@@ -212,7 +212,7 @@
/*******************************************************************************
* Client API Functions
- *******************************************************************************/
+ ******************************************************************************/
void btif_gattc_register_app_impl(tBT_UUID uuid) {
BTA_GATTC_AppRegister(&uuid, bta_gattc_cback);
diff --git a/btif/src/btif_gatt_server.cc b/btif/src/btif_gatt_server.cc
index 44b79cb..7f146da 100644
--- a/btif/src/btif_gatt_server.cc
+++ b/btif/src/btif_gatt_server.cc
@@ -16,13 +16,13 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_gatt_server.c
*
* Description: GATT server implementation
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_gatt"
@@ -54,9 +54,9 @@
extern bt_status_t do_in_jni_thread(const base::Closure& task);
-/************************************************************************************
+/*******************************************************************************
* Constants & Macros
- ***********************************************************************************/
+ ******************************************************************************/
#define CHECK_BTGATT_INIT() \
do { \
@@ -68,15 +68,15 @@
} \
} while (0)
-/************************************************************************************
+/*******************************************************************************
* Static variables
- ***********************************************************************************/
+ ******************************************************************************/
extern const btgatt_callbacks_t* bt_gatt_callbacks;
-/************************************************************************************
+/*******************************************************************************
* Static functions
- ***********************************************************************************/
+ ******************************************************************************/
static void btapp_gatts_copy_req_data(uint16_t event, char* p_dest,
char* p_src) {
@@ -265,9 +265,9 @@
ASSERTC(status == BT_STATUS_SUCCESS, "Context transfer failed!", status);
}
-/************************************************************************************
+/*******************************************************************************
* Server API Functions
- ***********************************************************************************/
+ ******************************************************************************/
static bt_status_t btif_gatts_register_app(bt_uuid_t* bt_uuid) {
CHECK_BTGATT_INIT();
tBT_UUID* uuid = new tBT_UUID;
diff --git a/btif/src/btif_gatt_test.cc b/btif/src/btif_gatt_test.cc
index e64aa7d..4e87803 100644
--- a/btif/src/btif_gatt_test.cc
+++ b/btif/src/btif_gatt_test.cc
@@ -41,7 +41,7 @@
/*******************************************************************************
* Typedefs & Macros
- *******************************************************************************/
+ ******************************************************************************/
typedef struct {
tGATT_IF gatt_if;
@@ -50,7 +50,7 @@
/*******************************************************************************
* Static variables
- *******************************************************************************/
+ ******************************************************************************/
static const char* disc_name[GATT_DISC_MAX] = {"Unknown",
"GATT_DISC_SRVC_ALL",
@@ -63,7 +63,7 @@
/*******************************************************************************
* Callback functions
- *******************************************************************************/
+ ******************************************************************************/
static char* format_uuid(tBT_UUID bt_uuid, char* str_buf, size_t buf_size) {
if (bt_uuid.len == LEN_UUID_16) {
@@ -196,7 +196,7 @@
/*******************************************************************************
* Implementation
- *******************************************************************************/
+ ******************************************************************************/
bt_status_t btif_gattc_test_command_impl(int command,
btgatt_test_params_t* params) {
diff --git a/btif/src/btif_gatt_util.cc b/btif/src/btif_gatt_util.cc
index 2b5c8fb..64b3187 100644
--- a/btif/src/btif_gatt_util.cc
+++ b/btif/src/btif_gatt_util.cc
@@ -69,7 +69,7 @@
/*******************************************************************************
* BTIF -> BTA conversion functions
- *******************************************************************************/
+ ******************************************************************************/
void btif_to_bta_uuid(tBT_UUID* p_dest, const bt_uuid_t* p_src) {
char* p_byte = (char*)p_src;
@@ -134,7 +134,7 @@
/*******************************************************************************
* BTA -> BTIF conversion functions
- *******************************************************************************/
+ ******************************************************************************/
void bta_to_btif_uuid(bt_uuid_t* p_dest, tBT_UUID* p_src) {
int i = 0;
@@ -171,7 +171,7 @@
/*******************************************************************************
* Utility functions
- *******************************************************************************/
+ ******************************************************************************/
uint16_t get_uuid16(tBT_UUID* p_uuid) {
if (p_uuid->len == LEN_UUID_16) {
@@ -209,7 +209,7 @@
/*******************************************************************************
* Encrypted link map handling
- *******************************************************************************/
+ ******************************************************************************/
#if (BLE_DELAY_REQUEST_ENC == FALSE)
static bool btif_gatt_is_link_encrypted(BD_ADDR bd_addr) {
diff --git a/btif/src/btif_hf.cc b/btif/src/btif_hf.cc
index d71e9a5..ae6a62c 100644
--- a/btif/src/btif_hf.cc
+++ b/btif/src/btif_hf.cc
@@ -16,14 +16,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_hf.c
*
* Description: Handsfree Profile Bluetooth Interface
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_hf"
@@ -42,9 +42,9 @@
#include "btif_profile_queue.h"
#include "btif_util.h"
-/************************************************************************************
+/*******************************************************************************
* Constants & Macros
- ***********************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_HSAG_SERVICE_NAME
#define BTIF_HSAG_SERVICE_NAME ("Headset Gateway")
#endif
@@ -109,13 +109,13 @@
#endif
};
-/************************************************************************************
+/*******************************************************************************
* Local type definitions
- ***********************************************************************************/
+ ******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
* Static variables
- ***********************************************************************************/
+ ******************************************************************************/
static bthf_callbacks_t* bt_hf_callbacks = NULL;
static int hf_idx = BTIF_HF_INVALID_IDX;
@@ -159,13 +159,13 @@
static btif_hf_cb_t btif_hf_cb[BTIF_HF_NUM_CB];
-/************************************************************************************
+/*******************************************************************************
* Static functions
- ***********************************************************************************/
+ ******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
* Externs
- ***********************************************************************************/
+ ******************************************************************************/
/* By default, even though codec negotiation is enabled, we will not use WBS as
* the default
* codec unless this variable is set to true.
@@ -176,9 +176,9 @@
bool btif_conf_hf_force_wbs = BTIF_HF_WBS_PREFERRED;
-/************************************************************************************
+/*******************************************************************************
* Functions
- ***********************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
diff --git a/btif/src/btif_hf_client.cc b/btif/src/btif_hf_client.cc
index 0e956ed..aa40090 100644
--- a/btif/src/btif_hf_client.cc
+++ b/btif/src/btif_hf_client.cc
@@ -17,14 +17,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_hf_client.c
*
* Description: Handsfree Profile (HF role) Bluetooth Interface
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_hfc"
@@ -43,9 +43,9 @@
#include "osi/include/osi.h"
#include "osi/include/properties.h"
-/************************************************************************************
+/*******************************************************************************
* Constants & Macros
- ***********************************************************************************/
+ ******************************************************************************/
#ifndef BTIF_HF_CLIENT_SERVICE_NAME
#define BTIF_HF_CLIENT_SERVICE_NAME ("Handsfree")
@@ -62,13 +62,13 @@
BTA_HF_CLIENT_FEAT_ECS | BTA_HF_CLIENT_FEAT_ECC | BTA_HF_CLIENT_FEAT_CODEC)
#endif
-/************************************************************************************
+/*******************************************************************************
* Local type definitions
- ***********************************************************************************/
+ ******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
* Static variables
- ***********************************************************************************/
+ ******************************************************************************/
static bthf_client_callbacks_t* bt_hf_client_callbacks = NULL;
static uint32_t btif_hf_client_features = 0;
@@ -112,9 +112,9 @@
static btif_hf_client_cb_t btif_hf_client_cb;
-/************************************************************************************
+/*******************************************************************************
* Static functions
- ***********************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
@@ -142,13 +142,13 @@
}
}
-/************************************************************************************
+/*******************************************************************************
* Externs
- ***********************************************************************************/
+ ******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
* Functions
- ***********************************************************************************/
+ ******************************************************************************/
static void clear_state(void) {
memset(&btif_hf_client_cb, 0, sizeof(btif_hf_client_cb_t));
diff --git a/btif/src/btif_hh.cc b/btif/src/btif_hh.cc
index a08da55..a11ec88 100644
--- a/btif/src/btif_hh.cc
+++ b/btif/src/btif_hh.cc
@@ -16,14 +16,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_hh.c
*
* Description: HID Host Profile Bluetooth Interface
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_hh"
@@ -91,14 +91,14 @@
BTIF_HH_VUP_REQ_EVT
} btif_hh_req_evt_t;
-/************************************************************************************
+/*******************************************************************************
* Constants & Macros
- ***********************************************************************************/
+ ******************************************************************************/
#define BTIF_HH_SERVICES (BTA_HID_SERVICE_MASK)
-/************************************************************************************
+/*******************************************************************************
* Local type definitions
- ***********************************************************************************/
+ ******************************************************************************/
typedef struct hid_kb_list {
uint16_t product_id;
@@ -106,9 +106,9 @@
const char* kb_name;
} tHID_KB_LIST;
-/************************************************************************************
+/*******************************************************************************
* Static variables
- ***********************************************************************************/
+ ******************************************************************************/
btif_hh_cb_t btif_hh_cb;
static bthh_callbacks_t* bt_hh_callbacks = NULL;
@@ -130,13 +130,13 @@
} \
} while (0)
-/************************************************************************************
+/*******************************************************************************
* Static functions
- ***********************************************************************************/
+ ******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
* Externs
- ***********************************************************************************/
+ ******************************************************************************/
extern void bta_hh_co_destroy(int fd);
extern void bta_hh_co_write(int fd, uint8_t* rpt, uint16_t len);
extern bt_status_t btif_dm_remove_bond(const bt_bdaddr_t* bd_addr);
@@ -160,9 +160,9 @@
// static void hh_update_keyboard_lockstates(btif_hh_device_t *p_dev);
void btif_hh_timer_timeout(void* data);
-/************************************************************************************
+/*******************************************************************************
* Functions
- ***********************************************************************************/
+ ******************************************************************************/
static int get_keylockstates() { return btif_hh_keylockstates; }
@@ -465,7 +465,7 @@
** Description Remove an added device from the stack.
**
** Returns void
- *******************************************************************************/
+ ******************************************************************************/
void btif_hh_remove_device(bt_bdaddr_t bd_addr) {
int i;
btif_hh_device_t* p_dev;
diff --git a/btif/src/btif_hl.cc b/btif/src/btif_hl.cc
index afa2112..02c9ea0 100644
--- a/btif/src/btif_hl.cc
+++ b/btif/src/btif_hl.cc
@@ -16,14 +16,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_hl.c
*
* Description: Health Device Profile Bluetooth Interface
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_hl"
#include "btif_hl.h"
@@ -82,9 +82,9 @@
btif_hl_cb_t btif_hl_cb;
btif_hl_cb_t* p_btif_hl_cb = &btif_hl_cb;
-/************************************************************************************
+/*******************************************************************************
* Static variables
- ***********************************************************************************/
+ ******************************************************************************/
static bthl_callbacks_t bt_hl_callbacks_cb;
static bthl_callbacks_t* bt_hl_callbacks = NULL;
@@ -170,9 +170,9 @@
#define BTIF_HL_ECHO_MAX_TX_RX_APDU_SIZE 1024
-/************************************************************************************
+/*******************************************************************************
* Static utility functions
- ***********************************************************************************/
+ ******************************************************************************/
#define BTIF_IF_GET_NAME 16
void btif_hl_display_calling_process_name(void) {
@@ -919,7 +919,7 @@
* Description Find channel id using mdl_id'
*
* Returns bool
- ********************************************************************************/
+ ******************************************************************************/
bool btif_hl_find_channel_id_using_mdl_id(uint8_t app_idx,
tBTA_HL_MDL_ID mdl_id,
int* p_channel_id) {
diff --git a/btif/src/btif_mce.cc b/btif/src/btif_mce.cc
index 8bb4af7..5c03d71 100644
--- a/btif/src/btif_mce.cc
+++ b/btif/src/btif_mce.cc
@@ -17,14 +17,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_mce.c
*
* Description: Message Access Profile (MCE role) Bluetooth Interface
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_mce"
diff --git a/btif/src/btif_pan.cc b/btif/src/btif_pan.cc
index d0803df..6fdc3f6 100644
--- a/btif/src/btif_pan.cc
+++ b/btif/src/btif_pan.cc
@@ -16,14 +16,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_pan.c
*
* Description: PAN Profile Bluetooth Interface
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_pan"
@@ -122,7 +122,7 @@
**
** Returns bt_status_t
**
- *******************************************************************************/
+ ******************************************************************************/
void btif_pan_init() {
BTIF_TRACE_DEBUG("jni_initialized = %d, btpan_cb.enabled:%d", jni_initialized,
btpan_cb.enabled);
diff --git a/btif/src/btif_rc.cc b/btif/src/btif_rc.cc
index f407b99..ac4202e 100644
--- a/btif/src/btif_rc.cc
+++ b/btif/src/btif_rc.cc
@@ -1742,9 +1742,9 @@
}
}
-/************************************************************************************
+/*******************************************************************************
* AVRCP API Functions
- ***********************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
@@ -3915,14 +3915,14 @@
}
/***************************************************************************
-**
-** Function handle_set_addressed_player_response
-**
-** Description handles the the set addressed player response, calls
-** HAL callback
-** Returns None
-**
-***************************************************************************/
+ *
+ * Function handle_set_addressed_player_response
+ *
+ * Description handles the the set addressed player response, calls
+ * HAL callback
+ * Returns None
+ *
+ **************************************************************************/
static void handle_set_addressed_player_response(tBTA_AV_META_MSG* pmeta_msg,
tAVRC_RSP* p_rsp) {
bt_bdaddr_t rc_addr;
@@ -4562,15 +4562,15 @@
}
/***************************************************************************
-**
-** Function get_playback_state_cmd
-**
-** Description Fetch the current playback state for the device
-**
-** Returns BT_STATUS_SUCCESS if command issued successfully otherwise
-** BT_STATUS_FAIL.
-**
-***************************************************************************/
+ *
+ * Function get_playback_state_cmd
+ *
+ * Description Fetch the current playback state for the device
+ *
+ * Returns BT_STATUS_SUCCESS if command issued successfully otherwise
+ * BT_STATUS_FAIL.
+ *
+ **************************************************************************/
static bt_status_t get_playback_state_cmd(bt_bdaddr_t* bd_addr) {
BTIF_TRACE_DEBUG("%s", __func__);
btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
diff --git a/btif/src/btif_sdp.cc b/btif/src/btif_sdp.cc
index 6c337f5..81b9a85 100644
--- a/btif/src/btif_sdp.cc
+++ b/btif/src/btif_sdp.cc
@@ -16,7 +16,7 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_sdp.c
* Description: SDP Bluetooth Interface.
@@ -24,7 +24,7 @@
* functionality.
* References btif_sdp_server.c for SDP record creation.
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_sdp"
diff --git a/btif/src/btif_sdp_server.cc b/btif/src/btif_sdp_server.cc
index 294cd4d..43d489b 100644
--- a/btif/src/btif_sdp_server.cc
+++ b/btif/src/btif_sdp_server.cc
@@ -16,7 +16,7 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_sdp_server.cc
* Description: SDP server Bluetooth Interface to create and remove SDP
@@ -24,7 +24,7 @@
* To be used in combination with the RFCOMM/L2CAP(LE) sockets.
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_sdp_server"
diff --git a/btif/src/btif_sock_thread.cc b/btif/src/btif_sock_thread.cc
index 78177d6..e2cd927 100644
--- a/btif/src/btif_sock_thread.cc
+++ b/btif/src/btif_sock_thread.cc
@@ -16,13 +16,13 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_sock_thread.cc
*
* Description: socket select thread
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_sock"
diff --git a/btif/src/btif_storage.cc b/btif/src/btif_storage.cc
index 941b127..828e943 100644
--- a/btif/src/btif_storage.cc
+++ b/btif/src/btif_storage.cc
@@ -17,7 +17,7 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_storage.c
*
@@ -52,9 +52,9 @@
#include "osi/include/log.h"
#include "osi/include/osi.h"
-/************************************************************************************
+/*******************************************************************************
* Constants & Macros
- ***********************************************************************************/
+ ******************************************************************************/
// TODO(armansito): Find a better way than using a hardcoded path.
#define BTIF_STORAGE_PATH_BLUEDROID "/data/misc/bluedroid"
@@ -144,28 +144,28 @@
#error "btif storage entry size exceeds unv max line size"
#endif
-/************************************************************************************
+/*******************************************************************************
* Local type definitions
- ***********************************************************************************/
+ ******************************************************************************/
typedef struct {
uint32_t num_devices;
bt_bdaddr_t devices[BTM_SEC_MAX_DEVICE_RECORDS];
} btif_bonded_devices_t;
-/************************************************************************************
+/*******************************************************************************
* External variables
- ***********************************************************************************/
+ ******************************************************************************/
extern bt_bdaddr_t btif_local_bd_addr;
-/************************************************************************************
+/*******************************************************************************
* External functions
- ***********************************************************************************/
+ ******************************************************************************/
extern void btif_gatts_add_bonded_dev_from_nv(BD_ADDR bda);
-/************************************************************************************
+/*******************************************************************************
* Internal Functions
- ***********************************************************************************/
+ ******************************************************************************/
static bt_status_t btif_in_fetch_bonded_ble_device(
const char* remote_bd_addr, int add,
@@ -174,9 +174,9 @@
static bool btif_has_ble_keys(const char* bdstr);
-/************************************************************************************
+/*******************************************************************************
* Static functions
- ***********************************************************************************/
+ ******************************************************************************/
static int prop2cfg(bt_bdaddr_t* remote_bd_addr, bt_property_t* prop) {
bdstr_t bdstr = {0};
@@ -501,7 +501,7 @@
* For OUT parameters, the caller is expected to provide the memory.
* Caller is expected to provide a valid pointer to 'property->value' based on
* the property->type.
- *******************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
*
diff --git a/btif/src/btif_uid.cc b/btif/src/btif_uid.cc
index d30cdad..45e3456 100644
--- a/btif/src/btif_uid.cc
+++ b/btif/src/btif_uid.cc
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_uid.cc
*
* Description: Contains data structures and functions for keeping track of
* socket usage per app UID.
*
- ***********************************************************************************/
+ ******************************************************************************/
#include <mutex>
#include "bt_common.h"
diff --git a/btif/src/btif_util.cc b/btif/src/btif_util.cc
index 5c60e6e..b4a5106 100644
--- a/btif/src/btif_util.cc
+++ b/btif/src/btif_util.cc
@@ -17,14 +17,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: btif_util.c
*
* Description: Miscellaneous helper functions
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_btif_util"
@@ -51,33 +51,33 @@
#include "btif_dm.h"
#include "btu.h"
-/************************************************************************************
+/*******************************************************************************
* Constants & Macros
- ***********************************************************************************/
+ ******************************************************************************/
#define ISDIGIT(a) (((a) >= '0') && ((a) <= '9'))
#define ISXDIGIT(a) \
((((a) >= '0') && ((a) <= '9')) || (((a) >= 'A') && ((a) <= 'F')) || \
(((a) >= 'a') && ((a) <= 'f')))
-/************************************************************************************
+/*******************************************************************************
* Local type definitions
- ***********************************************************************************/
+ ******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
* Static variables
- ***********************************************************************************/
+ ******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
* Static functions
- ***********************************************************************************/
+ ******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
* Externs
- ***********************************************************************************/
+ ******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
* Functions
- ***********************************************************************************/
+ ******************************************************************************/
/*****************************************************************************
* Logging helper functions
diff --git a/doc/style_guide.md b/doc/style_guide.md
index f151ce0..20efc9c 100644
--- a/doc/style_guide.md
+++ b/doc/style_guide.md
@@ -284,7 +284,7 @@
`git log --oneline path_to_files/filename_or_* | grep clang-format | head -n 5`
-***15ce1bd** subtree: Apply **clang-format** for the first time*
+ **15ce1bd** subtree: Apply **clang-format** for the first time*
##### Revert the formatting patch
@@ -338,7 +338,7 @@
`git log --oneline | head -n 1`
-***dc5f0e2** Unformatted but vital patch*
+ **dc5f0e2** Unformatted but vital patch*
(**Remember the HASH from this step**)
@@ -348,7 +348,7 @@
`git log --oneline | head -n 1`
-***15ce1bd** First Unrelated patch*
+ **15ce1bd** First Unrelated patch*
##### Reformat the code
diff --git a/embdrv/sbc/decoder/include/oi_assert.h b/embdrv/sbc/decoder/include/oi_assert.h
index 35d86cf..10980a0 100644
--- a/embdrv/sbc/decoder/include/oi_assert.h
+++ b/embdrv/sbc/decoder/include/oi_assert.h
@@ -25,9 +25,9 @@
the program, providing for a runtime assertion failure check.
C_ASSERT is a macro that can be used to perform compile time checks.
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/** \addtogroup Debugging Debugging APIs */
diff --git a/embdrv/sbc/decoder/include/oi_bitstream.h b/embdrv/sbc/decoder/include/oi_bitstream.h
index 1c3a8b4..c7e0b27 100644
--- a/embdrv/sbc/decoder/include/oi_bitstream.h
+++ b/embdrv/sbc/decoder/include/oi_bitstream.h
@@ -19,9 +19,9 @@
#ifndef _OI_BITSTREAM_H
#define _OI_BITSTREAM_H
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/**
diff --git a/embdrv/sbc/decoder/include/oi_bt_spec.h b/embdrv/sbc/decoder/include/oi_bt_spec.h
index 7accde6..f1b3b37 100644
--- a/embdrv/sbc/decoder/include/oi_bt_spec.h
+++ b/embdrv/sbc/decoder/include/oi_bt_spec.h
@@ -25,9 +25,9 @@
*
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#include "oi_stddefs.h"
diff --git a/embdrv/sbc/decoder/include/oi_codec_sbc.h b/embdrv/sbc/decoder/include/oi_codec_sbc.h
index d102f02..ac69df7 100644
--- a/embdrv/sbc/decoder/include/oi_codec_sbc.h
+++ b/embdrv/sbc/decoder/include/oi_codec_sbc.h
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#ifndef _OI_CODEC_SBC_CORE_H
#define _OI_CODEC_SBC_CORE_H
diff --git a/embdrv/sbc/decoder/include/oi_codec_sbc_private.h b/embdrv/sbc/decoder/include/oi_codec_sbc_private.h
index e768a3d..4e445e7 100644
--- a/embdrv/sbc/decoder/include/oi_codec_sbc_private.h
+++ b/embdrv/sbc/decoder/include/oi_codec_sbc_private.h
@@ -19,9 +19,9 @@
#ifndef _OI_CODEC_SBC_PRIVATE_H
#define _OI_CODEC_SBC_PRIVATE_H
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/**
@file
diff --git a/embdrv/sbc/decoder/include/oi_common.h b/embdrv/sbc/decoder/include/oi_common.h
index c4169f9..28b3a9e 100644
--- a/embdrv/sbc/decoder/include/oi_common.h
+++ b/embdrv/sbc/decoder/include/oi_common.h
@@ -28,9 +28,9 @@
* files for the specific modules of the protocol stack being used.
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#include "oi_bt_spec.h"
#include "oi_stddefs.h"
diff --git a/embdrv/sbc/decoder/include/oi_cpu_dep.h b/embdrv/sbc/decoder/include/oi_cpu_dep.h
index 49dd324..c582ec9 100644
--- a/embdrv/sbc/decoder/include/oi_cpu_dep.h
+++ b/embdrv/sbc/decoder/include/oi_cpu_dep.h
@@ -38,9 +38,9 @@
* Additional information is available in the @ref data_types_docpage section.
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#ifdef __cplusplus
extern "C" {
@@ -111,7 +111,7 @@
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_X86
@@ -119,7 +119,7 @@
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_ARM
/* This CPU type is deprecated (removed from use). Instead, use OI_CPU_ARM7_LEND or OI_CPU_ARM7_BEND for
@@ -127,7 +127,7 @@
#error OI_CPU_ARM is deprecated
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_ARC
/* This CPU type is deprecated (removed from use). Instead, use OI_CPU_ARC_LEND or OI_CPU_ARC_BEND for
@@ -135,7 +135,7 @@
#error OI_CPU_ARC is deprecated
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_SH3
/* The Hitachi SH C compiler defines _LIT or _BIG, depending on the endianness
@@ -149,107 +149,107 @@
#endif
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_SH2
#define OI_CPU_BYTE_ORDER OI_BIG_ENDIAN_BYTE_ORDER /**< SH-2 platform byte ordering is big-endian. */
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_H8
#define OI_CPU_BYTE_ORDER OI_BIG_ENDIAN_BYTE_ORDER
#error basic types not defined
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_MIPS
#define OI_CPU_BYTE_ORDER OI_LITTLE_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_SPARC
#define OI_CPU_BYTE_ORDER OI_LITTLE_ENDIAN_BYTE_ORDER
#error basic types not defined
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_M68000
#define OI_CPU_BYTE_ORDER OI_BIG_ENDIAN_BYTE_ORDER /**< M68000 platform byte ordering is big-endian. */
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_PPC
#define OI_CPU_BYTE_ORDER OI_BIG_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_SH4_7750
#define OI_CPU_BYTE_ORDER OI_BIG_ENDIAN_BYTE_ORDER /**< SH7750 platform byte ordering is big-endian. */
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_ARM7_LEND
#define OI_CPU_BYTE_ORDER OI_LITTLE_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_ARM7_BEND
#define OI_CPU_BYTE_ORDER OI_BIG_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_GDM1202
#define OI_CPU_BYTE_ORDER OI_BIG_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_ARC_LEND
#define OI_CPU_BYTE_ORDER OI_LITTLE_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_ARC_BEND
#define OI_CPU_BYTE_ORDER OI_BIG_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_M30833F
#define OI_CPU_BYTE_ORDER OI_LITTLE_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_CR16C
#define OI_CPU_BYTE_ORDER OI_LITTLE_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_M64111
#define OI_CPU_BYTE_ORDER OI_BIG_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#if OI_CPU_TYPE==OI_CPU_ARMV5_LEND
#define OI_CPU_BYTE_ORDER OI_LITTLE_ENDIAN_BYTE_ORDER
#endif
-/*********************************************************************************/
+/******************************************************************************/
#ifndef OI_CPU_BYTE_ORDER
@@ -263,5 +263,5 @@
}
#endif
-/*********************************************************************************/
+/******************************************************************************/
#endif /* _OI_CPU_DEP_H */
diff --git a/embdrv/sbc/decoder/include/oi_modules.h b/embdrv/sbc/decoder/include/oi_modules.h
index a0b68dd..2d21f81 100644
--- a/embdrv/sbc/decoder/include/oi_modules.h
+++ b/embdrv/sbc/decoder/include/oi_modules.h
@@ -25,9 +25,9 @@
*
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/** \addtogroup Misc Miscellaneous APIs */
diff --git a/embdrv/sbc/decoder/include/oi_osinterface.h b/embdrv/sbc/decoder/include/oi_osinterface.h
index 7ad8122..1c37025 100644
--- a/embdrv/sbc/decoder/include/oi_osinterface.h
+++ b/embdrv/sbc/decoder/include/oi_osinterface.h
@@ -29,9 +29,9 @@
*
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#include "oi_stddefs.h"
#include "oi_time.h"
diff --git a/embdrv/sbc/decoder/include/oi_stddefs.h b/embdrv/sbc/decoder/include/oi_stddefs.h
index d3939d7..bee4dfc 100644
--- a/embdrv/sbc/decoder/include/oi_stddefs.h
+++ b/embdrv/sbc/decoder/include/oi_stddefs.h
@@ -24,9 +24,9 @@
*
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#include "oi_cpu_dep.h"
diff --git a/embdrv/sbc/decoder/include/oi_string.h b/embdrv/sbc/decoder/include/oi_string.h
index e72f020..4b15479 100644
--- a/embdrv/sbc/decoder/include/oi_string.h
+++ b/embdrv/sbc/decoder/include/oi_string.h
@@ -24,9 +24,9 @@
*
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#include "oi_cpu_dep.h"
#include "oi_stddefs.h"
diff --git a/embdrv/sbc/decoder/include/oi_time.h b/embdrv/sbc/decoder/include/oi_time.h
index 67510c3..40035f5 100644
--- a/embdrv/sbc/decoder/include/oi_time.h
+++ b/embdrv/sbc/decoder/include/oi_time.h
@@ -34,9 +34,9 @@
*
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#include "oi_stddefs.h"
diff --git a/embdrv/sbc/decoder/include/oi_utils.h b/embdrv/sbc/decoder/include/oi_utils.h
index a1ca12e..330f1fa 100644
--- a/embdrv/sbc/decoder/include/oi_utils.h
+++ b/embdrv/sbc/decoder/include/oi_utils.h
@@ -27,9 +27,9 @@
* where this functionality is not available in stdlib.
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#include <stdarg.h>
#include "oi_common.h"
diff --git a/embdrv/sbc/decoder/srce/alloc.c b/embdrv/sbc/decoder/srce/alloc.c
index db78693..bb1fb5e 100644
--- a/embdrv/sbc/decoder/srce/alloc.c
+++ b/embdrv/sbc/decoder/srce/alloc.c
@@ -20,9 +20,9 @@
#include <stdlib.h>
#include <oi_codec_sbc_private.h>
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
PRIVATE OI_STATUS OI_CODEC_SBC_Alloc(OI_CODEC_SBC_COMMON_CONTEXT *common,
uint32_t *codecDataAligned,
diff --git a/embdrv/sbc/decoder/srce/bitalloc-sbc.c b/embdrv/sbc/decoder/srce/bitalloc-sbc.c
index ac32d01..0d74283 100644
--- a/embdrv/sbc/decoder/srce/bitalloc-sbc.c
+++ b/embdrv/sbc/decoder/srce/bitalloc-sbc.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/** @file
@ingroup codec_internal
diff --git a/embdrv/sbc/decoder/srce/bitalloc.c b/embdrv/sbc/decoder/srce/bitalloc.c
index 5cb10ef..2ffddfd 100644
--- a/embdrv/sbc/decoder/srce/bitalloc.c
+++ b/embdrv/sbc/decoder/srce/bitalloc.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
- ***********************************************************************************/
+ ******************************************************************************/
/**
@file
diff --git a/embdrv/sbc/decoder/srce/bitstream-decode.c b/embdrv/sbc/decoder/srce/bitstream-decode.c
index d5cee27..c68d9a0 100644
--- a/embdrv/sbc/decoder/srce/bitstream-decode.c
+++ b/embdrv/sbc/decoder/srce/bitstream-decode.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/**
@file
diff --git a/embdrv/sbc/decoder/srce/decoder-oina.c b/embdrv/sbc/decoder/srce/decoder-oina.c
index d9db02f..9e1e0c0 100644
--- a/embdrv/sbc/decoder/srce/decoder-oina.c
+++ b/embdrv/sbc/decoder/srce/decoder-oina.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
- ***********************************************************************************/
+ ******************************************************************************/
/**
@file
diff --git a/embdrv/sbc/decoder/srce/decoder-private.c b/embdrv/sbc/decoder/srce/decoder-private.c
index a0c7638..eec3417 100644
--- a/embdrv/sbc/decoder/srce/decoder-private.c
+++ b/embdrv/sbc/decoder/srce/decoder-private.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
- ***********************************************************************************/
+ ******************************************************************************/
/**
@file
diff --git a/embdrv/sbc/decoder/srce/decoder-sbc.c b/embdrv/sbc/decoder/srce/decoder-sbc.c
index 37e64e6..2fbebc7 100644
--- a/embdrv/sbc/decoder/srce/decoder-sbc.c
+++ b/embdrv/sbc/decoder/srce/decoder-sbc.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
- ***********************************************************************************/
+ ******************************************************************************/
/** @file
@ingroup codec_internal
diff --git a/embdrv/sbc/decoder/srce/dequant.c b/embdrv/sbc/decoder/srce/dequant.c
index 4c3474f..28e37e4 100644
--- a/embdrv/sbc/decoder/srce/dequant.c
+++ b/embdrv/sbc/decoder/srce/dequant.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/**
@file
diff --git a/embdrv/sbc/decoder/srce/framing-sbc.c b/embdrv/sbc/decoder/srce/framing-sbc.c
index 09540b1..c367925 100644
--- a/embdrv/sbc/decoder/srce/framing-sbc.c
+++ b/embdrv/sbc/decoder/srce/framing-sbc.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/** @file
@ingroup codec_internal
diff --git a/embdrv/sbc/decoder/srce/framing.c b/embdrv/sbc/decoder/srce/framing.c
index 959692c..48b1d97 100644
--- a/embdrv/sbc/decoder/srce/framing.c
+++ b/embdrv/sbc/decoder/srce/framing.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/**
@file
diff --git a/embdrv/sbc/decoder/srce/oi_codec_version.c b/embdrv/sbc/decoder/srce/oi_codec_version.c
index 25dc162..8d0626d 100644
--- a/embdrv/sbc/decoder/srce/oi_codec_version.c
+++ b/embdrv/sbc/decoder/srce/oi_codec_version.c
@@ -30,9 +30,9 @@
@{
*/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
#include "oi_stddefs.h"
#include "oi_codec_sbc_private.h"
@@ -50,7 +50,7 @@
return codecVersion;
}
-/**********************************************************************************/
+/******************************************************************************/
/**
@}
diff --git a/embdrv/sbc/decoder/srce/readsamplesjoint.inc b/embdrv/sbc/decoder/srce/readsamplesjoint.inc
index c1d0e08..690cabe 100644
--- a/embdrv/sbc/decoder/srce/readsamplesjoint.inc
+++ b/embdrv/sbc/decoder/srce/readsamplesjoint.inc
@@ -49,11 +49,11 @@
}
\endcode
* @ingroup codec_internal
- *******************************************************************************/
+ ******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
{
OI_CODEC_SBC_COMMON_CONTEXT *common = &context->common;
diff --git a/embdrv/sbc/decoder/srce/synthesis-dct8.c b/embdrv/sbc/decoder/srce/synthesis-dct8.c
index 0e82627..f263df6 100644
--- a/embdrv/sbc/decoder/srce/synthesis-dct8.c
+++ b/embdrv/sbc/decoder/srce/synthesis-dct8.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/** @file
@ingroup codec_internal
diff --git a/embdrv/sbc/decoder/srce/synthesis-sbc.c b/embdrv/sbc/decoder/srce/synthesis-sbc.c
index 598c7e9..37a4187 100644
--- a/embdrv/sbc/decoder/srce/synthesis-sbc.c
+++ b/embdrv/sbc/decoder/srce/synthesis-sbc.c
@@ -17,9 +17,9 @@
*
******************************************************************************/
-/**********************************************************************************
+/*******************************************************************************
$Revision: #1 $
-***********************************************************************************/
+ ******************************************************************************/
/** @file
diff --git a/embdrv/sbc/encoder/srce/sbc_dct.c b/embdrv/sbc/encoder/srce/sbc_dct.c
index 1f7c49b..87879bd 100644
--- a/embdrv/sbc/encoder/srce/sbc_dct.c
+++ b/embdrv/sbc/encoder/srce/sbc_dct.c
@@ -29,16 +29,16 @@
/*******************************************************************************
-**
-** Function SBC_FastIDCT8
-**
-** Description implementation of fast DCT algorithm by Feig and Winograd
-**
-**
-** Returns y = dct(pInVect)
-**
-**
-*******************************************************************************/
+ *
+ * Function SBC_FastIDCT8
+ *
+ * Description implementation of fast DCT algorithm by Feig and Winograd
+ *
+ *
+ * Returns y = dct(pInVect)
+ *
+ *
+ ******************************************************************************/
#if (SBC_IS_64_MULT_IN_IDCT == FALSE)
#define SBC_COS_PI_SUR_4 (0x00005a82) /* ((0x8000) * 0.7071) = cos(pi/4) */
@@ -178,16 +178,16 @@
}
/*******************************************************************************
-**
-** Function SBC_FastIDCT4
-**
-** Description implementation of fast DCT algorithm by Feig and Winograd
-**
-**
-** Returns y = dct(x0)
-**
-**
-*******************************************************************************/
+ *
+ * Function SBC_FastIDCT4
+ *
+ * Description implementation of fast DCT algorithm by Feig and Winograd
+ *
+ *
+ * Returns y = dct(x0)
+ *
+ *
+ ******************************************************************************/
void SBC_FastIDCT4(int32_t *pInVect, int32_t *pOutVect)
{
#if (SBC_FAST_DCT == TRUE)
diff --git a/main/bte_init.cc b/main/bte_init.cc
index 4a6444b..6c03c98 100644
--- a/main/bte_init.cc
+++ b/main/bte_init.cc
@@ -63,32 +63,32 @@
#include "smp_api.h"
/*****************************************************************************
-** F U N C T I O N S *
-******************************************************************************/
+ * F U N C T I O N S *
+ *****************************************************************************/
/*****************************************************************************
-**
-** Function BTE_InitStack
-**
-** Description Initialize control block memory for each component.
-**
-** Note: The core stack components must be called
-** before creating the BTU Task. The rest of the
-** components can be initialized at a later time if desired
-** as long as the component's init function is called
-** before accessing any of its functions.
-**
-** Returns void
-**
-******************************************************************************/
+ *
+ * Function BTE_InitStack
+ *
+ * Description Initialize control block memory for each component.
+ *
+ * Note: The core stack components must be called
+ * before creating the BTU Task. The rest of the
+ * components can be initialized at a later time if desired
+ * as long as the component's init function is called
+ * before accessing any of its functions.
+ *
+ * Returns void
+ *
+ *****************************************************************************/
void BTE_InitStack(void)
{
/* Initialize the optional stack components */
RFCOMM_Init();
/**************************
-** BNEP and its profiles **
-***************************/
+ * BNEP and its profiles **
+ **************************/
#if (BNEP_INCLUDED == TRUE)
BNEP_Init();
@@ -99,8 +99,8 @@
/**************************
-** AVDT and its profiles **
-***************************/
+ * AVDT and its profiles **
+ **************************/
#if (A2D_INCLUDED == TRUE)
A2DP_Init();
#endif /* AADP */
@@ -110,8 +110,8 @@
/***********
-** Others **
-************/
+ * Others **
+ ***********/
GAP_Init();
#if (HID_HOST_INCLUDED == TRUE)
diff --git a/main/bte_main.cc b/main/bte_main.cc
index 4705756..d313874 100644
--- a/main/bte_main.cc
+++ b/main/bte_main.cc
@@ -56,8 +56,8 @@
#include "stack_config.h"
/*******************************************************************************
-** Constants & Macros
-*******************************************************************************/
+ * Constants & Macros
+ ******************************************************************************/
/* Run-time configuration file for BLE*/
#ifndef BTE_BLE_STACK_CONF_FILE
@@ -70,32 +70,32 @@
#endif // BT_BLE_STACK_CONF_FILE
/******************************************************************************
-** Variables
-******************************************************************************/
+ * Variables
+ *****************************************************************************/
/*******************************************************************************
-** Static variables
-*******************************************************************************/
+ * Static variables
+ ******************************************************************************/
static const hci_t *hci;
/*******************************************************************************
-** Static functions
-*******************************************************************************/
+ * Static functions
+ ******************************************************************************/
/*******************************************************************************
-** Externs
-*******************************************************************************/
+ * Externs
+ ******************************************************************************/
fixed_queue_t *btu_hci_msg_queue;
/******************************************************************************
-**
-** Function bte_main_boot_entry
-**
-** Description BTE MAIN API - Entry point for BTE chip/stack initialization
-**
-** Returns None
-**
-******************************************************************************/
+ *
+ * Function bte_main_boot_entry
+ *
+ * Description BTE MAIN API - Entry point for BTE chip/stack initialization
+ *
+ * Returns None
+ *
+ *****************************************************************************/
void bte_main_boot_entry(void)
{
module_init(get_module(INTEROP_MODULE));
@@ -117,14 +117,14 @@
}
/******************************************************************************
-**
-** Function bte_main_cleanup
-**
-** Description BTE MAIN API - Cleanup code for BTE chip/stack
-**
-** Returns None
-**
-******************************************************************************/
+ *
+ * Function bte_main_cleanup
+ *
+ * Description BTE MAIN API - Cleanup code for BTE chip/stack
+ *
+ * Returns None
+ *
+ *****************************************************************************/
void bte_main_cleanup()
{
data_dispatcher_register_default(hci_layer_get_interface()->event_dispatcher, NULL);
@@ -139,15 +139,15 @@
}
/******************************************************************************
-**
-** Function bte_main_enable
-**
-** Description BTE MAIN API - Creates all the BTE tasks. Should be called
-** part of the Bluetooth stack enable sequence
-**
-** Returns None
-**
-******************************************************************************/
+ *
+ * Function bte_main_enable
+ *
+ * Description BTE MAIN API - Creates all the BTE tasks. Should be called
+ * part of the Bluetooth stack enable sequence
+ *
+ * Returns None
+ *
+ *****************************************************************************/
void bte_main_enable()
{
APPL_TRACE_DEBUG("%s", __func__);
@@ -159,15 +159,15 @@
}
/******************************************************************************
-**
-** Function bte_main_disable
-**
-** Description BTE MAIN API - Destroys all the BTE tasks. Should be called
-** part of the Bluetooth stack disable sequence
-**
-** Returns None
-**
-******************************************************************************/
+ *
+ * Function bte_main_disable
+ *
+ * Description BTE MAIN API - Destroys all the BTE tasks. Should be called
+ * part of the Bluetooth stack disable sequence
+ *
+ * Returns None
+ *
+ *****************************************************************************/
void bte_main_disable(void)
{
APPL_TRACE_DEBUG("%s", __func__);
@@ -179,14 +179,14 @@
}
/******************************************************************************
-**
-** Function bte_main_postload_cfg
-**
-** Description BTE MAIN API - Stack postload configuration
-**
-** Returns None
-**
-******************************************************************************/
+ *
+ * Function bte_main_postload_cfg
+ *
+ * Description BTE MAIN API - Stack postload configuration
+ *
+ * Returns None
+ *
+ *****************************************************************************/
void bte_main_postload_cfg(void)
{
hci->do_postload();
@@ -194,42 +194,42 @@
#if (HCILP_INCLUDED == TRUE)
/******************************************************************************
-**
-** Function bte_main_enable_lpm
-**
-** Description BTE MAIN API - Enable/Disable low power mode operation
-**
-** Returns None
-**
-******************************************************************************/
+ *
+ * Function bte_main_enable_lpm
+ *
+ * Description BTE MAIN API - Enable/Disable low power mode operation
+ *
+ * Returns None
+ *
+ *****************************************************************************/
void bte_main_enable_lpm(bool enable)
{
hci->send_low_power_command(enable ? LPM_ENABLE : LPM_DISABLE);
}
/******************************************************************************
-**
-** Function bte_main_lpm_allow_bt_device_sleep
-**
-** Description BTE MAIN API - Allow the BT controller to go to sleep
-**
-** Returns None
-**
-******************************************************************************/
+ *
+ * Function bte_main_lpm_allow_bt_device_sleep
+ *
+ * Description BTE MAIN API - Allow the BT controller to go to sleep
+ *
+ * Returns None
+ *
+ *****************************************************************************/
void bte_main_lpm_allow_bt_device_sleep()
{
hci->send_low_power_command(LPM_WAKE_DEASSERT);
}
/******************************************************************************
-**
-** Function bte_main_lpm_wake_bt_device
-**
-** Description BTE MAIN API - Wake BT controller up if it is in sleep mode
-**
-** Returns None
-**
-******************************************************************************/
+ *
+ * Function bte_main_lpm_wake_bt_device
+ *
+ * Description BTE MAIN API - Wake BT controller up if it is in sleep mode
+ *
+ * Returns None
+ *
+ *****************************************************************************/
void bte_main_lpm_wake_bt_device()
{
hci->send_low_power_command(LPM_WAKE_ASSERT);
@@ -237,17 +237,17 @@
#endif // HCILP_INCLUDED
/******************************************************************************
-**
-** Function bte_main_hci_send
-**
-** Description BTE MAIN API - This function is called by the upper stack to
-** send an HCI message. The function displays a protocol trace
-** message (if enabled), and then calls the 'transmit' function
-** associated with the currently selected HCI transport
-**
-** Returns None
-**
-******************************************************************************/
+ *
+ * Function bte_main_hci_send
+ *
+ * Description BTE MAIN API - This function is called by the upper stack to
+ * send an HCI message. The function displays a protocol trace
+ * message (if enabled), and then calls the 'transmit' function
+ * associated with the currently selected HCI transport
+ *
+ * Returns None
+ *
+ *****************************************************************************/
void bte_main_hci_send (BT_HDR *p_msg, uint16_t event)
{
uint16_t sub_event = event & BT_SUB_EVT_MASK; /* local controller ID */
diff --git a/osi/src/compat.cc b/osi/src/compat.cc
index c228c75..069964c 100644
--- a/osi/src/compat.cc
+++ b/osi/src/compat.cc
@@ -16,14 +16,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: compat.cc
*
* Description: Compatibility functions for non-bionic C libraries
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#include <features.h>
#include <string.h>
diff --git a/stack/a2dp/a2dp_api.cc b/stack/a2dp/a2dp_api.cc
index 2c3a04d..ea1ab5a 100644
--- a/stack/a2dp/a2dp_api.cc
+++ b/stack/a2dp/a2dp_api.cc
@@ -39,25 +39,25 @@
#define A2DP_MEDIA_TYPE_OFFSET 1
/*****************************************************************************
-** Global data
-*****************************************************************************/
+ * Global data
+ ****************************************************************************/
tA2DP_CB a2dp_cb;
/******************************************************************************
-**
-** Function a2dp_sdp_cback
-**
-** Description This is the SDP callback function used by A2DP_FindService.
-** This function will be executed by SDP when the service
-** search is completed. If the search is successful, it
-** finds the first record in the database that matches the
-** UUID of the search. Then retrieves various parameters
-** from the record. When it is finished it calls the
-** application callback function.
-**
-** Returns Nothing.
-**
-******************************************************************************/
+ *
+ * Function a2dp_sdp_cback
+ *
+ * Description This is the SDP callback function used by A2DP_FindService.
+ * This function will be executed by SDP when the service
+ * search is completed. If the search is successful, it
+ * finds the first record in the database that matches the
+ * UUID of the search. Then retrieves various parameters
+ * from the record. When it is finished it calls the
+ * application callback function.
+ *
+ * Returns Nothing.
+ *
+ *****************************************************************************/
static void a2dp_sdp_cback(uint16_t status) {
tSDP_DISC_REC* p_rec = NULL;
tSDP_DISC_ATTR* p_attr;
@@ -121,49 +121,49 @@
}
/*******************************************************************************
-**
-** Function a2dp_set_avdt_sdp_ver
-**
-** Description This function allows the script wrapper to change the
-** avdt version of a2dp.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function a2dp_set_avdt_sdp_ver
+ *
+ * Description This function allows the script wrapper to change the
+ * avdt version of a2dp.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void a2dp_set_avdt_sdp_ver(uint16_t avdt_sdp_ver) {
a2dp_cb.avdt_sdp_ver = avdt_sdp_ver;
}
/******************************************************************************
-**
-** Function A2DP_AddRecord
-**
-** Description This function is called by a server application to add
-** SRC or SNK information to an SDP record. Prior to
-** calling this function the application must call
-** SDP_CreateRecord() to create an SDP record.
-**
-** Input Parameters:
-** service_uuid: Indicates SRC or SNK.
-**
-** p_service_name: Pointer to a null-terminated character
-** string containing the service name.
-**
-** p_provider_name: Pointer to a null-terminated character
-** string containing the provider name.
-**
-** features: Profile supported features.
-**
-** sdp_handle: SDP handle returned by SDP_CreateRecord().
-**
-** Output Parameters:
-** None.
-**
-** Returns A2DP_SUCCESS if function execution succeeded,
-** A2DP_INVALID_PARAMS if bad parameters are given.
-** A2DP_FAIL if function execution failed.
-**
-******************************************************************************/
+ *
+ * Function A2DP_AddRecord
+ *
+ * Description This function is called by a server application to add
+ * SRC or SNK information to an SDP record. Prior to
+ * calling this function the application must call
+ * SDP_CreateRecord() to create an SDP record.
+ *
+ * Input Parameters:
+ * service_uuid: Indicates SRC or SNK.
+ *
+ * p_service_name: Pointer to a null-terminated character
+ * string containing the service name.
+ *
+ * p_provider_name: Pointer to a null-terminated character
+ * string containing the provider name.
+ *
+ * features: Profile supported features.
+ *
+ * sdp_handle: SDP handle returned by SDP_CreateRecord().
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns A2DP_SUCCESS if function execution succeeded,
+ * A2DP_INVALID_PARAMS if bad parameters are given.
+ * A2DP_FAIL if function execution failed.
+ *
+ *****************************************************************************/
tA2DP_STATUS A2DP_AddRecord(uint16_t service_uuid, char* p_service_name,
char* p_provider_name, uint16_t features,
uint32_t sdp_handle) {
@@ -230,40 +230,40 @@
}
/******************************************************************************
-**
-** Function A2DP_FindService
-**
-** Description This function is called by a client application to
-** perform service discovery and retrieve SRC or SNK SDP
-** record information from a server. Information is
-** returned for the first service 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
-** A2DP_FindService() at a time; the application must wait
-** for the callback before it makes another call to
-** the function.
-**
-** Input Parameters:
-** service_uuid: Indicates SRC or SNK.
-**
-** bd_addr: BD address of the peer device.
-**
-** p_db: Pointer to the information to initialize
-** the discovery database.
-**
-** p_cback: Pointer to the A2DP_FindService()
-** callback function.
-**
-** Output Parameters:
-** None.
-**
-** Returns A2DP_SUCCESS if function execution succeeded,
-** A2DP_INVALID_PARAMS if bad parameters are given.
-** A2DP_BUSY if discovery is already in progress.
-** A2DP_FAIL if function execution failed.
-**
-******************************************************************************/
+ *
+ * Function A2DP_FindService
+ *
+ * Description This function is called by a client application to
+ * perform service discovery and retrieve SRC or SNK SDP
+ * record information from a server. Information is
+ * returned for the first service 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
+ * A2DP_FindService() at a time; the application must wait
+ * for the callback before it makes another call to
+ * the function.
+ *
+ * Input Parameters:
+ * service_uuid: Indicates SRC or SNK.
+ *
+ * bd_addr: BD address of the peer device.
+ *
+ * p_db: Pointer to the information to initialize
+ * the discovery database.
+ *
+ * p_cback: Pointer to the A2DP_FindService()
+ * callback function.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns A2DP_SUCCESS if function execution succeeded,
+ * A2DP_INVALID_PARAMS if bad parameters are given.
+ * A2DP_BUSY if discovery is already in progress.
+ * A2DP_FAIL if function execution failed.
+ *
+ *****************************************************************************/
tA2DP_STATUS A2DP_FindService(uint16_t service_uuid, BD_ADDR bd_addr,
tA2DP_SDP_DB_PARAMS* p_db,
tA2DP_FIND_CBACK* p_cback) {
@@ -317,26 +317,26 @@
}
/******************************************************************************
-**
-** Function A2DP_SetTraceLevel
-**
-** Description Sets the trace level for A2D. If 0xff is passed, the
-** current trace level is returned.
-**
-** Input Parameters:
-** new_level: The level to set the A2DP tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new trace level or current trace level if
-** the input parameter is 0xff.
-**
-******************************************************************************/
+ *
+ * Function A2DP_SetTraceLevel
+ *
+ * Description Sets the trace level for A2D. If 0xff is passed, the
+ * current trace level is returned.
+ *
+ * Input Parameters:
+ * new_level: The level to set the A2DP tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new trace level or current trace level if
+ * the input parameter is 0xff.
+ *
+ *****************************************************************************/
uint8_t A2DP_SetTraceLevel(uint8_t new_level) {
if (new_level != 0xFF) a2dp_cb.trace_level = new_level;
@@ -344,13 +344,13 @@
}
/******************************************************************************
-** Function A2DP_BitsSet
-**
-** Description Check the given num for the number of bits set
-** Returns A2DP_SET_ONE_BIT, if one and only one bit is set
-** A2DP_SET_ZERO_BIT, if all bits clear
-** A2DP_SET_MULTL_BIT, if multiple bits are set
-******************************************************************************/
+ * Function A2DP_BitsSet
+ *
+ * Description Check the given num for the number of bits set
+ * Returns A2DP_SET_ONE_BIT, if one and only one bit is set
+ * A2DP_SET_ZERO_BIT, if all bits clear
+ * A2DP_SET_MULTL_BIT, if multiple bits are set
+ *****************************************************************************/
uint8_t A2DP_BitsSet(uint8_t num) {
uint8_t count;
bool res;
@@ -364,17 +364,17 @@
}
/*******************************************************************************
-**
-** Function A2DP_Init
-**
-** Description This function is called to initialize the control block
-** 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.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function A2DP_Init
+ *
+ * Description This function is called to initialize the control block
+ * 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.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void A2DP_Init(void) {
memset(&a2dp_cb, 0, sizeof(tA2DP_CB));
diff --git a/stack/a2dp/a2dp_int.h b/stack/a2dp/a2dp_int.h
index b016c95..a22bd5a 100644
--- a/stack/a2dp/a2dp_int.h
+++ b/stack/a2dp/a2dp_int.h
@@ -31,8 +31,8 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
#define A2DP_VERSION 0x0102
/* Number of attributes in A2DP SDP record. */
@@ -42,8 +42,8 @@
#define A2DP_NUM_PROTO_ELEMS 2
/*****************************************************************************
-** Type definitions
-*****************************************************************************/
+ * Type definitions
+ ****************************************************************************/
/* Control block used by A2DP_FindService(). */
typedef struct {
@@ -59,8 +59,8 @@
} tA2DP_CB;
/******************************************************************************
-** Main Control Block
-*******************************************************************************/
+ * Main Control Block
+ ******************************************************************************/
extern tA2DP_CB a2dp_cb;
/* Used only for conformance testing */
diff --git a/stack/a2dp/a2dp_sbc.cc b/stack/a2dp/a2dp_sbc.cc
index f1cd6d7..588175d 100644
--- a/stack/a2dp/a2dp_sbc.cc
+++ b/stack/a2dp/a2dp_sbc.cc
@@ -207,29 +207,29 @@
}
/******************************************************************************
-**
-** Function A2DP_BldSbcMplHdr
-**
-** Description This function is called by an application to parse
-** the SBC Media Payload header.
-** Input Parameters:
-** frag: 1, if fragmented. 0, otherwise.
-**
-** start: 1, if the starting packet of a fragmented frame.
-**
-** last: 1, if the last packet of a fragmented frame.
-**
-** num: If frag is 1, this is the number of remaining
-** fragments (including this fragment) of this frame.
-** If frag is 0, this is the number of frames in
-** this packet.
-**
-** Output Parameters:
-** p_dst: the resulting media payload header byte
-** sequence.
-**
-** Returns void.
-******************************************************************************/
+ *
+ * Function A2DP_BldSbcMplHdr
+ *
+ * Description This function is called by an application to parse
+ * the SBC Media Payload header.
+ * Input Parameters:
+ * frag: 1, if fragmented. 0, otherwise.
+ *
+ * start: 1, if the starting packet of a fragmented frame.
+ *
+ * last: 1, if the last packet of a fragmented frame.
+ *
+ * num: If frag is 1, this is the number of remaining
+ * fragments (including this fragment) of this frame.
+ * If frag is 0, this is the number of frames in
+ * this packet.
+ *
+ * Output Parameters:
+ * p_dst: the resulting media payload header byte
+ * sequence.
+ *
+ * Returns void.
+ *****************************************************************************/
static void A2DP_BldSbcMplHdr(uint8_t* p_dst, bool frag, bool start, bool last,
uint8_t num) {
if (p_dst == NULL) return;
@@ -242,29 +242,29 @@
}
/******************************************************************************
-**
-** Function A2DP_ParseMplHeaderSbc
-**
-** Description This function is called by an application to parse
-** the SBC Media Payload header.
-** Input Parameters:
-** p_src: the byte sequence to parse..
-**
-** Output Parameters:
-** frag: 1, if fragmented. 0, otherwise.
-**
-** start: 1, if the starting packet of a fragmented frame.
-**
-** last: 1, if the last packet of a fragmented frame.
-**
-** num: If frag is 1, this is the number of remaining
-** fragments
-** (including this fragment) of this frame.
-** If frag is 0, this is the number of frames in
-** this packet.
-**
-** Returns void.
-******************************************************************************/
+ *
+ * Function A2DP_ParseMplHeaderSbc
+ *
+ * Description This function is called by an application to parse
+ * the SBC Media Payload header.
+ * Input Parameters:
+ * p_src: the byte sequence to parse..
+ *
+ * Output Parameters:
+ * frag: 1, if fragmented. 0, otherwise.
+ *
+ * start: 1, if the starting packet of a fragmented frame.
+ *
+ * last: 1, if the last packet of a fragmented frame.
+ *
+ * num: If frag is 1, this is the number of remaining
+ * fragments
+ * (including this fragment) of this frame.
+ * If frag is 0, this is the number of frames in
+ * this packet.
+ *
+ * Returns void.
+ *****************************************************************************/
UNUSED_ATTR static void A2DP_ParseMplHeaderSbc(uint8_t* p_src, bool* p_frag,
bool* p_start, bool* p_last,
uint8_t* p_num) {
diff --git a/stack/a2dp/a2dp_sbc_up_sample.cc b/stack/a2dp/a2dp_sbc_up_sample.cc
index 5cea704..da15fe9 100644
--- a/stack/a2dp/a2dp_sbc_up_sample.cc
+++ b/stack/a2dp/a2dp_sbc_up_sample.cc
@@ -43,19 +43,19 @@
tA2DP_SBC_UPS_CB a2dp_sbc_ups_cb;
/*******************************************************************************
-**
-** Function a2dp_sbc_init_up_sample
-**
-** Description initialize the up sample
-**
-** src_sps: samples per second (source audio data)
-** 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
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_init_up_sample
+ *
+ * Description initialize the up sample
+ *
+ * src_sps: samples per second (source audio data)
+ * 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
+ *
+ ******************************************************************************/
void a2dp_sbc_init_up_sample(uint32_t src_sps, uint32_t dst_sps, uint8_t bits,
uint8_t n_channels) {
a2dp_sbc_ups_cb.cur_pos = -1;
@@ -86,31 +86,31 @@
}
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-** Note: An AE reported an issue with this function.
-** When called with a2dp_sbc_up_sample(src, uint8_array_dst..)
-** the byte before uint8_array_dst may get overwritten.
-** Using uint16_array_dst avoids the problem.
-** This issue is related to endian-ness and is hard to resolve
-** in a generic manner.
-** **************** Please use uint16 array as dst.
-**
-** Returns The number of bytes used in p_dst
-** The number of bytes used in p_src (in *p_ret)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ * Note: An AE reported an issue with this function.
+ * When called with a2dp_sbc_up_sample(src, uint8_array_dst..)
+ * the byte before uint8_array_dst may get overwritten.
+ * Using uint16_array_dst avoids the problem.
+ * This issue is related to endian-ness and is hard to resolve
+ * in a generic manner.
+ * **************** Please use uint16 array as dst.
+ *
+ * Returns The number of bytes used in p_dst
+ * The number of bytes used in p_src (in *p_ret)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret) {
uint32_t src;
@@ -127,24 +127,24 @@
}
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample_16s (16bits-stereo)
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample_16s (16bits-stereo)
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample_16s(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret) {
int16_t* p_src_tmp = (int16_t*)p_src;
@@ -186,24 +186,24 @@
}
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample_16m (16bits-mono)
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample_16m (16bits-mono)
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample_16m(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret) {
int16_t* p_src_tmp = (int16_t*)p_src;
@@ -246,24 +246,24 @@
}
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample_8s (8bits-stereo)
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample_8s (8bits-stereo)
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample_8s(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret) {
uint8_t* p_src_tmp = (uint8_t*)p_src;
@@ -311,23 +311,23 @@
}
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample_8m (8bits-mono)
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample_8m (8bits-mono)
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample_8m(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret) {
uint8_t* p_src_tmp = (uint8_t*)p_src;
diff --git a/stack/avct/avct_api.cc b/stack/avct/avct_api.cc
index 062508a..8359b50 100644
--- a/stack/avct/avct_api.cc
+++ b/stack/avct/avct_api.cc
@@ -38,19 +38,19 @@
tAVCT_CB avct_cb;
/*******************************************************************************
-**
-** Function AVCT_Register
-**
-** Description This is the system level registration function for the
-** AVCTP protocol. This function initializes AVCTP and
-** 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
-**
-*******************************************************************************/
+ *
+ * Function AVCT_Register
+ *
+ * Description This is the system level registration function for the
+ * AVCTP protocol. This function initializes AVCTP and
+ * 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
+ *
+ ******************************************************************************/
void AVCT_Register(uint16_t mtu,
UNUSED_ATTR uint16_t mtu_br, uint8_t sec_mask)
{
@@ -90,19 +90,19 @@
}
/*******************************************************************************
-**
-** Function AVCT_Deregister
-**
-** Description This function is called to deregister use AVCTP protocol.
-** It is called when AVCTP is no longer being used by any
-** application in the system. Before this function can be
-** called, all connections must be removed with
-** AVCT_RemoveConn().
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVCT_Deregister
+ *
+ * Description This function is called to deregister use AVCTP protocol.
+ * It is called when AVCTP is no longer being used by any
+ * application in the system. Before this function can be
+ * called, all connections must be removed with
+ * AVCT_RemoveConn().
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void AVCT_Deregister(void)
{
AVCT_TRACE_API("AVCT_Deregister");
@@ -112,21 +112,21 @@
}
/*******************************************************************************
-**
-** Function AVCT_CreateConn
-**
-** Description Create an AVCTP connection. There are two types of
-** connections, initiator and acceptor, as determined by
-** 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
-** passively for an incoming AVCTP connection from a peer device.
-**
-**
-** Returns AVCT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_CreateConn
+ *
+ * Description Create an AVCTP connection. There are two types of
+ * connections, initiator and acceptor, as determined by
+ * 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
+ * passively for an incoming AVCTP connection from a peer device.
+ *
+ *
+ * Returns AVCT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVCT_CreateConn(uint8_t *p_handle, tAVCT_CC *p_cc, BD_ADDR peer_addr)
{
uint16_t result = AVCT_SUCCESS;
@@ -181,18 +181,18 @@
}
/*******************************************************************************
-**
-** Function AVCT_RemoveConn
-**
-** Description Remove an AVCTP connection. This function is called when
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_RemoveConn
+ *
+ * Description Remove an AVCTP connection. This function is called when
+ * 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.
+ *
+ ******************************************************************************/
uint16_t AVCT_RemoveConn(uint8_t handle)
{
uint16_t result = AVCT_SUCCESS;
@@ -220,21 +220,21 @@
}
/*******************************************************************************
-**
-** Function AVCT_CreateBrowse
-**
-** Description Create an AVCTP Browse channel. There are two types of
-** connections, initiator and acceptor, as determined by
-** 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
-** passively for an incoming AVCTP connection from a peer device.
-**
-**
-** Returns AVCT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_CreateBrowse
+ *
+ * Description Create an AVCTP Browse channel. There are two types of
+ * connections, initiator and acceptor, as determined by
+ * 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
+ * passively for an incoming AVCTP connection from a peer device.
+ *
+ *
+ * Returns AVCT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVCT_CreateBrowse (uint8_t handle, uint8_t role)
{
uint16_t result = AVCT_SUCCESS;
@@ -296,18 +296,18 @@
}
/*******************************************************************************
-**
-** Function AVCT_RemoveBrowse
-**
-** Description Remove an AVCTP Browse channel. This function is called when
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_RemoveBrowse
+ *
+ * Description Remove an AVCTP Browse channel. This function is called when
+ * 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.
+ *
+ ******************************************************************************/
uint16_t AVCT_RemoveBrowse (uint8_t handle)
{
uint16_t result = AVCT_SUCCESS;
@@ -331,15 +331,15 @@
}
/*******************************************************************************
-**
-** Function AVCT_GetBrowseMtu
-**
-** Description Get the peer_mtu for the AVCTP Browse channel of the given
-** connection.
-**
-** Returns the peer browsing channel MTU.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_GetBrowseMtu
+ *
+ * Description Get the peer_mtu for the AVCTP Browse channel of the given
+ * connection.
+ *
+ * Returns the peer browsing channel MTU.
+ *
+ ******************************************************************************/
uint16_t AVCT_GetBrowseMtu (uint8_t handle)
{
uint16_t peer_mtu = AVCT_MIN_BROWSE_MTU;
@@ -355,15 +355,15 @@
}
/*******************************************************************************
-**
-** Function AVCT_GetPeerMtu
-**
-** Description Get the peer_mtu for the AVCTP channel of the given
-** connection.
-**
-** Returns the peer MTU size.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_GetPeerMtu
+ *
+ * Description Get the peer_mtu for the AVCTP channel of the given
+ * connection.
+ *
+ * Returns the peer MTU size.
+ *
+ ******************************************************************************/
uint16_t AVCT_GetPeerMtu (uint8_t handle)
{
uint16_t peer_mtu = L2CAP_DEFAULT_MTU;
@@ -383,26 +383,26 @@
}
/*******************************************************************************
-**
-** Function AVCT_MsgReq
-**
-** Description Send an AVCTP message to a peer device. In calling
-** AVCT_MsgReq(), the application should keep track of the
-** congestion state of AVCTP as communicated with events
-** AVCT_CONG_IND_EVT and AVCT_UNCONG_IND_EVT. If the
-** application calls AVCT_MsgReq() when AVCTP is congested
-** the message may be discarded. The application may make its
-** first call to AVCT_MsgReq() after it receives an
-** AVCT_CONNECT_CFM_EVT or AVCT_CONNECT_IND_EVT on control channel or
-** AVCT_BROWSE_CONN_CFM_EVT or AVCT_BROWSE_CONN_IND_EVT on browsing channel.
-**
-** p_msg->layer_specific must be set to
-** AVCT_DATA_CTRL for control channel traffic;
-** AVCT_DATA_BROWSE for for browse channel traffic.
-**
-** Returns AVCT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_MsgReq
+ *
+ * Description Send an AVCTP message to a peer device. In calling
+ * AVCT_MsgReq(), the application should keep track of the
+ * congestion state of AVCTP as communicated with events
+ * AVCT_CONG_IND_EVT and AVCT_UNCONG_IND_EVT. If the
+ * application calls AVCT_MsgReq() when AVCTP is congested
+ * the message may be discarded. The application may make its
+ * first call to AVCT_MsgReq() after it receives an
+ * AVCT_CONNECT_CFM_EVT or AVCT_CONNECT_IND_EVT on control channel or
+ * AVCT_BROWSE_CONN_CFM_EVT or AVCT_BROWSE_CONN_IND_EVT on browsing channel.
+ *
+ * p_msg->layer_specific must be set to
+ * AVCT_DATA_CTRL for control channel traffic;
+ * AVCT_DATA_BROWSE for for browse channel traffic.
+ *
+ * Returns AVCT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR *p_msg)
{
uint16_t result = AVCT_SUCCESS;
diff --git a/stack/avct/avct_bcb_act.cc b/stack/avct/avct_bcb_act.cc
index 903c3f7..cf4c99e 100644
--- a/stack/avct/avct_bcb_act.cc
+++ b/stack/avct/avct_bcb_act.cc
@@ -23,7 +23,7 @@
* Description: This module contains action functions of the browsing control
* state machine.
*
-******************************************************************************/
+ *****************************************************************************/
#include <string.h>
@@ -56,16 +56,16 @@
/*******************************************************************************
-**
-** Function avct_bcb_msg_asmbl
-**
-** Description Reassemble incoming message.
-**
-**
-** Returns Pointer to reassembled message; NULL if no message
-** available.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_msg_asmbl
+ *
+ * Description Reassemble incoming message.
+ *
+ *
+ * Returns Pointer to reassembled message; NULL if no message
+ * available.
+ *
+ ******************************************************************************/
static BT_HDR *avct_bcb_msg_asmbl(UNUSED_ATTR tAVCT_BCB *p_bcb, BT_HDR *p_buf)
{
uint8_t *p;
@@ -86,15 +86,15 @@
/*******************************************************************************
-**
-** Function avct_bcb_chnl_open
-**
-** Description Open L2CAP channel to peer
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_chnl_open
+ *
+ * Description Open L2CAP channel to peer
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_chnl_open(tAVCT_BCB *p_bcb,
UNUSED_ATTR tAVCT_LCB_EVT *p_data)
{
@@ -123,15 +123,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_unbind_disc
-**
-** Description call callback with disconnect event.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_unbind_disc
+ *
+ * Description call callback with disconnect event.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_unbind_disc(UNUSED_ATTR tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
p_data->p_ccb->p_bcb = NULL;
@@ -140,18 +140,18 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_open_ind
-**
-** Description Handle an LL_OPEN event.
-** For the allocated ccb already bound to the bcb, send a connect event.
-** For the unbound ccb with a new PID, bind that ccb to the bcb with the
-** same bd_addr and send a connect event.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_open_ind
+ *
+ * Description Handle an LL_OPEN event.
+ * For the allocated ccb already bound to the bcb, send a connect event.
+ * For the unbound ccb with a new PID, bind that ccb to the bcb with the
+ * same bd_addr and send a connect event.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_open_ind(tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -211,16 +211,16 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_open_fail
-**
-** Description L2CAP channel open attempt failed. Mark the ccbs
-** as NULL bcb.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_open_fail
+ *
+ * Description L2CAP channel open attempt failed. Mark the ccbs
+ * as NULL bcb.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_open_fail(tAVCT_BCB *p_bcb,
UNUSED_ATTR tAVCT_LCB_EVT *p_data)
{
@@ -236,16 +236,16 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_close_ind
-**
-** Description L2CAP channel closed by peer. Deallocate any initiator
-** ccbs on this lcb and send disconnect ind event.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_close_ind
+ *
+ * Description L2CAP channel closed by peer. Deallocate any initiator
+ * ccbs on this lcb and send disconnect ind event.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_close_ind(tAVCT_BCB *p_bcb,
UNUSED_ATTR tAVCT_LCB_EVT *p_data)
{
@@ -272,16 +272,16 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_close_cfm
-**
-** Description L2CAP channel closed by us. Deallocate any initiator
-** ccbs on this lcb and send disconnect ind or cfm event.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_close_cfm
+ *
+ * Description L2CAP channel closed by us. Deallocate any initiator
+ * ccbs on this lcb and send disconnect ind or cfm event.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_close_cfm(tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -316,15 +316,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_bind_conn
-**
-** Description Bind ccb to lcb and send connect cfm event.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_bind_conn
+ *
+ * Description Bind ccb to lcb and send connect cfm event.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_bind_conn(tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_LCB *p_lcb = avct_lcb_by_bcb(p_bcb);
@@ -334,17 +334,17 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_chk_disc
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_chk_disc
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avct_bcb_chk_disc(tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
p_bcb->ch_close = avct_bcb_get_last_ccb_index(p_bcb, p_data->p_ccb);
@@ -358,15 +358,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_chnl_disc
-**
-** Description Disconnect L2CAP channel.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_chnl_disc
+ *
+ * Description Disconnect L2CAP channel.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_chnl_disc(tAVCT_BCB *p_bcb,
UNUSED_ATTR tAVCT_LCB_EVT *p_data)
{
@@ -374,16 +374,16 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_bind_fail
-**
-** Description Deallocate ccb and call callback with connect event
-** with failure result.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_bind_fail
+ *
+ * Description Deallocate ccb and call callback with connect event
+ * with failure result.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_bind_fail(UNUSED_ATTR tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
p_data->p_ccb->p_bcb = NULL;
@@ -392,15 +392,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_cong_ind
-**
-** Description Handle congestion indication from L2CAP.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_cong_ind
+ *
+ * Description Handle congestion indication from L2CAP.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_cong_ind(tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -422,15 +422,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_discard_msg
-**
-** Description Discard a message sent in from the API.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_discard_msg
+ *
+ * Description Discard a message sent in from the API.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_discard_msg(tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
osi_free_and_reset((void **)&p_bcb->p_tx_msg);
@@ -456,15 +456,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_send_msg
-**
-** Description Build and send an AVCTP message.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_send_msg
+ *
+ * Description Build and send an AVCTP message.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_send_msg(tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
uint16_t curr_msg_len;
@@ -505,15 +505,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_free_msg_ind
-**
-** Description Discard an incoming AVCTP message.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_free_msg_ind
+ *
+ * Description Discard an incoming AVCTP message.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_free_msg_ind(UNUSED_ATTR tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
if (p_data)
@@ -521,15 +521,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_msg_ind
-**
-** Description Handle an incoming AVCTP message.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_msg_ind
+ *
+ * Description Handle an incoming AVCTP message.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_msg_ind(tAVCT_BCB *p_bcb, tAVCT_LCB_EVT *p_data)
{
uint8_t *p;
@@ -600,15 +600,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_dealloc
-**
-** Description Deallocate a browse control block.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_dealloc
+ *
+ * Description Deallocate a browse control block.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avct_bcb_dealloc(tAVCT_BCB *p_bcb,
UNUSED_ATTR tAVCT_LCB_EVT *p_data)
{
@@ -633,15 +633,15 @@
}
/*******************************************************************************
-**
-** Function avct_close_bcb
-**
-** Description this function is called right before LCB disconnects.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_close_bcb
+ *
+ * Description this function is called right before LCB disconnects.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_close_bcb(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_BCB *p_bcb = avct_bcb_by_lcb(p_lcb);
@@ -653,43 +653,43 @@
/*******************************************************************************
-**
-** Function avct_lcb_by_bcb
-**
-** Description This lookup function finds the lcb for a bcb.
-**
-** Returns pointer to the lcb.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_by_bcb
+ *
+ * Description This lookup function finds the lcb for a bcb.
+ *
+ * Returns pointer to the lcb.
+ *
+ ******************************************************************************/
tAVCT_LCB *avct_lcb_by_bcb(tAVCT_BCB *p_bcb)
{
return &avct_cb.lcb[p_bcb->allocated - 1];
}
/*******************************************************************************
-**
-** Function avct_bcb_by_lcb
-**
-** Description This lookup function finds the bcb for a lcb.
-**
-** Returns pointer to the lcb.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_by_lcb
+ *
+ * Description This lookup function finds the bcb for a lcb.
+ *
+ * Returns pointer to the lcb.
+ *
+ ******************************************************************************/
tAVCT_BCB *avct_bcb_by_lcb(tAVCT_LCB *p_lcb)
{
return &avct_cb.bcb[p_lcb->allocated - 1];
}
/*******************************************************************************
-**
-** Function avct_bcb_get_last_ccb_index
-**
-** Description See if given ccb is only one on the bcb.
-**
-**
-** Returns 0, if ccb is last, (ccb index + 1) otherwise.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_get_last_ccb_index
+ *
+ * Description See if given ccb is only one on the bcb.
+ *
+ *
+ * Returns 0, if ccb is last, (ccb index + 1) otherwise.
+ *
+ ******************************************************************************/
uint8_t avct_bcb_get_last_ccb_index(tAVCT_BCB *p_bcb, tAVCT_CCB *p_ccb_last)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -708,15 +708,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_by_lcid
-**
-** Description Find the BCB associated with the L2CAP LCID
-**
-**
-** Returns pointer to the lcb, or NULL if none found.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_by_lcid
+ *
+ * Description Find the BCB associated with the L2CAP LCID
+ *
+ *
+ * Returns pointer to the lcb, or NULL if none found.
+ *
+ ******************************************************************************/
tAVCT_BCB *avct_bcb_by_lcid(uint16_t lcid)
{
tAVCT_BCB *p_bcb = &avct_cb.bcb[0];
diff --git a/stack/avct/avct_ccb.cc b/stack/avct/avct_ccb.cc
index 7516853..e336213 100644
--- a/stack/avct/avct_ccb.cc
+++ b/stack/avct/avct_ccb.cc
@@ -30,15 +30,15 @@
#include "avct_int.h"
/*******************************************************************************
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ ******************************************************************************/
tAVCT_CCB *avct_ccb_alloc(tAVCT_CC *p_cc)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -65,16 +65,16 @@
}
/*******************************************************************************
-**
-** Function avct_ccb_dealloc
-**
-** Description Deallocate a connection control block and call application
-** callback.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avct_ccb_dealloc
+ *
+ * Description Deallocate a connection control block and call application
+ * callback.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avct_ccb_dealloc(tAVCT_CCB *p_ccb, uint8_t event, uint16_t result, BD_ADDR bd_addr)
{
tAVCT_CTRL_CBACK *p_cback = p_ccb->cc.p_ctrl_cback;
@@ -99,15 +99,15 @@
}
/*******************************************************************************
-**
-** Function avct_ccb_to_idx
-**
-** Description Given a pointer to an ccb, return its index.
-**
-**
-** Returns Index of ccb.
-**
-*******************************************************************************/
+ *
+ * Function avct_ccb_to_idx
+ *
+ * Description Given a pointer to an ccb, return its index.
+ *
+ *
+ * Returns Index of ccb.
+ *
+ ******************************************************************************/
uint8_t avct_ccb_to_idx(tAVCT_CCB *p_ccb)
{
/* use array arithmetic to determine index */
@@ -115,15 +115,15 @@
}
/*******************************************************************************
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ ******************************************************************************/
tAVCT_CCB *avct_ccb_by_idx(uint8_t idx)
{
tAVCT_CCB *p_ccb;
diff --git a/stack/avct/avct_defs.h b/stack/avct/avct_defs.h
index c149d04..3784672 100644
--- a/stack/avct/avct_defs.h
+++ b/stack/avct/avct_defs.h
@@ -26,8 +26,8 @@
#define AVCT_DEFS_H
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* packet type */
#define AVCT_PKT_TYPE_SINGLE 0 /* single packet */
@@ -45,8 +45,8 @@
#define AVCT_CR_IPID_INVALID 1
/*****************************************************************************
-** message parsing and building macros
-*****************************************************************************/
+ * message parsing and building macros
+ ****************************************************************************/
#define AVCT_BUILD_HDR(p, label, type, cr_ipid) \
*(p)++ = ((label) << 4) | ((type) << 2) | (cr_ipid);
diff --git a/stack/avct/avct_int.h b/stack/avct/avct_int.h
index 6d9fe4a..21f6aa0 100644
--- a/stack/avct/avct_int.h
+++ b/stack/avct/avct_int.h
@@ -35,8 +35,8 @@
#endif
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* lcb state machine events */
enum {
@@ -61,8 +61,8 @@
#define AVCT_NO_EVT 0xFF
/*****************************************************************************
-** data types
-*****************************************************************************/
+ * data types
+ ****************************************************************************/
/* sub control block type - common data members for tAVCT_LCB and tAVCT_BCB */
typedef struct {
uint16_t peer_mtu; /* peer l2c mtu */
@@ -144,8 +144,8 @@
} tAVCT_CB;
/*****************************************************************************
-** function declarations
-*****************************************************************************/
+ * function declarations
+ ****************************************************************************/
/* LCB function declarations */
extern void avct_lcb_event(tAVCT_LCB *p_lcb, uint8_t event, tAVCT_LCB_EVT *p_data);
@@ -211,8 +211,8 @@
/*****************************************************************************
-** global data
-*****************************************************************************/
+ * global data
+ ****************************************************************************/
/* Main control block */
extern tAVCT_CB avct_cb;
diff --git a/stack/avct/avct_l2c.cc b/stack/avct/avct_l2c.cc
index 07358ee..cac13ab 100644
--- a/stack/avct/avct_l2c.cc
+++ b/stack/avct/avct_l2c.cc
@@ -62,15 +62,15 @@
};
/*******************************************************************************
-**
-** Function avct_l2c_is_passive
-**
-** Description check is the CCB associated with the given LCB was created
-** as passive
-**
-** Returns true, if the given LCB is created as AVCT_PASSIVE
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_is_passive
+ *
+ * Description check is the CCB associated with the given LCB was created
+ * as passive
+ *
+ * Returns true, if the given LCB is created as AVCT_PASSIVE
+ *
+ ******************************************************************************/
static bool avct_l2c_is_passive (tAVCT_LCB *p_lcb)
{
bool is_passive = false;
@@ -93,15 +93,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_connect_ind_cback
-**
-** Description This is the L2CAP connect indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_connect_ind_cback
+ *
+ * Description This is the L2CAP connect indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_connect_ind_cback(BD_ADDR bd_addr, uint16_t lcid,
UNUSED_ATTR uint16_t psm, uint8_t id)
{
@@ -167,15 +167,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_connect_cfm_cback
-**
-** Description This is the L2CAP connect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_connect_cfm_cback
+ *
+ * Description This is the L2CAP connect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_connect_cfm_cback(uint16_t lcid, uint16_t result)
{
tAVCT_LCB *p_lcb;
@@ -229,15 +229,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_config_cfm_cback
-**
-** Description This is the L2CAP config confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_config_cfm_cback
+ *
+ * Description This is the L2CAP config confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_config_cfm_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tAVCT_LCB *p_lcb;
@@ -280,15 +280,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_config_ind_cback
-**
-** Description This is the L2CAP config indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_config_ind_cback
+ *
+ * Description This is the L2CAP config indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tAVCT_LCB *p_lcb;
@@ -331,15 +331,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_disconnect_ind_cback
-**
-** Description This is the L2CAP disconnect indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_disconnect_ind_cback
+ *
+ * Description This is the L2CAP disconnect indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_disconnect_ind_cback(uint16_t lcid, bool ack_needed)
{
tAVCT_LCB *p_lcb;
@@ -362,15 +362,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_disconnect_cfm_cback
-**
-** Description This is the L2CAP disconnect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_disconnect_cfm_cback
+ *
+ * Description This is the L2CAP disconnect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_disconnect_cfm_cback(uint16_t lcid, uint16_t result)
{
tAVCT_LCB *p_lcb;
@@ -392,15 +392,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_congestion_ind_cback
-**
-** Description This is the L2CAP congestion indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_congestion_ind_cback
+ *
+ * Description This is the L2CAP congestion indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_congestion_ind_cback(uint16_t lcid, bool is_congested)
{
tAVCT_LCB *p_lcb;
@@ -415,15 +415,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_data_ind_cback
-**
-** Description This is the L2CAP data indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_data_ind_cback
+ *
+ * Description This is the L2CAP data indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_data_ind_cback(uint16_t lcid, BT_HDR *p_buf)
{
tAVCT_LCB *p_lcb;
diff --git a/stack/avct/avct_l2c_br.cc b/stack/avct/avct_l2c_br.cc
index b60510d..f1429d1 100644
--- a/stack/avct/avct_l2c_br.cc
+++ b/stack/avct/avct_l2c_br.cc
@@ -17,12 +17,12 @@
******************************************************************************/
/*****************************************************************************
-**
-** Name: avct_l2c_br.cc
-**
-** Description: This AVCTP module interfaces to L2CAP
-**
-******************************************************************************/
+ *
+ * Name: avct_l2c_br.cc
+ *
+ * Description: This AVCTP module interfaces to L2CAP
+ *
+ *****************************************************************************/
#include <string.h>
#include "bt_target.h"
@@ -103,15 +103,15 @@
};
/*******************************************************************************
-**
-** Function avct_l2c_br_connect_ind_cback
-**
-** Description This is the L2CAP connect indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_br_connect_ind_cback
+ *
+ * Description This is the L2CAP connect indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_br_connect_ind_cback(BD_ADDR bd_addr, uint16_t lcid,
UNUSED_ATTR uint16_t psm, uint8_t id)
{
@@ -172,15 +172,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_br_connect_cfm_cback
-**
-** Description This is the L2CAP connect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_br_connect_cfm_cback
+ *
+ * Description This is the L2CAP connect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_br_connect_cfm_cback(uint16_t lcid, uint16_t result)
{
tAVCT_BCB *p_lcb;
@@ -215,15 +215,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_br_config_cfm_cback
-**
-** Description This is the L2CAP config confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_br_config_cfm_cback
+ *
+ * Description This is the L2CAP config confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_br_config_cfm_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tAVCT_BCB *p_lcb;
@@ -258,15 +258,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_br_config_ind_cback
-**
-** Description This is the L2CAP config indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_br_config_ind_cback
+ *
+ * Description This is the L2CAP config indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_br_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tAVCT_BCB *p_lcb;
@@ -337,15 +337,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_br_disconnect_ind_cback
-**
-** Description This is the L2CAP disconnect indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_br_disconnect_ind_cback
+ *
+ * Description This is the L2CAP disconnect indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_br_disconnect_ind_cback(uint16_t lcid, bool ack_needed)
{
tAVCT_BCB *p_lcb;
@@ -366,15 +366,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_br_disconnect_cfm_cback
-**
-** Description This is the L2CAP disconnect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_br_disconnect_cfm_cback
+ *
+ * Description This is the L2CAP disconnect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_br_disconnect_cfm_cback(uint16_t lcid, uint16_t result)
{
tAVCT_BCB *p_lcb;
@@ -393,15 +393,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_br_congestion_ind_cback
-**
-** Description This is the L2CAP congestion indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_br_congestion_ind_cback
+ *
+ * Description This is the L2CAP congestion indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_br_congestion_ind_cback(uint16_t lcid, bool is_congested)
{
tAVCT_BCB *p_lcb;
@@ -415,15 +415,15 @@
}
/*******************************************************************************
-**
-** Function avct_l2c_br_data_ind_cback
-**
-** Description This is the L2CAP data indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avct_l2c_br_data_ind_cback
+ *
+ * Description This is the L2CAP data indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avct_l2c_br_data_ind_cback(uint16_t lcid, BT_HDR *p_buf)
{
tAVCT_BCB *p_lcb;
diff --git a/stack/avct/avct_lcb.cc b/stack/avct/avct_lcb.cc
index 21f1122..7db6f4b 100644
--- a/stack/avct/avct_lcb.cc
+++ b/stack/avct/avct_lcb.cc
@@ -33,8 +33,8 @@
#include "osi/include/osi.h"
/*****************************************************************************
-** state machine constants and types
-*****************************************************************************/
+ * state machine constants and types
+ ****************************************************************************/
/* verbose state strings for trace */
const char * const avct_lcb_st_str[] = {
@@ -179,15 +179,15 @@
};
/*******************************************************************************
-**
-** Function avct_lcb_event
-**
-** Description State machine event handling function for lcb
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_event
+ *
+ * Description State machine event handling function for lcb
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_event(tAVCT_LCB *p_lcb, uint8_t event, tAVCT_LCB_EVT *p_data)
{
tAVCT_LCB_ST_TBL state_table;
@@ -218,15 +218,15 @@
}
/*******************************************************************************
-**
-** Function avct_bcb_event
-**
-** Description State machine event handling function for lcb
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_bcb_event
+ *
+ * Description State machine event handling function for lcb
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_bcb_event(tAVCT_BCB *p_bcb, uint8_t event, tAVCT_LCB_EVT *p_data)
{
tAVCT_LCB_ST_TBL state_table;
@@ -257,15 +257,15 @@
}
/*******************************************************************************
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ ******************************************************************************/
tAVCT_LCB *avct_lcb_by_bd(BD_ADDR bd_addr)
{
tAVCT_LCB *p_lcb = &avct_cb.lcb[0];
@@ -292,15 +292,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_alloc
-**
-** Description Allocate a link control block.
-**
-**
-** Returns pointer to the lcb, or NULL if none could be allocated.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_alloc
+ *
+ * Description Allocate a link control block.
+ *
+ *
+ * Returns pointer to the lcb, or NULL if none could be allocated.
+ *
+ ******************************************************************************/
tAVCT_LCB *avct_lcb_alloc(BD_ADDR bd_addr)
{
tAVCT_LCB *p_lcb = &avct_cb.lcb[0];
@@ -328,15 +328,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_dealloc
-**
-** Description Deallocate a link control block.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_dealloc
+ *
+ * Description Deallocate a link control block.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avct_lcb_dealloc(tAVCT_LCB *p_lcb,
UNUSED_ATTR tAVCT_LCB_EVT *p_data)
{
@@ -363,15 +363,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_by_lcid
-**
-** Description Find the LCB associated with the L2CAP LCID
-**
-**
-** Returns pointer to the lcb, or NULL if none found.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_by_lcid
+ *
+ * Description Find the LCB associated with the L2CAP LCID
+ *
+ *
+ * Returns pointer to the lcb, or NULL if none found.
+ *
+ ******************************************************************************/
tAVCT_LCB *avct_lcb_by_lcid(uint16_t lcid)
{
tAVCT_LCB *p_lcb = &avct_cb.lcb[0];
@@ -396,15 +396,15 @@
}
/*******************************************************************************
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ ******************************************************************************/
tAVCT_CCB *avct_lcb_has_pid(tAVCT_LCB *p_lcb, uint16_t pid)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -421,15 +421,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_last_ccb
-**
-** Description See if given ccb is only one on the lcb.
-**
-**
-** Returns true if ccb is last, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_last_ccb
+ *
+ * Description See if given ccb is only one on the lcb.
+ *
+ *
+ * Returns true if ccb is last, false otherwise.
+ *
+ ******************************************************************************/
bool avct_lcb_last_ccb(tAVCT_LCB *p_lcb, tAVCT_CCB *p_ccb_last)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
diff --git a/stack/avct/avct_lcb_act.cc b/stack/avct/avct_lcb_act.cc
index 6dfbb40..afb53f6 100644
--- a/stack/avct/avct_lcb_act.cc
+++ b/stack/avct/avct_lcb_act.cc
@@ -41,16 +41,16 @@
};
/*******************************************************************************
-**
-** Function avct_lcb_msg_asmbl
-**
-** Description Reassemble incoming message.
-**
-**
-** Returns Pointer to reassembled message; NULL if no message
-** available.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_msg_asmbl
+ *
+ * Description Reassemble incoming message.
+ *
+ *
+ * Returns Pointer to reassembled message; NULL if no message
+ * available.
+ *
+ ******************************************************************************/
static BT_HDR *avct_lcb_msg_asmbl(tAVCT_LCB *p_lcb, BT_HDR *p_buf)
{
uint8_t *p;
@@ -171,15 +171,15 @@
/*******************************************************************************
-**
-** Function avct_lcb_chnl_open
-**
-** Description Open L2CAP channel to peer
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_chnl_open
+ *
+ * Description Open L2CAP channel to peer
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_chnl_open(tAVCT_LCB *p_lcb,
UNUSED_ATTR tAVCT_LCB_EVT *p_data)
{
@@ -197,33 +197,33 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_unbind_disc
-**
-** Description Deallocate ccb and call callback with disconnect event.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_unbind_disc
+ *
+ * Description Deallocate ccb and call callback with disconnect event.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_unbind_disc(UNUSED_ATTR tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
avct_ccb_dealloc(p_data->p_ccb, AVCT_DISCONNECT_CFM_EVT, 0, NULL);
}
/*******************************************************************************
-**
-** Function avct_lcb_open_ind
-**
-** Description Handle an LL_OPEN event. For each allocated ccb already
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_open_ind
+ *
+ * Description Handle an LL_OPEN event. For each allocated ccb already
+ * 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.
+ *
+ ******************************************************************************/
void avct_lcb_open_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -265,16 +265,16 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_open_fail
-**
-** Description L2CAP channel open attempt failed. Deallocate any ccbs
-** on this lcb and send connect confirm event with failure.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_open_fail
+ *
+ * Description L2CAP channel open attempt failed. Deallocate any ccbs
+ * on this lcb and send connect confirm event with failure.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_open_fail(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -291,16 +291,16 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_close_ind
-**
-** Description L2CAP channel closed by peer. Deallocate any initiator
-** ccbs on this lcb and send disconnect ind event.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_close_ind
+ *
+ * Description L2CAP channel closed by peer. Deallocate any initiator
+ * ccbs on this lcb and send disconnect ind event.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_close_ind(tAVCT_LCB *p_lcb,
UNUSED_ATTR tAVCT_LCB_EVT *p_data)
{
@@ -327,16 +327,16 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_close_cfm
-**
-** Description L2CAP channel closed by us. Deallocate any initiator
-** ccbs on this lcb and send disconnect ind or cfm event.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_close_cfm
+ *
+ * Description L2CAP channel closed by us. Deallocate any initiator
+ * ccbs on this lcb and send disconnect ind or cfm event.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_close_cfm(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -373,15 +373,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_bind_conn
-**
-** Description Bind ccb to lcb and send connect cfm event.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_bind_conn
+ *
+ * Description Bind ccb to lcb and send connect cfm event.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_bind_conn(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
p_data->p_ccb->p_lcb = p_lcb;
@@ -390,17 +390,17 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_chk_disc
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_chk_disc
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avct_lcb_chk_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
AVCT_TRACE_WARNING("%s", __func__);
@@ -420,15 +420,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_chnl_disc
-**
-** Description Disconnect L2CAP channel.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_chnl_disc
+ *
+ * Description Disconnect L2CAP channel.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_chnl_disc(tAVCT_LCB *p_lcb,
UNUSED_ATTR tAVCT_LCB_EVT *p_data)
{
@@ -436,31 +436,31 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_bind_fail
-**
-** Description Deallocate ccb and call callback with connect event
-** with failure result.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_bind_fail
+ *
+ * Description Deallocate ccb and call callback with connect event
+ * with failure result.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_bind_fail(UNUSED_ATTR tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
avct_ccb_dealloc(p_data->p_ccb, AVCT_CONNECT_CFM_EVT, AVCT_RESULT_FAIL, NULL);
}
/*******************************************************************************
-**
-** Function avct_lcb_cong_ind
-**
-** Description Handle congestion indication from L2CAP.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_cong_ind
+ *
+ * Description Handle congestion indication from L2CAP.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_cong_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
@@ -494,15 +494,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_discard_msg
-**
-** Description Discard a message sent in from the API.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_discard_msg
+ *
+ * Description Discard a message sent in from the API.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_discard_msg(UNUSED_ATTR tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
AVCT_TRACE_WARNING("%s Dropping message", __func__);
@@ -510,15 +510,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_send_msg
-**
-** Description Build and send an AVCTP message.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_send_msg
+ *
+ * Description Build and send an AVCTP message.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_send_msg(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
uint16_t curr_msg_len;
@@ -623,15 +623,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_free_msg_ind
-**
-** Description Discard an incoming AVCTP message.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_free_msg_ind
+ *
+ * Description Discard an incoming AVCTP message.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_free_msg_ind(UNUSED_ATTR tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
if (p_data == NULL)
@@ -641,15 +641,15 @@
}
/*******************************************************************************
-**
-** Function avct_lcb_msg_ind
-**
-** Description Handle an incoming AVCTP message.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avct_lcb_msg_ind
+ *
+ * Description Handle an incoming AVCTP message.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avct_lcb_msg_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
uint8_t *p;
diff --git a/stack/avdt/avdt_ad.cc b/stack/avdt/avdt_ad.cc
index 35e5d7c..5521492 100644
--- a/stack/avdt/avdt_ad.cc
+++ b/stack/avdt/avdt_ad.cc
@@ -37,15 +37,15 @@
/*******************************************************************************
-**
-** Function avdt_ad_type_to_tcid
-**
-** Description Derives the TCID from the channel type and SCB.
-**
-**
-** Returns TCID value.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_type_to_tcid
+ *
+ * Description Derives the TCID from the channel type and SCB.
+ *
+ *
+ * Returns TCID value.
+ *
+ ******************************************************************************/
uint8_t avdt_ad_type_to_tcid(uint8_t type, tAVDT_SCB *p_scb)
{
uint8_t scb_idx;
@@ -65,15 +65,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ad_tcid_to_type
-**
-** Description Derives the channel type from the TCID.
-**
-**
-** Returns Channel type value.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tcid_to_type
+ *
+ * Description Derives the channel type from the TCID.
+ *
+ *
+ * Returns Channel type value.
+ *
+ ******************************************************************************/
static uint8_t avdt_ad_tcid_to_type(uint8_t tcid)
{
uint8_t type;
@@ -97,15 +97,15 @@
/*******************************************************************************
-**
-** Function avdt_ad_init
-**
-** Description Initialize adaption layer.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_init
+ *
+ * Description Initialize adaption layer.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_ad_init(void)
{
int i;
@@ -121,18 +121,18 @@
/*******************************************************************************
-**
-** Function avdt_ad_tc_tbl_by_st
-**
-** 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
-** first matching entry (there could be more than one).
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tc_tbl_by_st
+ *
+ * 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
+ * first matching entry (there could be more than one).
+ *
+ ******************************************************************************/
tAVDT_TC_TBL *avdt_ad_tc_tbl_by_st(uint8_t type, tAVDT_CCB *p_ccb, uint8_t state)
{
int i;
@@ -192,15 +192,15 @@
/*******************************************************************************
-**
-** Function avdt_ad_tc_tbl_by_lcid
-**
-** Description Find adaption layer transport channel table entry by LCID.
-**
-**
-** Returns Pointer to entry.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tc_tbl_by_lcid
+ *
+ * Description Find adaption layer transport channel table entry by LCID.
+ *
+ *
+ * Returns Pointer to entry.
+ *
+ ******************************************************************************/
tAVDT_TC_TBL *avdt_ad_tc_tbl_by_lcid(uint16_t lcid)
{
uint8_t idx;
@@ -219,16 +219,16 @@
/*******************************************************************************
-**
-** Function avdt_ad_tc_tbl_by_type
-**
-** Description This function retrieves the transport channel table entry
-** for a particular channel.
-**
-**
-** Returns Pointer to transport channel table entry.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tc_tbl_by_type
+ *
+ * Description This function retrieves the transport channel table entry
+ * for a particular channel.
+ *
+ *
+ * Returns Pointer to transport channel table entry.
+ *
+ ******************************************************************************/
tAVDT_TC_TBL *avdt_ad_tc_tbl_by_type(uint8_t type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb)
{
uint8_t tcid;
@@ -254,15 +254,15 @@
/*******************************************************************************
-**
-** Function avdt_ad_tc_tbl_alloc
-**
-** Description Allocate an entry in the traffic channel table.
-**
-**
-** Returns Pointer to entry.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tc_tbl_alloc
+ *
+ * Description Allocate an entry in the traffic channel table.
+ *
+ *
+ * Returns Pointer to entry.
+ *
+ ******************************************************************************/
tAVDT_TC_TBL *avdt_ad_tc_tbl_alloc(tAVDT_CCB *p_ccb)
{
int i;
@@ -291,15 +291,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ad_tc_tbl_to_idx
-**
-** Description Convert a transport channel table entry to an index.
-**
-**
-** Returns Index value.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tc_tbl_to_idx
+ *
+ * Description Convert a transport channel table entry to an index.
+ *
+ *
+ * Returns Index value.
+ *
+ ******************************************************************************/
uint8_t avdt_ad_tc_tbl_to_idx(tAVDT_TC_TBL *p_tbl)
{
AVDT_TRACE_DEBUG("avdt_ad_tc_tbl_to_idx: %d", (p_tbl - avdt_cb.ad.tc_tbl));
@@ -308,19 +308,19 @@
}
/*******************************************************************************
-**
-** Function avdt_ad_tc_close_ind
-**
-** Description This function is called by the L2CAP interface when the
-** L2CAP channel is closed. It looks up the CCB or SCB for
-** the channel and sends it a close event. The reason
-** parameter is the same value passed by the L2CAP
-** callback function.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tc_close_ind
+ *
+ * Description This function is called by the L2CAP interface when the
+ * L2CAP channel is closed. It looks up the CCB or SCB for
+ * the channel and sends it a close event. The reason
+ * parameter is the same value passed by the L2CAP
+ * callback function.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_ad_tc_close_ind(tAVDT_TC_TBL *p_tbl,
UNUSED_ATTR uint16_t reason)
{
@@ -357,17 +357,17 @@
}
/*******************************************************************************
-**
-** Function avdt_ad_tc_open_ind
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tc_open_ind
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ad_tc_open_ind(tAVDT_TC_TBL *p_tbl)
{
tAVDT_CCB *p_ccb;
@@ -412,19 +412,19 @@
/*******************************************************************************
-**
-** Function avdt_ad_tc_cong_ind
-**
-** Description This function is called by the L2CAP interface layer when
-** L2CAP calls the congestion callback. It looks up the CCB
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tc_cong_ind
+ *
+ * Description This function is called by the L2CAP interface layer when
+ * L2CAP calls the congestion callback. It looks up the CCB
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ad_tc_cong_ind(tAVDT_TC_TBL *p_tbl, bool is_congested)
{
tAVDT_CCB *p_ccb;
@@ -450,17 +450,17 @@
/*******************************************************************************
-**
-** Function avdt_ad_tc_data_ind
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_tc_data_ind
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ad_tc_data_ind(tAVDT_TC_TBL *p_tbl, BT_HDR *p_buf)
{
tAVDT_CCB *p_ccb;
@@ -493,20 +493,20 @@
}
/*******************************************************************************
-**
-** Function avdt_ad_write_req
-**
-** Description This function is called by a CCB or SCB to send data to a
-** 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
-** AVDT_AD_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_write_req
+ *
+ * Description This function is called by a CCB or SCB to send data to a
+ * 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
+ * AVDT_AD_FAILED, if error
+ *
+ ******************************************************************************/
uint8_t avdt_ad_write_req(uint8_t type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, BT_HDR *p_buf)
{
uint8_t tcid;
@@ -520,21 +520,21 @@
/*******************************************************************************
-**
-** Function avdt_ad_open_req
-**
-** Description This function is called by a CCB or SCB to open a transport
-** channel. This function allocates and initializes a
-** transport channel table entry. The channel can be opened
-** in two roles: as an initiator or acceptor. When opened
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_open_req
+ *
+ * Description This function is called by a CCB or SCB to open a transport
+ * channel. This function allocates and initializes a
+ * transport channel table entry. The channel can be opened
+ * in two roles: as an initiator or acceptor. When opened
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ad_open_req(uint8_t type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, uint8_t role)
{
tAVDT_TC_TBL *p_tbl;
@@ -604,17 +604,17 @@
}
/*******************************************************************************
-**
-** Function avdt_ad_close_req
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ad_close_req
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ad_close_req(uint8_t type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb)
{
uint8_t tcid;
diff --git a/stack/avdt/avdt_api.cc b/stack/avdt/avdt_api.cc
index dd6bb7d..b2f3fd5 100644
--- a/stack/avdt/avdt_api.cc
+++ b/stack/avdt/avdt_api.cc
@@ -73,19 +73,19 @@
}
/*******************************************************************************
-**
-** Function AVDT_Register
-**
-** Description This is the system level registration function for the
-** AVDTP protocol. This function initializes AVDTP and
-** 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
-**
-*******************************************************************************/
+ *
+ * Function AVDT_Register
+ *
+ * Description This is the system level registration function for the
+ * AVDTP protocol. This function initializes AVDTP and
+ * 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
+ *
+ ******************************************************************************/
void AVDT_Register(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback)
{
/* register PSM with L2CAP */
@@ -122,18 +122,18 @@
}
/*******************************************************************************
-**
-** Function AVDT_Deregister
-**
-** Description This function is called to deregister use AVDTP protocol.
-** 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
-**
-*******************************************************************************/
+ *
+ * Function AVDT_Deregister
+ *
+ * Description This function is called to deregister use AVDTP protocol.
+ * 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
+ *
+ ******************************************************************************/
void AVDT_Deregister(void)
{
/* deregister PSM with L2CAP */
@@ -154,19 +154,19 @@
}
/*******************************************************************************
-**
-** Function AVDT_CreateStream
-**
-** Description Create a stream endpoint. After a stream endpoint is
-** created an application can initiate a connection between
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_CreateStream
+ *
+ * Description Create a stream endpoint. After a stream endpoint is
+ * created an application can initiate a connection between
+ * 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.
+ *
+ ******************************************************************************/
uint16_t AVDT_CreateStream(uint8_t *p_handle, tAVDT_CS *p_cs)
{
uint16_t result = AVDT_SUCCESS;
@@ -193,19 +193,19 @@
}
/*******************************************************************************
-**
-** Function AVDT_RemoveStream
-**
-** Description Remove a stream endpoint. This function is called when
-** the application is no longer using a stream endpoint.
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_RemoveStream
+ *
+ * Description Remove a stream endpoint. This function is called when
+ * the application is no longer using a stream endpoint.
+ * 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.
+ *
+ ******************************************************************************/
uint16_t AVDT_RemoveStream(uint8_t handle)
{
uint16_t result = AVDT_SUCCESS;
@@ -226,31 +226,31 @@
}
/*******************************************************************************
-**
-** Function AVDT_DiscoverReq
-**
-** Description This function initiates a connection to the AVDTP service
-** on the peer device, if not already present, and discovers
-** the stream endpoints on the peer device. (Please note
-** 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
-** AVDT_DiscoverReq() again to the same device until
-** discovery is complete.
-**
-** The memory addressed by sep_info is allocated by the
-** application. This memory is written to by AVDTP as part
-** of the discovery procedure. This memory must remain
-** accessible until the application receives the
-** AVDT_DISCOVER_CFM_EVT.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_DiscoverReq
+ *
+ * Description This function initiates a connection to the AVDTP service
+ * on the peer device, if not already present, and discovers
+ * the stream endpoints on the peer device. (Please note
+ * 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
+ * AVDT_DiscoverReq() again to the same device until
+ * discovery is complete.
+ *
+ * The memory addressed by sep_info is allocated by the
+ * application. This memory is written to by AVDTP as part
+ * of the discovery procedure. This memory must remain
+ * accessible until the application receives the
+ * AVDT_DISCOVER_CFM_EVT.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_DiscoverReq(BD_ADDR bd_addr, tAVDT_SEP_INFO *p_sep_info,
uint8_t max_seps, tAVDT_CTRL_CBACK *p_cback)
{
@@ -290,15 +290,15 @@
}
/*******************************************************************************
-**
-** Function avdt_get_cap_req
-**
-** Description internal function to serve both AVDT_GetCapReq and
-** AVDT_GetAllCapReq
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_get_cap_req
+ *
+ * Description internal function to serve both AVDT_GetCapReq and
+ * AVDT_GetAllCapReq
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
static uint16_t avdt_get_cap_req(BD_ADDR bd_addr, tAVDT_CCB_API_GETCAP *p_evt)
{
tAVDT_CCB *p_ccb = NULL;
@@ -341,29 +341,29 @@
}
/*******************************************************************************
-**
-** Function AVDT_GetCapReq
-**
-** Description This function initiates a connection to the AVDTP service
-** on the peer device, if not already present, and gets the
-** 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
-** AVDT_DiscoverReq() again until the procedure is complete.
-**
-** The memory pointed to by p_cfg is allocated by the
-** application. This memory is written to by AVDTP as part
-** of the get capabilities procedure. This memory must
-** remain accessible until the application receives
-** the AVDT_GETCAP_CFM_EVT.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_GetCapReq
+ *
+ * Description This function initiates a connection to the AVDTP service
+ * on the peer device, if not already present, and gets the
+ * 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
+ * AVDT_DiscoverReq() again until the procedure is complete.
+ *
+ * The memory pointed to by p_cfg is allocated by the
+ * application. This memory is written to by AVDTP as part
+ * of the get capabilities procedure. This memory must
+ * remain accessible until the application receives
+ * the AVDT_GETCAP_CFM_EVT.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_GetCapReq(BD_ADDR bd_addr, uint8_t seid, tAVDT_CFG *p_cfg, tAVDT_CTRL_CBACK *p_cback)
{
tAVDT_CCB_API_GETCAP getcap;
@@ -376,29 +376,29 @@
}
/*******************************************************************************
-**
-** Function AVDT_GetAllCapReq
-**
-** Description This function initiates a connection to the AVDTP service
-** on the peer device, if not already present, and gets the
-** 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
-** AVDT_DiscoverReq() again until the procedure is complete.
-**
-** The memory pointed to by p_cfg is allocated by the
-** application. This memory is written to by AVDTP as part
-** of the get capabilities procedure. This memory must
-** remain accessible until the application receives
-** the AVDT_GETCAP_CFM_EVT.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_GetAllCapReq
+ *
+ * Description This function initiates a connection to the AVDTP service
+ * on the peer device, if not already present, and gets the
+ * 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
+ * AVDT_DiscoverReq() again until the procedure is complete.
+ *
+ * The memory pointed to by p_cfg is allocated by the
+ * application. This memory is written to by AVDTP as part
+ * of the get capabilities procedure. This memory must
+ * remain accessible until the application receives
+ * the AVDT_GETCAP_CFM_EVT.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_GetAllCapReq(BD_ADDR bd_addr, uint8_t seid, tAVDT_CFG *p_cfg, tAVDT_CTRL_CBACK *p_cback)
{
tAVDT_CCB_API_GETCAP getcap;
@@ -411,16 +411,16 @@
}
/*******************************************************************************
-**
-** Function AVDT_DelayReport
-**
-** Description This functions sends a Delay Report to the peer device
-** that is associated with a particular SEID.
-** This function is called by SNK device.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_DelayReport
+ *
+ * Description This functions sends a Delay Report to the peer device
+ * that is associated with a particular SEID.
+ * This function is called by SNK device.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_DelayReport(uint8_t handle, uint8_t seid, uint16_t delay)
{
tAVDT_SCB *p_scb;
@@ -445,18 +445,18 @@
}
/*******************************************************************************
-**
-** Function AVDT_OpenReq
-**
-** Description This function initiates a connection to the AVDTP service
-** on the peer device, if not already present, and connects
-** to a stream endpoint on a peer device. When the connection
-** is completed, an AVDT_OPEN_CFM_EVT is sent to the
-** application via the control callback function for this handle.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_OpenReq
+ *
+ * Description This function initiates a connection to the AVDTP service
+ * on the peer device, if not already present, and connects
+ * to a stream endpoint on a peer device. When the connection
+ * is completed, an AVDT_OPEN_CFM_EVT is sent to the
+ * application via the control callback function for this handle.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_OpenReq(uint8_t handle, BD_ADDR bd_addr, uint8_t seid, tAVDT_CFG *p_cfg)
{
tAVDT_CCB *p_ccb = NULL;
@@ -504,17 +504,17 @@
}
/*******************************************************************************
-**
-** Function AVDT_ConfigRsp
-**
-** Description Respond to a configure request from the peer device. This
-** function must be called if the application receives an
-** AVDT_CONFIG_IND_EVT through its control callback.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_ConfigRsp
+ *
+ * Description Respond to a configure request from the peer device. This
+ * function must be called if the application receives an
+ * AVDT_CONFIG_IND_EVT through its control callback.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_ConfigRsp(uint8_t handle, uint8_t label, uint8_t error_code, uint8_t category)
{
tAVDT_SCB *p_scb;
@@ -556,19 +556,19 @@
}
/*******************************************************************************
-**
-** Function AVDT_StartReq
-**
-** Description Start one or more stream endpoints. This initiates the
-** transfer of media packets for the streams. All stream
-** endpoints must previously be opened. When the streams
-** are started, an AVDT_START_CFM_EVT is sent to the
-** application via the control callback function for each stream.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_StartReq
+ *
+ * Description Start one or more stream endpoints. This initiates the
+ * transfer of media packets for the streams. All stream
+ * endpoints must previously be opened. When the streams
+ * are started, an AVDT_START_CFM_EVT is sent to the
+ * application via the control callback function for each stream.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_StartReq(uint8_t *p_handles, uint8_t num_handles)
{
tAVDT_SCB *p_scb = NULL;
@@ -612,20 +612,20 @@
}
/*******************************************************************************
-**
-** Function AVDT_SuspendReq
-**
-** Description Suspend one or more stream endpoints. This suspends the
-** transfer of media packets for the streams. All stream
-** endpoints must previously be open and started. When the
-** streams are suspended, an AVDT_SUSPEND_CFM_EVT is sent to
-** the application via the control callback function for
-** each stream.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_SuspendReq
+ *
+ * Description Suspend one or more stream endpoints. This suspends the
+ * transfer of media packets for the streams. All stream
+ * endpoints must previously be open and started. When the
+ * streams are suspended, an AVDT_SUSPEND_CFM_EVT is sent to
+ * the application via the control callback function for
+ * each stream.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_SuspendReq(uint8_t *p_handles, uint8_t num_handles)
{
tAVDT_SCB *p_scb = NULL;
@@ -670,19 +670,19 @@
}
/*******************************************************************************
-**
-** Function AVDT_CloseReq
-**
-** Description Close a stream endpoint. This stops the transfer of media
-** packets and closes the transport channel associated with
-** this stream endpoint. When the stream is closed, an
-** AVDT_CLOSE_CFM_EVT is sent to the application via the
-** control callback function for this handle.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_CloseReq
+ *
+ * Description Close a stream endpoint. This stops the transfer of media
+ * packets and closes the transport channel associated with
+ * this stream endpoint. When the stream is closed, an
+ * AVDT_CLOSE_CFM_EVT is sent to the application via the
+ * control callback function for this handle.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_CloseReq(uint8_t handle)
{
tAVDT_SCB *p_scb;
@@ -704,21 +704,21 @@
}
/*******************************************************************************
-**
-** Function AVDT_ReconfigReq
-**
-** Description Reconfigure a stream endpoint. This allows the application
-** to change the codec or content protection capabilities of
-** a stream endpoint after it has been opened. This function
-** can only be called if the stream is opened but not started
-** or if the stream has been suspended. When the procedure
-** is completed, an AVDT_RECONFIG_CFM_EVT is sent to the
-** application via the control callback function for this handle.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_ReconfigReq
+ *
+ * Description Reconfigure a stream endpoint. This allows the application
+ * to change the codec or content protection capabilities of
+ * a stream endpoint after it has been opened. This function
+ * can only be called if the stream is opened but not started
+ * or if the stream has been suspended. When the procedure
+ * is completed, an AVDT_RECONFIG_CFM_EVT is sent to the
+ * application via the control callback function for this handle.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_ReconfigReq(uint8_t handle, tAVDT_CFG *p_cfg)
{
tAVDT_SCB *p_scb;
@@ -744,17 +744,17 @@
}
/*******************************************************************************
-**
-** Function AVDT_ReconfigRsp
-**
-** Description Respond to a reconfigure request from the peer device.
-** This function must be called if the application receives
-** an AVDT_RECONFIG_IND_EVT through its control callback.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_ReconfigRsp
+ *
+ * Description Respond to a reconfigure request from the peer device.
+ * This function must be called if the application receives
+ * an AVDT_RECONFIG_IND_EVT through its control callback.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_ReconfigRsp(uint8_t handle, uint8_t label, uint8_t error_code, uint8_t category)
{
tAVDT_SCB *p_scb;
@@ -780,19 +780,19 @@
}
/*******************************************************************************
-**
-** Function AVDT_SecurityReq
-**
-** Description Send a security request to the peer device. When the
-** security procedure is completed, an AVDT_SECURITY_CFM_EVT
-** is sent to the application via the control callback function
-** for this handle. (Please note that AVDTP security procedures
-** are unrelated to Bluetooth link level security.)
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_SecurityReq
+ *
+ * Description Send a security request to the peer device. When the
+ * security procedure is completed, an AVDT_SECURITY_CFM_EVT
+ * is sent to the application via the control callback function
+ * for this handle. (Please note that AVDTP security procedures
+ * are unrelated to Bluetooth link level security.)
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_SecurityReq(uint8_t handle, uint8_t *p_data, uint16_t len)
{
tAVDT_SCB *p_scb;
@@ -816,19 +816,19 @@
}
/*******************************************************************************
-**
-** Function AVDT_SecurityRsp
-**
-** Description Respond to a security request from the peer device.
-** This function must be called if the application receives
-** an AVDT_SECURITY_IND_EVT through its control callback.
-** (Please note that AVDTP security procedures are unrelated
-** to Bluetooth link level security.)
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_SecurityRsp
+ *
+ * Description Respond to a security request from the peer device.
+ * This function must be called if the application receives
+ * an AVDT_SECURITY_IND_EVT through its control callback.
+ * (Please note that AVDTP security procedures are unrelated
+ * to Bluetooth link level security.)
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_SecurityRsp(uint8_t handle, uint8_t label, uint8_t error_code,
uint8_t *p_data, uint16_t len)
{
@@ -855,41 +855,41 @@
}
/*******************************************************************************
-**
-** Function AVDT_WriteReqOpt
-**
-** Description Send a media packet to the peer device. The stream must
-** be started before this function is called. Also, this
-** function can only be called if the stream is a SRC.
-**
-** When AVDTP has sent the media packet and is ready for the
-** next packet, an AVDT_WRITE_CFM_EVT is sent to the
-** application via the control callback. The application must
-** wait for the AVDT_WRITE_CFM_EVT before it makes the next
-** call to AVDT_WriteReq(). If the applications calls
-** AVDT_WriteReq() before it receives the event the packet
-** will not be sent. The application may make its first call
-** to AVDT_WriteReq() after it receives an AVDT_START_CFM_EVT
-** or AVDT_START_IND_EVT.
-**
-** The application passes the packet using the BT_HDR structure.
-** This structure is described in section 2.1. The offset
-** field must be equal to or greater than AVDT_MEDIA_OFFSET
-** (if NO_RTP is specified, L2CAP_MIN_OFFSET can be used).
-** This allows enough space in the buffer for the L2CAP and
-** AVDTP headers.
-**
-** The memory pointed to by p_pkt must be a GKI buffer
-** allocated by the application. This buffer will be freed
-** by the protocol stack; the application must not free
-** this buffer.
-**
-** The opt parameter allows passing specific options like:
-** - NO_RTP : do not add the RTP header to buffer
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_WriteReqOpt
+ *
+ * Description Send a media packet to the peer device. The stream must
+ * be started before this function is called. Also, this
+ * function can only be called if the stream is a SRC.
+ *
+ * When AVDTP has sent the media packet and is ready for the
+ * next packet, an AVDT_WRITE_CFM_EVT is sent to the
+ * application via the control callback. The application must
+ * wait for the AVDT_WRITE_CFM_EVT before it makes the next
+ * call to AVDT_WriteReq(). If the applications calls
+ * AVDT_WriteReq() before it receives the event the packet
+ * will not be sent. The application may make its first call
+ * to AVDT_WriteReq() after it receives an AVDT_START_CFM_EVT
+ * or AVDT_START_IND_EVT.
+ *
+ * The application passes the packet using the BT_HDR structure.
+ * This structure is described in section 2.1. The offset
+ * field must be equal to or greater than AVDT_MEDIA_OFFSET
+ * (if NO_RTP is specified, L2CAP_MIN_OFFSET can be used).
+ * This allows enough space in the buffer for the L2CAP and
+ * AVDTP headers.
+ *
+ * The memory pointed to by p_pkt must be a GKI buffer
+ * allocated by the application. This buffer will be freed
+ * by the protocol stack; the application must not free
+ * this buffer.
+ *
+ * The opt parameter allows passing specific options like:
+ * - NO_RTP : do not add the RTP header to buffer
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_WriteReqOpt(uint8_t handle, BT_HDR *p_pkt, uint32_t time_stamp, uint8_t m_pt, tAVDT_DATA_OPT_MASK opt)
{
tAVDT_SCB *p_scb;
@@ -915,58 +915,58 @@
}
/*******************************************************************************
-**
-** Function AVDT_WriteReq
-**
-** Description Send a media packet to the peer device. The stream must
-** be started before this function is called. Also, this
-** function can only be called if the stream is a SRC.
-**
-** When AVDTP has sent the media packet and is ready for the
-** next packet, an AVDT_WRITE_CFM_EVT is sent to the
-** application via the control callback. The application must
-** wait for the AVDT_WRITE_CFM_EVT before it makes the next
-** call to AVDT_WriteReq(). If the applications calls
-** AVDT_WriteReq() before it receives the event the packet
-** will not be sent. The application may make its first call
-** to AVDT_WriteReq() after it receives an AVDT_START_CFM_EVT
-** or AVDT_START_IND_EVT.
-**
-** The application passes the packet using the BT_HDR structure.
-** This structure is described in section 2.1. The offset
-** field must be equal to or greater than AVDT_MEDIA_OFFSET.
-** This allows enough space in the buffer for the L2CAP and
-** AVDTP headers.
-**
-** The memory pointed to by p_pkt must be a GKI buffer
-** allocated by the application. This buffer will be freed
-** by the protocol stack; the application must not free
-** this buffer.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_WriteReq
+ *
+ * Description Send a media packet to the peer device. The stream must
+ * be started before this function is called. Also, this
+ * function can only be called if the stream is a SRC.
+ *
+ * When AVDTP has sent the media packet and is ready for the
+ * next packet, an AVDT_WRITE_CFM_EVT is sent to the
+ * application via the control callback. The application must
+ * wait for the AVDT_WRITE_CFM_EVT before it makes the next
+ * call to AVDT_WriteReq(). If the applications calls
+ * AVDT_WriteReq() before it receives the event the packet
+ * will not be sent. The application may make its first call
+ * to AVDT_WriteReq() after it receives an AVDT_START_CFM_EVT
+ * or AVDT_START_IND_EVT.
+ *
+ * The application passes the packet using the BT_HDR structure.
+ * This structure is described in section 2.1. The offset
+ * field must be equal to or greater than AVDT_MEDIA_OFFSET.
+ * This allows enough space in the buffer for the L2CAP and
+ * AVDTP headers.
+ *
+ * The memory pointed to by p_pkt must be a GKI buffer
+ * allocated by the application. This buffer will be freed
+ * by the protocol stack; the application must not free
+ * this buffer.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_WriteReq(uint8_t handle, BT_HDR *p_pkt, uint32_t time_stamp, uint8_t m_pt)
{
return AVDT_WriteReqOpt(handle, p_pkt, time_stamp, m_pt, AVDT_DATA_OPT_NONE);
}
/*******************************************************************************
-**
-** Function AVDT_ConnectReq
-**
-** Description This function initiates an AVDTP signaling connection
-** to the peer device. When the connection is completed, an
-** AVDT_CONNECT_IND_EVT is sent to the application via its
-** control callback function. If the connection attempt fails
-** an AVDT_DISCONNECT_IND_EVT is sent. The security mask
-** parameter overrides the outgoing security mask set in
-** AVDT_Register().
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_ConnectReq
+ *
+ * Description This function initiates an AVDTP signaling connection
+ * to the peer device. When the connection is completed, an
+ * AVDT_CONNECT_IND_EVT is sent to the application via its
+ * control callback function. If the connection attempt fails
+ * an AVDT_DISCONNECT_IND_EVT is sent. The security mask
+ * parameter overrides the outgoing security mask set in
+ * AVDT_Register().
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_ConnectReq(BD_ADDR bd_addr, uint8_t sec_mask, tAVDT_CTRL_CBACK *p_cback)
{
tAVDT_CCB *p_ccb = NULL;
@@ -1003,17 +1003,17 @@
}
/*******************************************************************************
-**
-** Function AVDT_DisconnectReq
-**
-** Description This function disconnect an AVDTP signaling connection
-** to the peer device. When disconnected an
-** AVDT_DISCONNECT_IND_EVT is sent to the application via its
-** control callback function.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_DisconnectReq
+ *
+ * Description This function disconnect an AVDTP signaling connection
+ * to the peer device. When disconnected an
+ * AVDT_DISCONNECT_IND_EVT is sent to the application via its
+ * control callback function.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
uint16_t AVDT_DisconnectReq(BD_ADDR bd_addr, tAVDT_CTRL_CBACK *p_cback)
{
tAVDT_CCB *p_ccb = NULL;
@@ -1037,14 +1037,14 @@
}
/*******************************************************************************
-**
-** Function AVDT_GetL2CapChannel
-**
-** Description Get the L2CAP CID used by the handle.
-**
-** Returns CID if successful, otherwise 0.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_GetL2CapChannel
+ *
+ * Description Get the L2CAP CID used by the handle.
+ *
+ * Returns CID if successful, otherwise 0.
+ *
+ ******************************************************************************/
uint16_t AVDT_GetL2CapChannel(uint8_t handle)
{
tAVDT_SCB *p_scb;
@@ -1066,14 +1066,14 @@
}
/*******************************************************************************
-**
-** Function AVDT_GetSignalChannel
-**
-** Description Get the L2CAP CID used by the signal channel of the given handle.
-**
-** Returns CID if successful, otherwise 0.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_GetSignalChannel
+ *
+ * Description Get the L2CAP CID used by the signal channel of the given handle.
+ *
+ * Returns CID if successful, otherwise 0.
+ *
+ ******************************************************************************/
uint16_t AVDT_GetSignalChannel(uint8_t handle, BD_ADDR bd_addr)
{
tAVDT_SCB *p_scb;
@@ -1100,16 +1100,16 @@
#if (AVDT_REPORTING == TRUE)
/*******************************************************************************
-**
-** Function AVDT_SendReport
-**
-** Description
-**
-**
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function AVDT_SendReport
+ *
+ * Description
+ *
+ *
+ *
+ * Returns
+ *
+ ******************************************************************************/
uint16_t AVDT_SendReport(uint8_t handle, AVDT_REPORT_TYPE type,
tAVDT_REPORT_DATA *p_data)
{
@@ -1195,26 +1195,26 @@
#endif
/******************************************************************************
-**
-** Function AVDT_SetTraceLevel
-**
-** Description Sets the trace level for AVDT. If 0xff is passed, the
-** current trace level is returned.
-**
-** Input Parameters:
-** new_level: The level to set the AVDT tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new trace level or current trace level if
-** the input parameter is 0xff.
-**
-******************************************************************************/
+ *
+ * Function AVDT_SetTraceLevel
+ *
+ * Description Sets the trace level for AVDT. If 0xff is passed, the
+ * current trace level is returned.
+ *
+ * Input Parameters:
+ * new_level: The level to set the AVDT tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new trace level or current trace level if
+ * the input parameter is 0xff.
+ *
+ *****************************************************************************/
uint8_t AVDT_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
diff --git a/stack/avdt/avdt_ccb.cc b/stack/avdt/avdt_ccb.cc
index 2c4c317..3bfcec6 100644
--- a/stack/avdt/avdt_ccb.cc
+++ b/stack/avdt/avdt_ccb.cc
@@ -35,8 +35,8 @@
#include "osi/include/osi.h"
/*****************************************************************************
-** state machine constants and types
-*****************************************************************************/
+ * state machine constants and types
+ ****************************************************************************/
#if (AVDT_DEBUG == TRUE)
/* verbose state strings for trace */
@@ -271,15 +271,15 @@
};
/*******************************************************************************
-**
-** Function avdt_ccb_init
-**
-** Description Initialize channel control block module.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_init
+ *
+ * Description Initialize channel control block module.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_ccb_init(void)
{
memset(&avdt_cb.ccb[0], 0, sizeof(tAVDT_CCB) * AVDT_NUM_LINKS);
@@ -287,15 +287,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_event
-**
-** Description State machine event handling function for ccb
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_event
+ *
+ * Description State machine event handling function for ccb
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_ccb_event(tAVDT_CCB *p_ccb, uint8_t event, tAVDT_CCB_EVT *p_data)
{
tAVDT_CCB_ST_TBL state_table;
@@ -331,15 +331,15 @@
/*******************************************************************************
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ ******************************************************************************/
tAVDT_CCB *avdt_ccb_by_bd(BD_ADDR bd_addr)
{
tAVDT_CCB *p_ccb = &avdt_cb.ccb[0];
@@ -366,15 +366,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_alloc
-**
-** Description Allocate a channel control block.
-**
-**
-** Returns pointer to the ccb, or NULL if none could be allocated.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_alloc
+ *
+ * Description Allocate a channel control block.
+ *
+ *
+ * Returns pointer to the ccb, or NULL if none could be allocated.
+ *
+ ******************************************************************************/
tAVDT_CCB *avdt_ccb_alloc(BD_ADDR bd_addr)
{
tAVDT_CCB *p_ccb = &avdt_cb.ccb[0];
@@ -406,15 +406,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_dealloc
-**
-** Description Deallocate a stream control block.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_dealloc
+ *
+ * Description Deallocate a stream control block.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_dealloc(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -428,15 +428,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_to_idx
-**
-** Description Given a pointer to an ccb, return its index.
-**
-**
-** Returns Index of ccb.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_to_idx
+ *
+ * Description Given a pointer to an ccb, return its index.
+ *
+ *
+ * Returns Index of ccb.
+ *
+ ******************************************************************************/
uint8_t avdt_ccb_to_idx(tAVDT_CCB *p_ccb)
{
/* use array arithmetic to determine index */
@@ -444,15 +444,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_by_idx
-**
-** Description Return ccb pointer based on ccb index.
-**
-**
-** Returns pointer to the ccb, or NULL if none found.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_by_idx
+ *
+ * Description Return ccb pointer based on ccb index.
+ *
+ *
+ * Returns pointer to the ccb, or NULL if none found.
+ *
+ ******************************************************************************/
tAVDT_CCB *avdt_ccb_by_idx(uint8_t idx)
{
tAVDT_CCB *p_ccb;
diff --git a/stack/avdt/avdt_ccb_act.cc b/stack/avdt/avdt_ccb_act.cc
index c228e96..b2bde55 100644
--- a/stack/avdt/avdt_ccb_act.cc
+++ b/stack/avdt/avdt_ccb_act.cc
@@ -38,16 +38,16 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*******************************************************************************
-**
-** Function avdt_ccb_clear_ccb
-**
-** Description This function clears out certain buffers, queues, and
-** other data elements of a ccb.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_clear_ccb
+ *
+ * Description This function clears out certain buffers, queues, and
+ * other data elements of a ccb.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_ccb_clear_ccb(tAVDT_CCB *p_ccb)
{
BT_HDR *p_buf;
@@ -68,16 +68,16 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_chan_open
-**
-** Description This function calls avdt_ad_open_req() to
-** initiate a signaling channel connection.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_chan_open
+ *
+ * Description This function calls avdt_ad_open_req() to
+ * initiate a signaling channel connection.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_chan_open(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -86,16 +86,16 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_chan_close
-**
-** Description This function calls avdt_ad_close_req() to close a
-** signaling channel connection.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_chan_close
+ *
+ * Description This function calls avdt_ad_close_req() to close a
+ * signaling channel connection.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_chan_close(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -104,16 +104,16 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_chk_close
-**
-** Description This function checks for active streams on this CCB.
-** If there are none, it starts an idle timer.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_chk_close
+ *
+ * Description This function checks for active streams on this CCB.
+ * If there are none, it starts an idle timer.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_chk_close(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -142,18 +142,18 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_hdl_discover_cmd
-**
-** Description This function is called when a discover command is
-** received from the peer. It gathers up the stream
-** information for all allocated streams and initiates
-** sending of a discover response.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_hdl_discover_cmd
+ *
+ * Description This function is called when a discover command is
+ * received from the peer. It gathers up the stream
+ * information for all allocated streams and initiates
+ * sending of a discover response.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_hdl_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
tAVDT_SEP_INFO sep_info[AVDT_NUM_SEPS];
@@ -183,17 +183,17 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_hdl_discover_rsp
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_hdl_discover_rsp
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_hdl_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
/* we're done with procedure */
@@ -205,18 +205,18 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_hdl_getcap_cmd
-**
-** Description This function is called when a get capabilities command
-** is received from the peer. It retrieves the stream
-** configuration for the requested stream and initiates
-** sending of a get capabilities response.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_hdl_getcap_cmd
+ *
+ * Description This function is called when a get capabilities command
+ * is received from the peer. It retrieves the stream
+ * configuration for the requested stream and initiates
+ * sending of a get capabilities response.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_hdl_getcap_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
tAVDT_SCB *p_scb;
@@ -230,17 +230,17 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_hdl_getcap_rsp
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_hdl_getcap_rsp
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_hdl_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
/* we're done with procedure */
@@ -252,18 +252,18 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_hdl_start_cmd
-**
-** Description This function is called when a start command is received
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_hdl_start_cmd
+ *
+ * Description This function is called when a start command is received
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_hdl_start_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
uint8_t err_code = 0;
@@ -284,18 +284,18 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_hdl_start_rsp
-**
-** Description This function is called when a start response or reject
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_hdl_start_rsp
+ *
+ * Description This function is called when a start response or reject
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_hdl_start_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
uint8_t event;
@@ -322,19 +322,19 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_hdl_suspend_cmd
-**
-** Description This function is called when a suspend command is received
-** from the peer. It verifies that all requested streams are
-** in the proper state. If so, it initiates sending of a
-** suspend response. Otherwise it sends a suspend reject.
+ *
+ * Function avdt_ccb_hdl_suspend_cmd
+ *
+ * Description This function is called when a suspend command is received
+ * from the peer. It verifies that all requested streams are
+ * in the proper state. If so, it initiates sending of a
+ * suspend response. Otherwise it sends a suspend reject.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_hdl_suspend_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
uint8_t seid;
@@ -358,19 +358,19 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_hdl_suspend_rsp
-**
-** Description This function is called when a suspend response or reject
-** is received from the peer. Using the SEIDs stored in the
-** current command message, it sends a suspend response or
-** suspend reject event to each SCB associated with the command.
-**
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_hdl_suspend_rsp
+ *
+ * Description This function is called when a suspend response or reject
+ * is received from the peer. Using the SEIDs stored in the
+ * current command message, it sends a suspend response or
+ * suspend reject event to each SCB associated with the command.
+ *
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_hdl_suspend_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
uint8_t event;
@@ -397,18 +397,18 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_discover_cmd
-**
-** Description This function is called to send a discover command 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 discover command.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_discover_cmd
+ *
+ * Description This function is called to send a discover command 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 discover command.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_snd_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
/* store info in ccb struct */
@@ -424,17 +424,17 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_discover_rsp
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_discover_rsp
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_snd_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
/* send response */
@@ -442,18 +442,18 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_getcap_cmd
-**
-** Description This function is called to send a get capabilities command
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_getcap_cmd
+ *
+ * Description This function is called to send a get capabilities command
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_snd_getcap_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
uint8_t sig_id = AVDT_SIG_GETCAP;
@@ -473,17 +473,17 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_getcap_rsp
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_getcap_rsp
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_snd_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
uint8_t sig_id = AVDT_SIG_GETCAP;
@@ -496,18 +496,18 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_start_cmd
-**
-** Description This function is called to send a start command to the
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_start_cmd
+ *
+ * Description This function is called to send a start command to the
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_snd_start_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
int i;
@@ -543,18 +543,18 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_start_rsp
-**
-** Description This function is called to send a start response to the
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_start_rsp
+ *
+ * Description This function is called to send a start response to the
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_snd_start_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
tAVDT_SCB *p_scb;
@@ -575,19 +575,19 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_suspend_cmd
-**
-** Description This function is called to send a suspend command to the
-** peer. It verifies that all requested streams are in the
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_suspend_cmd
+ *
+ * Description This function is called to send a suspend command to the
+ * peer. It verifies that all requested streams are in the
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_snd_suspend_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
int i;
@@ -623,18 +623,18 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_suspend_rsp
-**
-** Description This function is called to send a suspend response to the
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_suspend_rsp
+ *
+ * Description This function is called to send a suspend response to the
+ * 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;
@@ -655,19 +655,19 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_clear_cmds
-**
-** Description This function is called when the signaling channel is
-** closed to clean up any pending commands. For each pending
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_clear_cmds
+ *
+ * Description This function is called when the signaling channel is
+ * closed to clean up any pending commands. For each pending
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_clear_cmds(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -703,17 +703,17 @@
}
/*******************************************************************************
-**
-** 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
-** reject message back to ourselves.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * 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
+ * reject message back to ourselves.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_cmd_fail(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
tAVDT_MSG msg;
@@ -749,16 +749,16 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_free_cmd
-**
-** Description This function is called when a response is received for a
-** currently pending command. The command is freed.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_free_cmd
+ *
+ * Description This function is called when a response is received for a
+ * currently pending command. The command is freed.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_free_cmd(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -766,34 +766,34 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_cong_state
-**
-** Description This function is called to set the congestion state for
-** the CCB.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_cong_state
+ *
+ * Description This function is called to set the congestion state for
+ * the CCB.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_cong_state(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
p_ccb->cong = p_data->llcong;
}
/*******************************************************************************
-**
-** Function avdt_ccb_ret_cmd
-**
-** Description This function is called to retransmit the currently
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_ret_cmd
+ *
+ * Description This function is called to retransmit the currently
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_ret_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
uint8_t err_code = AVDT_ERR_TIMEOUT;
@@ -831,16 +831,16 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_cmd
-**
-** Description This function is called the send the next command,
-** if any, in the command queue.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_cmd
+ *
+ * Description This function is called the send the next command,
+ * if any, in the command queue.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_snd_cmd(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -864,15 +864,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_snd_msg
-**
-** Description
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_snd_msg
+ *
+ * Description
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_snd_msg(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -905,17 +905,17 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_set_reconn
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_set_reconn
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_set_reconn(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -923,15 +923,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_clr_reconn
-**
-** Description This function is called to clear the reconn variable.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_clr_reconn
+ *
+ * Description This function is called to clear the reconn variable.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_clr_reconn(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -939,17 +939,17 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_chk_reconn
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_chk_reconn
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_ccb_chk_reconn(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -975,16 +975,16 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_chk_timer
-**
-** Description This function stops the CCB timer if the idle timer is
-** running.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_chk_timer
+ *
+ * Description This function stops the CCB timer if the idle timer is
+ * running.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_chk_timer(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -992,15 +992,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_set_conn
-**
-** Description Set CCB variables associated with AVDT_ConnectReq().
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_set_conn
+ *
+ * Description Set CCB variables associated with AVDT_ConnectReq().
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_set_conn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
/* save callback */
@@ -1012,15 +1012,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_set_disconn
-**
-** Description Set CCB variables associated with AVDT_DisconnectReq().
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_set_disconn
+ *
+ * Description Set CCB variables associated with AVDT_DisconnectReq().
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_set_disconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
/*
@@ -1033,15 +1033,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_do_disconn
-**
-** Description Do action associated with AVDT_DisconnectReq().
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_do_disconn
+ *
+ * Description Do action associated with AVDT_DisconnectReq().
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_do_disconn(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -1053,15 +1053,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_ll_closed
-**
-** Description Clear commands from and deallocate CCB.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_ll_closed
+ *
+ * Description Clear commands from and deallocate CCB.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_ll_closed(tAVDT_CCB *p_ccb,
UNUSED_ATTR tAVDT_CCB_EVT *p_data)
{
@@ -1090,15 +1090,15 @@
}
/*******************************************************************************
-**
-** Function avdt_ccb_ll_opened
-**
-** Description Call callback on open.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_ccb_ll_opened
+ *
+ * Description Call callback on open.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_ccb_ll_opened(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
tAVDT_CTRL avdt_ctrl;
diff --git a/stack/avdt/avdt_defs.h b/stack/avdt/avdt_defs.h
index f7fe3c6..d618474 100644
--- a/stack/avdt/avdt_defs.h
+++ b/stack/avdt/avdt_defs.h
@@ -26,8 +26,8 @@
#define AVDT_DEFS_H
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* signalling packet type */
#define AVDT_PKT_TYPE_SINGLE 0 /* single packet */
@@ -139,8 +139,8 @@
#define AVDT_ALH_FRAG_MASK 0x04 /* set this for continuation packet */
/*****************************************************************************
-** message parsing and building macros
-*****************************************************************************/
+ * message parsing and building macros
+ ****************************************************************************/
#define AVDT_MSG_PRS_HDR(p, lbl, pkt, msg) \
do { \
diff --git a/stack/avdt/avdt_int.h b/stack/avdt/avdt_int.h
index 35a6989..2deb04f 100644
--- a/stack/avdt/avdt_int.h
+++ b/stack/avdt/avdt_int.h
@@ -42,8 +42,8 @@
#endif
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* channel types */
enum {
@@ -80,12 +80,12 @@
#define AVDT_CCB_MKR 0x80
/* offset where AVDTP signaling message content starts;
-** use the size of a start header since it's the largest possible
-** layout of signaling message in a buffer is:
-**
-** | BT_HDR | SCB handles | L2CAP + HCI header | AVDTP header | data ... |
-**
-** Note that we "hide" the scb handles at the top of the message buffer.
+ * use the size of a start header since it's the largest possible
+ * layout of signaling message in a buffer is:
+ *
+ * | BT_HDR | SCB handles | L2CAP + HCI header | AVDTP header | data ... |
+ *
+ * Note that we "hide" the scb handles at the top of the message buffer.
*/
#define AVDT_MSG_OFFSET (L2CAP_MIN_OFFSET + AVDT_NUM_SEPS + AVDT_LEN_TYPE_START)
@@ -186,7 +186,7 @@
/* scb state machine states; these state values are private to this module so
-** the scb state cannot be read or set by actions functions
+ * the scb state cannot be read or set by actions functions
*/
enum {
AVDT_SCB_IDLE_ST,
@@ -354,8 +354,8 @@
#define AVDT_AD_CONGESTED L2CAP_DW_CONGESTED /* 2 */
/*****************************************************************************
-** data types
-*****************************************************************************/
+ * data types
+ ****************************************************************************/
/* msg union of all message parameter types */
typedef union {
@@ -530,8 +530,8 @@
/*****************************************************************************
-** function declarations
-*****************************************************************************/
+ * function declarations
+ ****************************************************************************/
/* CCB function declarations */
extern void avdt_ccb_init(void);
@@ -681,11 +681,11 @@
extern void avdt_scb_transport_channel_timer_timeout(void *data);
/*****************************************************************************
-** macros
-*****************************************************************************/
+ * macros
+ ****************************************************************************/
/* we store the scb and the label in the layer_specific field of the
-** current cmd
+ * current cmd
*/
#define AVDT_BLD_LAYERSPEC(ls, msg, label) \
ls = (((label) << 4) | (msg))
@@ -695,12 +695,12 @@
#define AVDT_LAYERSPEC_MSG(ls) ((uint8_t)((ls) & 0x000F))
/*****************************************************************************
-** global data
-*****************************************************************************/
+ * global data
+ ****************************************************************************/
/******************************************************************************
-** Main Control Block
-*******************************************************************************/
+ * Main Control Block
+ ******************************************************************************/
extern tAVDT_CB avdt_cb;
/* L2CAP callback registration structure */
diff --git a/stack/avdt/avdt_l2c.cc b/stack/avdt/avdt_l2c.cc
index 1321093..ec3ea6b 100644
--- a/stack/avdt/avdt_l2c.cc
+++ b/stack/avdt/avdt_l2c.cc
@@ -63,15 +63,15 @@
};
/*******************************************************************************
-**
-** Function avdt_sec_check_complete_term
-**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_sec_check_complete_term
+ *
+ * Description The function called when Security Manager finishes
+ * verification of the service side connection
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void avdt_sec_check_complete_term (BD_ADDR bd_addr, tBT_TRANSPORT transport,
UNUSED_ATTR void *p_ref_data, uint8_t res)
{
@@ -120,15 +120,15 @@
}
/*******************************************************************************
-**
-** Function avdt_sec_check_complete_orig
-**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_sec_check_complete_orig
+ *
+ * Description The function called when Security Manager finishes
+ * verification of the service side connection
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void avdt_sec_check_complete_orig (BD_ADDR bd_addr, tBT_TRANSPORT trasnport,
UNUSED_ATTR void *p_ref_data, uint8_t res)
{
@@ -163,15 +163,15 @@
}
}
/*******************************************************************************
-**
-** Function avdt_l2c_connect_ind_cback
-**
-** Description This is the L2CAP connect indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_l2c_connect_ind_cback
+ *
+ * Description This is the L2CAP connect indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avdt_l2c_connect_ind_cback(BD_ADDR bd_addr, uint16_t lcid,
UNUSED_ATTR uint16_t psm, uint8_t id)
{
@@ -284,15 +284,15 @@
}
/*******************************************************************************
-**
-** Function avdt_l2c_connect_cfm_cback
-**
-** Description This is the L2CAP connect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_l2c_connect_cfm_cback
+ *
+ * Description This is the L2CAP connect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avdt_l2c_connect_cfm_cback(uint16_t lcid, uint16_t result)
{
tAVDT_TC_TBL *p_tbl;
@@ -366,15 +366,15 @@
}
/*******************************************************************************
-**
-** Function avdt_l2c_config_cfm_cback
-**
-** Description This is the L2CAP config confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_l2c_config_cfm_cback
+ *
+ * Description This is the L2CAP config confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avdt_l2c_config_cfm_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tAVDT_TC_TBL *p_tbl;
@@ -411,15 +411,15 @@
}
/*******************************************************************************
-**
-** Function avdt_l2c_config_ind_cback
-**
-** Description This is the L2CAP config indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_l2c_config_ind_cback
+ *
+ * Description This is the L2CAP config indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avdt_l2c_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tAVDT_TC_TBL *p_tbl;
@@ -460,15 +460,15 @@
}
/*******************************************************************************
-**
-** Function avdt_l2c_disconnect_ind_cback
-**
-** Description This is the L2CAP disconnect indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_l2c_disconnect_ind_cback
+ *
+ * Description This is the L2CAP disconnect indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avdt_l2c_disconnect_ind_cback(uint16_t lcid, bool ack_needed)
{
tAVDT_TC_TBL *p_tbl;
@@ -490,15 +490,15 @@
}
/*******************************************************************************
-**
-** Function avdt_l2c_disconnect_cfm_cback
-**
-** Description This is the L2CAP disconnect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_l2c_disconnect_cfm_cback
+ *
+ * Description This is the L2CAP disconnect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avdt_l2c_disconnect_cfm_cback(uint16_t lcid, uint16_t result)
{
tAVDT_TC_TBL *p_tbl;
@@ -514,15 +514,15 @@
}
/*******************************************************************************
-**
-** Function avdt_l2c_congestion_ind_cback
-**
-** Description This is the L2CAP congestion indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_l2c_congestion_ind_cback
+ *
+ * Description This is the L2CAP congestion indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avdt_l2c_congestion_ind_cback(uint16_t lcid, bool is_congested)
{
tAVDT_TC_TBL *p_tbl;
@@ -536,15 +536,15 @@
}
/*******************************************************************************
-**
-** Function avdt_l2c_data_ind_cback
-**
-** Description This is the L2CAP data indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function avdt_l2c_data_ind_cback
+ *
+ * Description This is the L2CAP data indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void avdt_l2c_data_ind_cback(uint16_t lcid, BT_HDR *p_buf)
{
tAVDT_TC_TBL *p_tbl;
diff --git a/stack/avdt/avdt_msg.cc b/stack/avdt/avdt_msg.cc
index d9e6dcc..9910218 100644
--- a/stack/avdt/avdt_msg.cc
+++ b/stack/avdt/avdt_msg.cc
@@ -40,8 +40,8 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* mask of all psc values */
#define AVDT_MSG_PSC_MASK (AVDT_PSC_TRANS | AVDT_PSC_REPORT | AVDT_PSC_DELAY_RPT | \
@@ -51,8 +51,8 @@
/*****************************************************************************
-** type definitions
-*****************************************************************************/
+ * type definitions
+ ****************************************************************************/
/* type for message building functions */
typedef void (*tAVDT_MSG_BLD)(uint8_t **p, tAVDT_MSG *p_msg);
@@ -62,8 +62,8 @@
/*****************************************************************************
-** local function declarations
-*****************************************************************************/
+ * local function declarations
+ ****************************************************************************/
static void avdt_msg_bld_none(uint8_t **p, tAVDT_MSG *p_msg);
static void avdt_msg_bld_single(uint8_t **p, tAVDT_MSG *p_msg);
@@ -90,8 +90,8 @@
static uint8_t avdt_msg_prs_delay_rpt (tAVDT_MSG *p_msg, uint8_t *p, uint16_t len);
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* table of information element minimum lengths used for parsing */
const uint8_t avdt_msg_ie_len_min[] = {
@@ -260,16 +260,16 @@
};
/*******************************************************************************
-**
-** Function avdt_msg_bld_cfg
-**
-** Description This function builds the configuration parameters contained
-** in a command or response message.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_cfg
+ *
+ * Description This function builds the configuration parameters contained
+ * in a command or response message.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_cfg(uint8_t **p, tAVDT_CFG *p_cfg)
{
uint8_t len;
@@ -325,15 +325,15 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_none
-**
-** Description This message building function builds an empty message.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_none
+ *
+ * Description This message building function builds an empty message.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_none(UNUSED_ATTR uint8_t **p,
UNUSED_ATTR tAVDT_MSG *p_msg)
{
@@ -341,32 +341,32 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_single
-**
-** Description This message building function builds a message containing
-** a single SEID.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_single
+ *
+ * Description This message building function builds a message containing
+ * a single SEID.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_single(uint8_t **p, tAVDT_MSG *p_msg)
{
AVDT_MSG_BLD_SEID(*p, p_msg->single.seid);
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_setconfig_cmd
-**
-** Description This message building function builds a set configuration
-** command message.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_setconfig_cmd
+ *
+ * Description This message building function builds a set configuration
+ * command message.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_setconfig_cmd(uint8_t **p, tAVDT_MSG *p_msg)
{
AVDT_MSG_BLD_SEID(*p, p_msg->config_cmd.hdr.seid);
@@ -375,16 +375,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_reconfig_cmd
-**
-** Description This message building function builds a reconfiguration
-** command message.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_reconfig_cmd
+ *
+ * Description This message building function builds a reconfiguration
+ * command message.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_reconfig_cmd(uint8_t **p, tAVDT_MSG *p_msg)
{
AVDT_MSG_BLD_SEID(*p, p_msg->reconfig_cmd.hdr.seid);
@@ -395,16 +395,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_multi
-**
-** Description This message building function builds a message containing
-** multiple SEID's.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_multi
+ *
+ * Description This message building function builds a message containing
+ * multiple SEID's.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_multi(uint8_t **p, tAVDT_MSG *p_msg)
{
int i;
@@ -416,15 +416,15 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_security_cmd
-**
-** Description This message building function builds a security
-** command message.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_security_cmd
+ *
+ * Description This message building function builds a security
+ * command message.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_security_cmd(uint8_t **p, tAVDT_MSG *p_msg)
{
AVDT_MSG_BLD_SEID(*p, p_msg->security_cmd.hdr.seid);
@@ -433,15 +433,15 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_delay_rpt
-**
-** Description This message building function builds a delay report
-** command message.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_delay_rpt
+ *
+ * Description This message building function builds a delay report
+ * command message.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_delay_rpt(uint8_t **p, tAVDT_MSG *p_msg)
{
AVDT_MSG_BLD_SEID(*p, p_msg->delay_rpt_cmd.hdr.seid);
@@ -449,16 +449,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_discover_rsp
-**
-** Description This message building function builds a discover
-** response message.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_discover_rsp
+ *
+ * Description This message building function builds a discover
+ * response message.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_discover_rsp(uint8_t **p, tAVDT_MSG *p_msg)
{
int i;
@@ -474,16 +474,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_svccap
-**
-** Description This message building function builds a message containing
-** service capabilities parameters.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_svccap
+ *
+ * Description This message building function builds a message containing
+ * service capabilities parameters.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_svccap(uint8_t **p, tAVDT_MSG *p_msg)
{
tAVDT_CFG cfg;
@@ -495,32 +495,32 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_all_svccap
-**
-** Description This message building function builds a message containing
-** service capabilities parameters.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_all_svccap
+ *
+ * Description This message building function builds a message containing
+ * service capabilities parameters.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_all_svccap(uint8_t **p, tAVDT_MSG *p_msg)
{
avdt_msg_bld_cfg(p, p_msg->svccap.p_cfg);
}
/*******************************************************************************
-**
-** Function avdt_msg_bld_security_rsp
-**
-** Description This message building function builds a security
-** response message.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_bld_security_rsp
+ *
+ * Description This message building function builds a security
+ * response message.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void avdt_msg_bld_security_rsp(uint8_t **p, tAVDT_MSG *p_msg)
{
memcpy(*p, p_msg->security_rsp.p_data, p_msg->security_rsp.len);
@@ -528,17 +528,17 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_cfg
-**
-** 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
-** in p_elem.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_cfg
+ *
+ * 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
+ * in p_elem.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_cfg(tAVDT_CFG *p_cfg, uint8_t *p, uint16_t len, uint8_t* p_elem, uint8_t sig_id)
{
uint8_t *p_end;
@@ -672,16 +672,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_none
-**
-** Description This message parsing function parses a message with no parameters.
+ *
+ * Function avdt_msg_prs_none
+ *
+ * Description This message parsing function parses a message with no parameters.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_none(UNUSED_ATTR tAVDT_MSG *p_msg, UNUSED_ATTR uint8_t *p,
UNUSED_ATTR uint16_t len)
{
@@ -689,16 +689,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_single
-**
-** Description This message parsing function parses a message with a
-** single SEID.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_single
+ *
+ * Description This message parsing function parses a message with a
+ * single SEID.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_single(tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
uint8_t err = 0;
@@ -721,16 +721,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_setconfig_cmd
-**
-** Description This message parsing function parses a set configuration
-** command message.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_setconfig_cmd
+ *
+ * Description This message parsing function parses a set configuration
+ * command message.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
uint8_t err = 0;
@@ -780,16 +780,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_reconfig_cmd
-**
-** Description This message parsing function parses a reconfiguration
-** command message.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_reconfig_cmd
+ *
+ * Description This message parsing function parses a reconfiguration
+ * command message.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_reconfig_cmd(tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
uint8_t err = 0;
@@ -831,16 +831,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_multi
-**
-** Description This message parsing function parses a message containing
-** multiple SEID's.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_multi
+ *
+ * Description This message parsing function parses a message containing
+ * multiple SEID's.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_multi(tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
int i;
@@ -873,16 +873,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_security_cmd
-**
-** Description This message parsing function parses a security
-** command message.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_security_cmd
+ *
+ * Description This message parsing function parses a security
+ * command message.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_security_cmd(tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
uint8_t err = 0;
@@ -910,16 +910,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_discover_rsp
-**
-** Description This message parsing function parses a discover
-** response message.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_discover_rsp
+ *
+ * Description This message parsing function parses a discover
+ * response message.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_discover_rsp(tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
int i;
@@ -955,16 +955,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_svccap
-**
-** Description This message parsing function parses a message containing
-** service capabilities parameters.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_svccap
+ *
+ * Description This message parsing function parses a message containing
+ * service capabilities parameters.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_svccap(tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
/* parse parameters */
@@ -978,16 +978,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_all_svccap
-**
-** Description This message parsing function parses a message containing
-** service capabilities parameters.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_all_svccap
+ *
+ * Description This message parsing function parses a message containing
+ * service capabilities parameters.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_all_svccap(tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
uint8_t err = avdt_msg_prs_cfg(p_msg->svccap.p_cfg, p, len, &p_msg->hdr.err_param, AVDT_SIG_GET_ALLCAP);
@@ -999,16 +999,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_security_rsp
-**
-** Description This message parsing function parsing a security
-** response message.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_security_rsp
+ *
+ * Description This message parsing function parsing a security
+ * response message.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_security_rsp(tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
p_msg->security_rsp.p_data = p;
@@ -1018,15 +1018,15 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_rej
-**
-** Description
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_rej
+ *
+ * Description
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_rej(tAVDT_MSG *p_msg, uint8_t *p, uint8_t sig)
{
if ((sig == AVDT_SIG_SETCONFIG) || (sig == AVDT_SIG_RECONFIG))
@@ -1048,16 +1048,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_prs_delay_rpt
-**
-** Description This message parsing function parses a security
-** command message.
-**
-**
-** Returns Error code or zero if no error.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_prs_delay_rpt
+ *
+ * Description This message parsing function parses a security
+ * command message.
+ *
+ *
+ * Returns Error code or zero if no error.
+ *
+ ******************************************************************************/
static uint8_t avdt_msg_prs_delay_rpt (tAVDT_MSG *p_msg, uint8_t *p, uint16_t len)
{
uint8_t err = 0;
@@ -1088,15 +1088,15 @@
/*******************************************************************************
-**
-** Function avdt_msg_send
-**
-** Description Send, and if necessary fragment the next message.
-**
-**
-** Returns Congested state; true if CCB congested, false if not.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_send
+ *
+ * Description Send, and if necessary fragment the next message.
+ *
+ *
+ * Returns Congested state; true if CCB congested, false if not.
+ *
+ ******************************************************************************/
bool avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg)
{
uint16_t curr_msg_len;
@@ -1247,16 +1247,16 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_asmbl
-**
-** Description Reassemble incoming message.
-**
-**
-** Returns Pointer to reassembled message; NULL if no message
-** available.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_asmbl
+ *
+ * Description Reassemble incoming message.
+ *
+ *
+ * Returns Pointer to reassembled message; NULL if no message
+ * available.
+ *
+ ******************************************************************************/
BT_HDR *avdt_msg_asmbl(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
{
uint8_t *p;
@@ -1376,20 +1376,20 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_send_cmd
-**
-** Description This function is called to send a command message. The
-** sig_id parameter indicates the message type, p_params
-** points to the message parameters, if any. It gets a buffer
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_send_cmd
+ *
+ * Description This function is called to send a command message. The
+ * sig_id parameter indicates the message type, p_params
+ * points to the message parameters, if any. It gets a buffer
+ * 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.
+ *
+ ******************************************************************************/
void avdt_msg_send_cmd(tAVDT_CCB *p_ccb, void *p_scb, uint8_t sig_id, tAVDT_MSG *p_params)
{
uint8_t *p;
@@ -1437,20 +1437,20 @@
/*******************************************************************************
-**
-** Function avdt_msg_send_rsp
-**
-** Description This function is called to send a response message. The
-** sig_id parameter indicates the message type, p_params
-** points to the message parameters, if any. It gets a buffer
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_send_rsp
+ *
+ * Description This function is called to send a response message. The
+ * sig_id parameter indicates the message type, p_params
+ * points to the message parameters, if any. It gets a buffer
+ * 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.
+ *
+ ******************************************************************************/
void avdt_msg_send_rsp(tAVDT_CCB *p_ccb, uint8_t sig_id, tAVDT_MSG *p_params)
{
uint8_t *p;
@@ -1478,20 +1478,20 @@
/*******************************************************************************
-**
-** Function avdt_msg_send_rej
-**
-** Description This function is called to send a reject message. The
-** sig_id parameter indicates the message type. It gets
-** a buffer from the AVDTP command pool and builds the
-** message based on the message type and the error code.
-** It then queues the message in the response queue for
-** this CCB.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_send_rej
+ *
+ * Description This function is called to send a reject message. The
+ * sig_id parameter indicates the message type. It gets
+ * a buffer from the AVDTP command pool and builds the
+ * message based on the message type and the error code.
+ * It then queues the message in the response queue for
+ * this CCB.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_msg_send_rej(tAVDT_CCB *p_ccb, uint8_t sig_id, tAVDT_MSG *p_params)
{
uint8_t *p;
@@ -1535,20 +1535,20 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_send_grej
-**
-** Description This function is called to send a general reject message. The
-** sig_id parameter indicates the message type. It gets
-** a buffer from the AVDTP command pool and builds the
-** message based on the message type and the error code.
-** It then queues the message in the response queue for
-** this CCB.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_send_grej
+ *
+ * Description This function is called to send a general reject message. The
+ * sig_id parameter indicates the message type. It gets
+ * a buffer from the AVDTP command pool and builds the
+ * message based on the message type and the error code.
+ * It then queues the message in the response queue for
+ * this CCB.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_msg_send_grej(tAVDT_CCB *p_ccb, uint8_t sig_id, tAVDT_MSG *p_params)
{
uint8_t *p;
@@ -1573,18 +1573,18 @@
}
/*******************************************************************************
-**
-** Function avdt_msg_ind
-**
-** Description This function is called by the adaption layer when an
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_msg_ind
+ *
+ * Description This function is called by the adaption layer when an
+ * 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.
+ *
+ ******************************************************************************/
void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
{
tAVDT_SCB *p_scb;
diff --git a/stack/avdt/avdt_scb.cc b/stack/avdt/avdt_scb.cc
index be2e17d..f0bee25 100644
--- a/stack/avdt/avdt_scb.cc
+++ b/stack/avdt/avdt_scb.cc
@@ -35,8 +35,8 @@
#include "osi/include/osi.h"
/*****************************************************************************
-** state machine constants and types
-*****************************************************************************/
+ * state machine constants and types
+ ****************************************************************************/
#if (AVDT_DEBUG == TRUE)
/* verbose state strings for trace */
@@ -514,15 +514,15 @@
/*******************************************************************************
-**
-** Function avdt_scb_event
-**
-** Description State machine event handling function for scb
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_event
+ *
+ * Description State machine event handling function for scb
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_event(tAVDT_SCB *p_scb, uint8_t event, tAVDT_SCB_EVT *p_data)
{
tAVDT_SCB_ST_TBL state_table;
@@ -560,15 +560,15 @@
/*******************************************************************************
-**
-** Function avdt_scb_init
-**
-** Description Initialize stream control block module.
-**
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_init
+ *
+ * Description Initialize stream control block module.
+ *
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_init(void)
{
memset(&avdt_cb.scb[0], 0, sizeof(tAVDT_SCB) * AVDT_NUM_SEPS);
@@ -577,15 +577,15 @@
/*******************************************************************************
-**
-** Function avdt_scb_alloc
-**
-** Description Allocate a stream control block.
-**
-**
-** Returns pointer to the scb, or NULL if none could be allocated.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_alloc
+ *
+ * Description Allocate a stream control block.
+ *
+ *
+ * Returns pointer to the scb, or NULL if none could be allocated.
+ *
+ ******************************************************************************/
tAVDT_SCB *avdt_scb_alloc(tAVDT_CS *p_cs)
{
tAVDT_SCB *p_scb = &avdt_cb.scb[0];
@@ -620,15 +620,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_dealloc
-**
-** Description Deallocate a stream control block.
-**
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_dealloc
+ *
+ * Description Deallocate a stream control block.
+ *
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void avdt_scb_dealloc(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -638,31 +638,31 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_to_hdl
-**
-** Description Given a pointer to an scb, return its handle (or seid).
-**
-**
-** Returns Index of scb.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_to_hdl
+ *
+ * Description Given a pointer to an scb, return its handle (or seid).
+ *
+ *
+ * Returns Index of scb.
+ *
+ ******************************************************************************/
uint8_t avdt_scb_to_hdl(tAVDT_SCB *p_scb)
{
return (uint8_t) (p_scb - avdt_cb.scb + 1);
}
/*******************************************************************************
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ ******************************************************************************/
tAVDT_SCB *avdt_scb_by_hdl(uint8_t hdl)
{
tAVDT_SCB *p_scb;
@@ -688,15 +688,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_verify
-**
-** Description Verify the condition of a list of scbs.
-**
-**
-** Returns SEID that failed, or 0 if success.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_verify
+ *
+ * Description Verify the condition of a list of scbs.
+ *
+ *
+ * Returns SEID that failed, or 0 if success.
+ *
+ ******************************************************************************/
uint8_t avdt_scb_verify(tAVDT_CCB *p_ccb, uint8_t state, uint8_t *p_seid, uint16_t num_seid, uint8_t *p_err_code)
{
int i;
@@ -746,16 +746,16 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_peer_seid_list
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_peer_seid_list
+ *
+ * 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.
+ *
+ ******************************************************************************/
void avdt_scb_peer_seid_list(tAVDT_MULTI *p_multi)
{
int i;
diff --git a/stack/avdt/avdt_scb_act.cc b/stack/avdt/avdt_scb_act.cc
index 5bf52da..5244721 100644
--- a/stack/avdt/avdt_scb_act.cc
+++ b/stack/avdt/avdt_scb_act.cc
@@ -39,9 +39,9 @@
extern fixed_queue_t *btu_general_alarm_queue;
/* This table is used to lookup the callback event that matches a particular
-** state machine API request event. Note that state machine API request
-** events are at the beginning of the event list starting at zero, thus
-** allowing for this table.
+ * state machine API request event. Note that state machine API request
+ * events are at the beginning of the event list starting at zero, thus
+ * allowing for this table.
*/
const uint8_t avdt_scb_cback_evt[] = {
0, /* API_REMOVE_EVT (no event) */
@@ -57,14 +57,14 @@
};
/*******************************************************************************
-**
-** Function avdt_scb_gen_ssrc
-**
-** Description This function generates a SSRC number unique to the stream.
-**
-** Returns SSRC value.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_gen_ssrc
+ *
+ * Description This function generates a SSRC number unique to the stream.
+ *
+ * Returns SSRC value.
+ *
+ ******************************************************************************/
uint32_t avdt_scb_gen_ssrc(tAVDT_SCB *p_scb)
{
/* combine the value of the media type and codec type of the SCB */
@@ -72,15 +72,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_abort_cmd
-**
-** Description This function sends the SCB an AVDT_SCB_API_ABORT_RSP_EVT
-** to initiate sending of an abort response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_abort_cmd
+ *
+ * Description This function sends the SCB an AVDT_SCB_API_ABORT_RSP_EVT
+ * to initiate sending of an abort response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_abort_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
p_scb->role = AVDT_CLOSE_ACP;
@@ -88,15 +88,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_abort_rsp
-**
-** Description This function is an empty function; it serves as a
-** placeholder for a conformance API action function.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_abort_rsp
+ *
+ * Description This function is an empty function; it serves as a
+ * placeholder for a conformance API action function.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_abort_rsp(UNUSED_ATTR tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -104,15 +104,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_close_cmd
-**
-** Description This function sends the SCB an AVDT_SCB_API_CLOSE_RSP_EVT
-** to initiate sending of a close response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_close_cmd
+ *
+ * Description This function sends the SCB an AVDT_SCB_API_CLOSE_RSP_EVT
+ * to initiate sending of a close response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_close_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
p_scb->role = AVDT_CLOSE_ACP;
@@ -120,31 +120,31 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_close_rsp
-**
-** Description This function sets the close_code variable to the error
-** code returned in the close response.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_close_rsp
+ *
+ * Description This function sets the close_code variable to the error
+ * code returned in the close response.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_close_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
p_scb->close_code = p_data->msg.hdr.err_code;
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_getconfig_cmd
-**
-** Description This function retrieves the configuration parameters of
-** the SCB and sends the SCB an AVDT_SCB_API_GETCONFIG_RSP_EVT
-** to initiate sending of a get configuration response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_getconfig_cmd
+ *
+ * Description This function retrieves the configuration parameters of
+ * the SCB and sends the SCB an AVDT_SCB_API_GETCONFIG_RSP_EVT
+ * to initiate sending of a get configuration response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_getconfig_cmd(tAVDT_SCB *p_scb,tAVDT_SCB_EVT *p_data)
{
p_data->msg.svccap.p_cfg = &p_scb->curr_cfg;
@@ -153,15 +153,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_getconfig_rsp
-**
-** Description This function is an empty function; it serves as a
-** placeholder for a conformance API action function.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_getconfig_rsp
+ *
+ * Description This function is an empty function; it serves as a
+ * placeholder for a conformance API action function.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_getconfig_rsp(UNUSED_ATTR tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -169,32 +169,32 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_open_cmd
-**
-** Description This function sends the SCB an AVDT_SCB_API_OPEN_RSP_EVT
-** to initiate sending of an open response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_open_cmd
+ *
+ * Description This function sends the SCB an AVDT_SCB_API_OPEN_RSP_EVT
+ * to initiate sending of an open response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_open_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
avdt_scb_event(p_scb, AVDT_SCB_API_OPEN_RSP_EVT, p_data);
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_open_rej
-**
-** Description This function calls the application callback function
-** indicating the open request has failed. It initializes
-** certain SCB variables and sends a AVDT_CCB_UL_CLOSE_EVT
-** to the CCB.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_open_rej
+ *
+ * Description This function calls the application callback function
+ * indicating the open request has failed. It initializes
+ * certain SCB variables and sends a AVDT_CCB_UL_CLOSE_EVT
+ * to the CCB.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_open_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
/* do exactly same as setconfig reject */
@@ -202,15 +202,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_open_rsp
-**
-** Description This function calls avdt_ad_open_req() to initiate
-** connection of the transport channel for this stream.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_open_rsp
+ *
+ * Description This function calls avdt_ad_open_req() to initiate
+ * connection of the transport channel for this stream.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_open_rsp(tAVDT_SCB *p_scb, UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
/* initiate opening of trans channels for this SEID */
@@ -225,14 +225,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_pkt_no_frag
-**
-** Description
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_pkt_no_frag
+ *
+ * Description
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_pkt_no_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
uint8_t *p, *p_start;
@@ -303,14 +303,14 @@
#if (AVDT_REPORTING == TRUE)
/*******************************************************************************
-**
-** Function avdt_scb_hdl_report
-**
-** Description
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_report
+ *
+ * Description
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
uint8_t * avdt_scb_hdl_report(tAVDT_SCB *p_scb, uint8_t *p, uint16_t len)
{
uint16_t result = AVDT_SUCCESS;
@@ -378,14 +378,14 @@
#endif
/*******************************************************************************
-**
-** Function avdt_scb_hdl_pkt
-**
-** Description
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_pkt
+ *
+ * Description
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
#if (AVDT_REPORTING == TRUE)
@@ -401,15 +401,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_drop_pkt
-**
-** Description Drop an incoming media packet. This function is called if
-** a media packet is received in any state besides streaming.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_drop_pkt
+ *
+ * Description Drop an incoming media packet. This function is called if
+ * a media packet is received in any state besides streaming.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_drop_pkt(UNUSED_ATTR tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
AVDT_TRACE_ERROR("%s dropped incoming media packet", __func__);
@@ -417,15 +417,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_reconfig_cmd
-**
-** Description This function calls the application callback function
-** with a reconfiguration indication.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_reconfig_cmd
+ *
+ * Description This function calls the application callback function
+ * with a reconfiguration indication.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_reconfig_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
/* if command not supported */
@@ -450,15 +450,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_reconfig_rsp
-**
-** Description This function calls the application callback function
-** with a reconfiguration confirm.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_reconfig_rsp
+ *
+ * Description This function calls the application callback function
+ * with a reconfiguration confirm.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_reconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
if (p_data->msg.hdr.err_code == 0)
@@ -486,15 +486,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_security_cmd
-**
-** Description This function calls the application callback with a
-** security indication.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_security_cmd
+ *
+ * Description This function calls the application callback with a
+ * security indication.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_security_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
/* if command not supported */
@@ -515,15 +515,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_security_rsp
-**
-** Description This function calls the application callback with a
-** security confirm.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_security_rsp
+ *
+ * Description This function calls the application callback with a
+ * security confirm.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_security_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
/* call application callback */
@@ -534,16 +534,16 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_setconfig_cmd
-**
-** Description This function marks the SCB as in use and copies the
-** configuration and peer SEID to the SCB. It then calls
-** the application callback with a configuration indication.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_setconfig_cmd
+ *
+ * Description This function marks the SCB as in use and copies the
+ * configuration and peer SEID to the SCB. It then calls
+ * the application callback with a configuration indication.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_setconfig_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_CFG *p_cfg;
@@ -582,15 +582,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_setconfig_rej
-**
-** Description This function marks the SCB as not in use and calls the
-** application callback with an open confirm indicating failure.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_setconfig_rej
+ *
+ * Description This function marks the SCB as not in use and calls the
+ * application callback with an open confirm indicating failure.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_setconfig_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
/* clear scb variables */
@@ -607,15 +607,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_setconfig_rsp
-**
-** Description This function sends the SCB an AVDT_SCB_API_OPEN_REQ_EVT
-** to initiate sending of an open command message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_setconfig_rsp
+ *
+ * Description This function sends the SCB an AVDT_SCB_API_OPEN_REQ_EVT
+ * to initiate sending of an open command message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_setconfig_rsp(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -633,15 +633,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_start_cmd
-**
-** Description This function calls the application callback with a
-** start indication.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_start_cmd
+ *
+ * Description This function calls the application callback with a
+ * start indication.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_start_cmd(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -652,15 +652,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_start_rsp
-**
-** Description This function calls the application callback with a
-** start confirm.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_start_rsp
+ *
+ * Description This function calls the application callback with a
+ * start confirm.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_start_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
(*p_scb->cs.p_ctrl_cback)(avdt_scb_to_hdl(p_scb),
@@ -670,15 +670,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_suspend_cmd
-**
-** Description This function calls the application callback with a suspend
-** indication.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_suspend_cmd
+ *
+ * Description This function calls the application callback with a suspend
+ * indication.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_suspend_cmd(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -689,15 +689,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_suspend_rsp
-**
-** Description This function calls the application callback with a suspend
-** confirm.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_suspend_rsp
+ *
+ * Description This function calls the application callback with a suspend
+ * confirm.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_suspend_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
(*p_scb->cs.p_ctrl_cback)(avdt_scb_to_hdl(p_scb),
@@ -707,20 +707,20 @@
}
/*******************************************************************************
-**
-** 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
-** 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.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * 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
+ * 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.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_tc_close(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
uint8_t hdl = avdt_scb_to_hdl(p_scb);
@@ -764,30 +764,30 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_delay_rpt_req
-**
-** Description This function calls the application callback with a delay
-** report.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_delay_rpt_req
+ *
+ * Description This function calls the application callback with a delay
+ * report.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_delay_rpt_req (tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
avdt_msg_send_cmd(p_scb->p_ccb, p_scb, AVDT_SIG_DELAY_RPT, (tAVDT_MSG *) &p_data->apidelay);
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_delay_rpt_cmd
-**
-** Description This function calls the application callback with a delay
-** report.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_delay_rpt_cmd
+ *
+ * Description This function calls the application callback with a delay
+ * report.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_delay_rpt_cmd (tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
(*p_scb->cs.p_ctrl_cback)(avdt_scb_to_hdl(p_scb),
@@ -802,15 +802,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_hdl_delay_rpt_rsp
-**
-** Description This function calls the application callback with a delay
-** report.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_delay_rpt_rsp
+ *
+ * Description This function calls the application callback with a delay
+ * report.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_delay_rpt_rsp (tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
(*p_scb->cs.p_ctrl_cback)(avdt_scb_to_hdl(p_scb),
@@ -821,15 +821,15 @@
#if (AVDT_REPORTING == TRUE)
/*******************************************************************************
-**
-** Function avdt_scb_hdl_tc_close_sto
-**
-** Description This function is called when a channel is closed in OPEN
-** state. Check the channel type and process accordingly.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_tc_close_sto
+ *
+ * Description This function is called when a channel is closed in OPEN
+ * state. Check the channel type and process accordingly.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_tc_close_sto(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_CTRL avdt_ctrl;
@@ -858,17 +858,17 @@
#endif
/*******************************************************************************
-**
-** Function avdt_scb_hdl_tc_open
-**
-** Description This function is called when the transport channel is
-** opened while in the opening state. It calls the
-** application callback with an open indication or open
-** confirm depending on who initiated the open procedure.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_tc_open
+ *
+ * Description This function is called when the transport channel is
+ * opened while in the opening state. It calls the
+ * application callback with an open indication or open
+ * confirm depending on who initiated the open procedure.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_tc_open(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
uint8_t event;
@@ -901,17 +901,17 @@
#if (AVDT_REPORTING == TRUE)
/*******************************************************************************
-**
-** Function avdt_scb_hdl_tc_open_sto
-**
-** Description This function is called when the transport channel is
-** opened while in the opening state. It calls the
-** application callback with an open indication or open
-** confirm depending on who initiated the open procedure.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_tc_open_sto
+ *
+ * Description This function is called when the transport channel is
+ * opened while in the opening state. It calls the
+ * application callback with an open indication or open
+ * confirm depending on who initiated the open procedure.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_tc_open_sto(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_CTRL avdt_ctrl;
@@ -930,16 +930,16 @@
#endif
/*******************************************************************************
-**
-** Function avdt_scb_hdl_write_req
-**
-** Description This function frees the media packet currently stored in
-** the SCB, if any. Then it builds a new media packet from
-** with the passed in buffer and stores it in the SCB.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_hdl_write_req
+ *
+ * Description This function frees the media packet currently stored in
+ * the SCB, if any. Then it builds a new media packet from
+ * with the passed in buffer and stores it in the SCB.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_hdl_write_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
uint8_t *p;
@@ -981,14 +981,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_abort_req
-**
-** Description This function sends an abort command message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_abort_req
+ *
+ * Description This function sends an abort command message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_abort_req(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1005,14 +1005,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_abort_rsp
-**
-** Description This function sends an abort response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_abort_rsp
+ *
+ * Description This function sends an abort response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_abort_rsp(UNUSED_ATTR tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
avdt_msg_send_rsp(avdt_ccb_by_idx(p_data->msg.hdr.ccb_idx), AVDT_SIG_ABORT,
@@ -1020,14 +1020,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_close_req
-**
-** Description This function sends a close command message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_close_req
+ *
+ * Description This function sends a close command message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_close_req(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1041,14 +1041,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_stream_close
-**
-** Description This function sends a close command message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_stream_close
+ *
+ * Description This function sends a close command message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_stream_close(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
osi_free_and_reset((void **)&p_scb->p_pkt);
@@ -1056,28 +1056,28 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_close_rsp
-**
-** Description This function sends a close response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_close_rsp
+ *
+ * Description This function sends a close response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_close_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
avdt_msg_send_rsp(p_scb->p_ccb, AVDT_SIG_CLOSE, &p_data->msg);
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_getconfig_req
-**
-** Description This function sends a get configuration command message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_getconfig_req
+ *
+ * Description This function sends a get configuration command message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_getconfig_req(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1089,28 +1089,28 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_getconfig_rsp
-**
-** Description This function sends a get configuration response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_getconfig_rsp
+ *
+ * Description This function sends a get configuration response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_getconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
avdt_msg_send_rsp(p_scb->p_ccb, AVDT_SIG_GETCONFIG, &p_data->msg);
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_open_req
-**
-** Description This function sends an open command message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_open_req
+ *
+ * Description This function sends an open command message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_open_req(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1122,16 +1122,16 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_open_rsp
-**
-** Description This function sends an open response message. It also
-** calls avdt_ad_open_req() to accept a transport channel
-** connection.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_open_rsp
+ *
+ * Description This function sends an open response message. It also
+ * calls avdt_ad_open_req() to accept a transport channel
+ * connection.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_open_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
/* notify adaption that we're waiting for transport channel open */
@@ -1148,15 +1148,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_reconfig_req
-**
-** Description This function stores the configuration parameters in the
-** SCB and sends a reconfiguration command message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_reconfig_req
+ *
+ * Description This function stores the configuration parameters in the
+ * SCB and sends a reconfiguration command message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_reconfig_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
memcpy(&p_scb->req_cfg, p_data->msg.config_cmd.p_cfg, sizeof(tAVDT_CFG));
@@ -1165,15 +1165,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_reconfig_rsp
-**
-** Description This function stores the configuration parameters in the
-** SCB and sends a reconfiguration response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_reconfig_rsp
+ *
+ * Description This function stores the configuration parameters in the
+ * SCB and sends a reconfiguration response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_reconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
if (p_data->msg.hdr.err_code == 0)
@@ -1201,14 +1201,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_security_req
-**
-** Description This function sends a security command message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_security_req
+ *
+ * Description This function sends a security command message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_security_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
p_data->msg.hdr.seid = p_scb->peer_seid;
@@ -1216,14 +1216,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_security_rsp
-**
-** Description This function sends a security response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_security_rsp
+ *
+ * Description This function sends a security response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_security_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
if (p_data->msg.hdr.err_code == 0)
@@ -1237,15 +1237,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_setconfig_rej
-**
-** Description This function marks the SCB as not in use and sends a
-** set configuration reject message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_setconfig_rej
+ *
+ * Description This function marks the SCB as not in use and sends a
+ * set configuration reject message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_setconfig_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
if (p_scb->p_ccb != NULL)
@@ -1258,17 +1258,17 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_setconfig_req
-**
-** Description This function marks the SCB as in use and copies the
-** configuration parameters to the SCB. Then the function
-** sends a set configuration command message and initiates
-** opening of the signaling channel.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_setconfig_req
+ *
+ * Description This function marks the SCB as in use and copies the
+ * configuration parameters to the SCB. Then the function
+ * sends a set configuration command message and initiates
+ * opening of the signaling channel.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_setconfig_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_CFG *p_req, *p_cfg;
@@ -1288,16 +1288,16 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_setconfig_rsp
-**
-** Description This function copies the requested configuration into the
-** current configuration and sends a set configuration
-** response message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_setconfig_rsp
+ *
+ * Description This function copies the requested configuration into the
+ * current configuration and sends a set configuration
+ * response message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_setconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
if (p_scb->p_ccb != NULL)
@@ -1309,15 +1309,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_snd_tc_close
-**
-** Description This function calls avdt_ad_close_req() to close the
-** transport channel for this SCB.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_snd_tc_close
+ *
+ * Description This function calls avdt_ad_close_req() to close the
+ * transport channel for this SCB.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_snd_tc_close(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1329,15 +1329,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_cb_err
-**
-** Description This function calls the application callback function
-** indicating an error.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_cb_err
+ *
+ * Description This function calls the application callback function
+ * indicating an error.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_cb_err(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1355,30 +1355,30 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_cong_state
-**
-** Description This function sets the congestion state of the SCB media
-** transport channel.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_cong_state
+ *
+ * Description This function sets the congestion state of the SCB media
+ * transport channel.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_cong_state(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
p_scb->cong = p_data->llcong;
}
/*******************************************************************************
-**
-** Function avdt_scb_rej_state
-**
-** Description This function sends a reject message to the peer indicating
-** incorrect state for the received command message.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_rej_state
+ *
+ * Description This function sends a reject message to the peer indicating
+ * incorrect state for the received command message.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_rej_state(UNUSED_ATTR tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
p_data->msg.hdr.err_code = AVDT_ERR_BAD_STATE;
@@ -1388,15 +1388,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_rej_in_use
-**
-** Description This function sends a reject message to the peer indicating
-** the stream is in use.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_rej_in_use
+ *
+ * Description This function sends a reject message to the peer indicating
+ * the stream is in use.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_rej_in_use(UNUSED_ATTR tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
p_data->msg.hdr.err_code = AVDT_ERR_IN_USE;
@@ -1406,15 +1406,15 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_rej_not_in_use
-**
-** Description This function sends a reject message to the peer indicating
-** the stream is in use.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_rej_not_in_use
+ *
+ * Description This function sends a reject message to the peer indicating
+ * the stream is in use.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_rej_not_in_use(UNUSED_ATTR tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
p_data->msg.hdr.err_code = AVDT_ERR_NOT_IN_USE;
@@ -1424,14 +1424,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_set_remove
-**
-** Description This function marks an SCB to be removed.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_set_remove
+ *
+ * Description This function marks an SCB to be removed.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_set_remove(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1439,14 +1439,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_free_pkt
-**
-** Description This function frees the media packet passed in.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_free_pkt
+ *
+ * Description This function frees the media packet passed in.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_free_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_CTRL avdt_ctrl;
@@ -1465,14 +1465,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_clr_pkt
-**
-** Description This function frees the media packet stored in the SCB.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_clr_pkt
+ *
+ * Description This function frees the media packet stored in the SCB.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_clr_pkt(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1509,17 +1509,17 @@
/*******************************************************************************
-**
-** Function avdt_scb_chk_snd_pkt
-**
-** Description This function checks if the SCB is congested, and if not
-** congested it sends a stored media packet, if any. After it
-** sends the packet it calls the application callback function
-** with a write confirm.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_chk_snd_pkt
+ *
+ * Description This function checks if the SCB is congested, and if not
+ * congested it sends a stored media packet, if any. After it
+ * sends the packet it calls the application callback function
+ * with a write confirm.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_chk_snd_pkt(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1542,16 +1542,16 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_transport_channel_timer
-**
-** Description This function is called to start a timer when the peer
-** initiates closing of the stream. The timer verifies that
-** the peer disconnects the transport channel.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_transport_channel_timer
+ *
+ * Description This function is called to start a timer when the peer
+ * initiates closing of the stream. The timer verifies that
+ * the peer disconnects the transport channel.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_transport_channel_timer(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
@@ -1562,14 +1562,14 @@
}
/*******************************************************************************
-**
-** Function avdt_scb_clr_vars
-**
-** Description This function initializes certain SCB variables.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function avdt_scb_clr_vars
+ *
+ * Description This function initializes certain SCB variables.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void avdt_scb_clr_vars(tAVDT_SCB *p_scb,
UNUSED_ATTR tAVDT_SCB_EVT *p_data)
{
diff --git a/stack/avrc/avrc_api.cc b/stack/avrc/avrc_api.cc
index 8b4eeb1..0870938 100644
--- a/stack/avrc/avrc_api.cc
+++ b/stack/avrc/avrc_api.cc
@@ -32,8 +32,8 @@
#include "osi/include/osi.h"
/*****************************************************************************
-** Global data
-*****************************************************************************/
+ * Global data
+ ****************************************************************************/
extern fixed_queue_t *btu_general_alarm_queue;
@@ -71,15 +71,15 @@
#define AVRC_MSG_MASK_IS_CONTINUATION_RSP 0x02
/******************************************************************************
-**
-** Function avrc_ctrl_cback
-**
-** Description This is the callback function used by AVCTP to report
-** received link events.
-**
-** Returns Nothing.
-**
-******************************************************************************/
+ *
+ * Function avrc_ctrl_cback
+ *
+ * Description This is the callback function used by AVCTP to report
+ * received link events.
+ *
+ * Returns Nothing.
+ *
+ *****************************************************************************/
static void avrc_ctrl_cback(uint8_t handle, uint8_t event, uint16_t result,
BD_ADDR peer_addr)
{
@@ -104,14 +104,14 @@
}
/******************************************************************************
-**
-** Function avrc_flush_cmd_q
-**
-** Description Flush command queue for the specified avrc handle
-**
-** Returns Nothing.
-**
-******************************************************************************/
+ *
+ * Function avrc_flush_cmd_q
+ *
+ * Description Flush command queue for the specified avrc handle
+ *
+ * Returns Nothing.
+ *
+ *****************************************************************************/
void avrc_flush_cmd_q(uint8_t handle)
{
AVRC_TRACE_DEBUG("AVRC: Flushing command queue for handle=0x%02x", handle);
@@ -122,14 +122,14 @@
}
/******************************************************************************
-**
-** Function avrc_process_timeout
-**
-** Description Handle avrc command timeout
-**
-** Returns Nothing.
-**
-******************************************************************************/
+ *
+ * Function avrc_process_timeout
+ *
+ * Description Handle avrc command timeout
+ *
+ * Returns Nothing.
+ *
+ *****************************************************************************/
void avrc_process_timeout(void *data)
{
tAVRC_PARAM *param = (tAVRC_PARAM *)data;
@@ -153,14 +153,14 @@
}
/******************************************************************************
-**
-** Function avrc_send_next_vendor_cmd
-**
-** Description Dequeue and send next vendor command for given handle
-**
-** Returns Nothing.
-**
-******************************************************************************/
+ *
+ * Function avrc_send_next_vendor_cmd
+ *
+ * Description Dequeue and send next vendor command for given handle
+ *
+ * Returns Nothing.
+ *
+ *****************************************************************************/
void avrc_send_next_vendor_cmd(uint8_t handle)
{
BT_HDR *p_next_cmd;
@@ -192,14 +192,14 @@
}
/******************************************************************************
-**
-** Function avrc_start_cmd_timer
-**
-** Description Start timer for waiting for responses
-**
-** Returns Nothing.
-**
-******************************************************************************/
+ *
+ * Function avrc_start_cmd_timer
+ *
+ * Description Start timer for waiting for responses
+ *
+ * Returns Nothing.
+ *
+ *****************************************************************************/
void avrc_start_cmd_timer(uint8_t handle, uint8_t label, uint8_t msg_mask)
{
tAVRC_PARAM *param = static_cast<tAVRC_PARAM *>(osi_malloc(sizeof(tAVRC_PARAM)));
@@ -216,29 +216,29 @@
}
/******************************************************************************
-**
-** Function avrc_get_data_ptr
-**
-** Description Gets a pointer to the data payload in the packet.
-**
-** Returns A pointer to the data payload.
-**
-******************************************************************************/
+ *
+ * Function avrc_get_data_ptr
+ *
+ * Description Gets a pointer to the data payload in the packet.
+ *
+ * Returns A pointer to the data payload.
+ *
+ *****************************************************************************/
static uint8_t * avrc_get_data_ptr(BT_HDR *p_pkt)
{
return (uint8_t *)(p_pkt + 1) + p_pkt->offset;
}
/******************************************************************************
-**
-** Function avrc_copy_packet
-**
-** Description Copies an AVRC packet to a new buffer. In the new buffer,
-** the payload offset is at least AVCT_MSG_OFFSET octets.
-**
-** Returns The buffer with the copied data.
-**
-******************************************************************************/
+ *
+ * Function avrc_copy_packet
+ *
+ * Description Copies an AVRC packet to a new buffer. In the new buffer,
+ * the payload offset is at least AVCT_MSG_OFFSET octets.
+ *
+ * Returns The buffer with the copied data.
+ *
+ *****************************************************************************/
static BT_HDR * avrc_copy_packet(BT_HDR *p_pkt, int rsp_pkt_len)
{
const int offset = MAX(AVCT_MSG_OFFSET, p_pkt->offset);
@@ -257,14 +257,14 @@
#if (AVRC_METADATA_INCLUDED == TRUE)
/******************************************************************************
-**
-** Function avrc_prep_end_frag
-**
-** Description This function prepares an end response fragment
-**
-** Returns Nothing.
-**
-******************************************************************************/
+ *
+ * Function avrc_prep_end_frag
+ *
+ * Description This function prepares an end response fragment
+ *
+ * Returns Nothing.
+ *
+ *****************************************************************************/
static void avrc_prep_end_frag(uint8_t handle)
{
tAVRC_FRAG_CB *p_fcb;
@@ -297,15 +297,15 @@
}
/******************************************************************************
-**
-** Function avrc_send_continue_frag
-**
-** Description This function sends a continue response fragment
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function avrc_send_continue_frag
+ *
+ * Description This function sends a continue response fragment
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
static uint16_t avrc_send_continue_frag(uint8_t handle, uint8_t label)
{
tAVRC_FRAG_CB *p_fcb;
@@ -347,14 +347,14 @@
}
/******************************************************************************
-**
-** Function avrc_proc_vendor_command
-**
-** Description This function processes received vendor command.
-**
-** Returns if not NULL, the response to send right away.
-**
-******************************************************************************/
+ *
+ * Function avrc_proc_vendor_command
+ *
+ * Description This function processes received vendor command.
+ *
+ * Returns if not NULL, the response to send right away.
+ *
+ *****************************************************************************/
static BT_HDR * avrc_proc_vendor_command(uint8_t handle, uint8_t label,
BT_HDR *p_pkt, tAVRC_MSG_VENDOR *p_msg)
{
@@ -456,15 +456,15 @@
}
/******************************************************************************
-**
-** Function avrc_proc_far_msg
-**
-** Description This function processes metadata fragmenation
-** and reassembly
-**
-** Returns 0, to report the message with msg_cback .
-**
-******************************************************************************/
+ *
+ * Function avrc_proc_far_msg
+ *
+ * Description This function processes metadata fragmenation
+ * and reassembly
+ *
+ * Returns 0, to report the message with msg_cback .
+ *
+ *****************************************************************************/
static uint8_t avrc_proc_far_msg(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR **pp_pkt,
tAVRC_MSG_VENDOR *p_msg)
{
@@ -638,15 +638,15 @@
#endif /* (AVRC_METADATA_INCLUDED == TRUE) */
/******************************************************************************
-**
-** Function avrc_msg_cback
-**
-** Description This is the callback function used by AVCTP to report
-** received AV control messages.
-**
-** Returns Nothing.
-**
-******************************************************************************/
+ *
+ * Function avrc_msg_cback
+ *
+ * Description This is the callback function used by AVCTP to report
+ * received AV control messages.
+ *
+ * Returns Nothing.
+ *
+ *****************************************************************************/
static void avrc_msg_cback(uint8_t handle, uint8_t label, uint8_t cr,
BT_HDR *p_pkt)
{
@@ -990,21 +990,21 @@
/******************************************************************************
-**
-** Function avrc_pass_msg
-**
-** Description Compose a PASS THROUGH command according to p_msg
-**
-** Input Parameters:
-** p_msg: Pointer to PASS THROUGH message structure.
-**
-** Output Parameters:
-** None.
-**
-** Returns pointer to a valid GKI buffer if successful.
-** NULL if p_msg is NULL.
-**
-******************************************************************************/
+ *
+ * Function avrc_pass_msg
+ *
+ * Description Compose a PASS THROUGH command according to p_msg
+ *
+ * Input Parameters:
+ * p_msg: Pointer to PASS THROUGH message structure.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns pointer to a valid GKI buffer if successful.
+ * NULL if p_msg is NULL.
+ *
+ *****************************************************************************/
static BT_HDR * avrc_pass_msg(tAVRC_MSG_PASS *p_msg)
{
assert(p_msg != NULL);
@@ -1039,50 +1039,50 @@
}
/******************************************************************************
-**
-** Function AVRC_Open
-**
-** 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.
-** The connection can be a target, a controller or for both role,
-** 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.
-** 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
-** AVRC_CLOSE_IND_EVT is received.
-**
-** Input Parameters:
-** p_ccb->company_id: Company Identifier.
-**
-** 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.
-**
-** p_ccb->control: Control role. This is set to
-** AVRC_CT_TARGET for target connections, AVRC_CT_CONTROL
-** for control connections or (AVRC_CT_TARGET|AVRC_CT_CONTROL)
-** for connections that support both roles.
-**
-** peer_addr: BD address of peer device. This value is
-** only used for initiator connections; for acceptor
-** connections it can be set to NULL.
-**
-** Output Parameters:
-** p_handle: Pointer to handle. This parameter is only
-** valid if AVRC_SUCCESS is returned.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_NO_RESOURCES if there are not enough resources to open
-** the connection.
-**
-******************************************************************************/
+ *
+ * Function AVRC_Open
+ *
+ * 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.
+ * The connection can be a target, a controller or for both role,
+ * 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.
+ * 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
+ * AVRC_CLOSE_IND_EVT is received.
+ *
+ * Input Parameters:
+ * p_ccb->company_id: Company Identifier.
+ *
+ * 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.
+ *
+ * p_ccb->control: Control role. This is set to
+ * AVRC_CT_TARGET for target connections, AVRC_CT_CONTROL
+ * for control connections or (AVRC_CT_TARGET|AVRC_CT_CONTROL)
+ * for connections that support both roles.
+ *
+ * peer_addr: BD address of peer device. This value is
+ * only used for initiator connections; for acceptor
+ * connections it can be set to NULL.
+ *
+ * Output Parameters:
+ * p_handle: Pointer to handle. This parameter is only
+ * valid if AVRC_SUCCESS is returned.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_NO_RESOURCES if there are not enough resources to open
+ * the connection.
+ *
+ *****************************************************************************/
uint16_t AVRC_Open(uint8_t *p_handle, tAVRC_CONN_CB *p_ccb, BD_ADDR_PTR peer_addr)
{
uint16_t status;
@@ -1113,23 +1113,23 @@
}
/******************************************************************************
-**
-** Function AVRC_Close
-**
-** Description Close a connection opened with AVRC_Open().
-** This function is called when the
-** application is no longer using a connection.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_Close
+ *
+ * Description Close a connection opened with AVRC_Open().
+ * This function is called when the
+ * application is no longer using a connection.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
uint16_t AVRC_Close(uint8_t handle)
{
AVRC_TRACE_DEBUG("%s handle:%d", __func__, handle);
@@ -1137,57 +1137,57 @@
}
/******************************************************************************
-**
-** Function AVRC_OpenBrowse
-**
-** 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 p_conn_role.
-** The handle is returned by a previous call to AVRC_Open.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_NO_RESOURCES if there are not enough resources to open
-** the connection.
-**
-******************************************************************************/
+ *
+ * Function AVRC_OpenBrowse
+ *
+ * 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 p_conn_role.
+ * The handle is returned by a previous call to AVRC_Open.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_NO_RESOURCES if there are not enough resources to open
+ * the connection.
+ *
+ *****************************************************************************/
uint16_t AVRC_OpenBrowse(uint8_t handle, uint8_t conn_role)
{
return AVCT_CreateBrowse(handle, conn_role);
}
/******************************************************************************
-**
-** Function AVRC_CloseBrowse
-**
-** Description Close a connection opened with AVRC_OpenBrowse().
-** This function is called when the
-** application is no longer using a connection.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_CloseBrowse
+ *
+ * Description Close a connection opened with AVRC_OpenBrowse().
+ * This function is called when the
+ * application is no longer using a connection.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
uint16_t AVRC_CloseBrowse(uint8_t handle)
{
return AVCT_RemoveBrowse(handle);
}
/******************************************************************************
-**
-** Function AVRC_MsgReq
-**
-** 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
-** The above BT_HDR settings are set by the AVRC_Bld* functions.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_MsgReq
+ *
+ * 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
+ * The above BT_HDR settings are set by the AVRC_Bld* functions.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
uint16_t AVRC_MsgReq (uint8_t handle, uint8_t label, uint8_t ctype, BT_HDR *p_pkt)
{
#if (AVRC_METADATA_INCLUDED == TRUE)
@@ -1364,28 +1364,28 @@
/******************************************************************************
-**
-** Function AVRC_PassCmd
-**
-** Description Send a PASS THROUGH command to the peer device. This
-** function can only be called for controller role connections.
-** Any response message from the peer is passed back through
-** the tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label.
-**
-** p_msg: Pointer to PASS THROUGH message structure.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_PassCmd
+ *
+ * Description Send a PASS THROUGH command to the peer device. This
+ * function can only be called for controller role connections.
+ * Any response message from the peer is passed back through
+ * the tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label.
+ *
+ * p_msg: Pointer to PASS THROUGH message structure.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
uint16_t AVRC_PassCmd(uint8_t handle, uint8_t label, tAVRC_MSG_PASS *p_msg)
{
BT_HDR *p_buf;
@@ -1408,30 +1408,30 @@
}
/******************************************************************************
-**
-** Function AVRC_PassRsp
-**
-** Description Send a PASS THROUGH response to the peer device. This
-** 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.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label. Must be the same value as
-** passed with the command message in the callback function.
-**
-** p_msg: Pointer to PASS THROUGH message structure.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_PassRsp
+ *
+ * Description Send a PASS THROUGH response to the peer device. This
+ * 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.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label. Must be the same value as
+ * passed with the command message in the callback function.
+ *
+ * p_msg: Pointer to PASS THROUGH message structure.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
uint16_t AVRC_PassRsp(uint8_t handle, uint8_t label, tAVRC_MSG_PASS *p_msg)
{
BT_HDR *p_buf;
diff --git a/stack/avrc/avrc_bld_ct.cc b/stack/avrc/avrc_bld_ct.cc
index 4edbc64..b54d98f 100644
--- a/stack/avrc/avrc_bld_ct.cc
+++ b/stack/avrc/avrc_bld_ct.cc
@@ -23,21 +23,21 @@
#include "avrc_int.h"
/*****************************************************************************
-** Global data
-*****************************************************************************/
+ * Global data
+ ****************************************************************************/
#if (AVRC_METADATA_INCLUDED == TRUE)
/*******************************************************************************
-**
-** Function avrc_bld_next_cmd
-**
-** Description This function builds the Request Continue or Abort command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_next_cmd
+ *
+ * Description This function builds the Request Continue or Abort command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_next_cmd (tAVRC_NEXT_CMD *p_cmd, BT_HDR *p_pkt)
{
uint8_t *p_data, *p_start;
@@ -57,20 +57,20 @@
}
/*****************************************************************************
-** the following commands are introduced in AVRCP 1.4
-*****************************************************************************/
+ * the following commands are introduced in AVRCP 1.4
+ ****************************************************************************/
#if (AVRC_ADV_CTRL_INCLUDED == TRUE)
/*******************************************************************************
-**
-** Function avrc_bld_set_abs_volume_cmd
-**
-** Description This function builds the Set Absolute Volume command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_set_abs_volume_cmd
+ *
+ * Description This function builds the Set Absolute Volume command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_set_abs_volume_cmd (tAVRC_SET_VOLUME_CMD *p_cmd, BT_HDR *p_pkt)
{
uint8_t *p_data, *p_start;
@@ -87,15 +87,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_register_notifn
-**
-** Description This function builds the register notification.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_register_notifn
+ *
+ * Description This function builds the register notification.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_register_notifn(BT_HDR * p_pkt, uint8_t event_id, uint32_t event_param)
{
uint8_t *p_data, *p_start;
@@ -115,15 +115,15 @@
#endif
/*******************************************************************************
-**
-** Function avrc_bld_get_capability_cmd
-**
-** Description This function builds the get capability command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_capability_cmd
+ *
+ * Description This function builds the get capability command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_capability_cmd(BT_HDR * p_pkt, uint8_t cap_id)
{
AVRC_TRACE_API("avrc_bld_get_capability_cmd");
@@ -137,15 +137,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_list_player_app_attr_cmd
-**
-** Description This function builds the list player app attrib command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_list_player_app_attr_cmd
+ *
+ * Description This function builds the list player app attrib command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_list_player_app_attr_cmd(BT_HDR * p_pkt)
{
AVRC_TRACE_API("avrc_bld_list_player_app_attr_cmd");
@@ -158,15 +158,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_list_player_app_values_cmd
-**
-** Description This function builds the list player app values command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_list_player_app_values_cmd
+ *
+ * Description This function builds the list player app values command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_list_player_app_values_cmd(BT_HDR * p_pkt, uint8_t attrib_id)
{
AVRC_TRACE_API("avrc_bld_list_player_app_values_cmd");
@@ -180,15 +180,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_current_player_app_values_cmd
-**
-** Description This function builds the get current player app setting values command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_current_player_app_values_cmd
+ *
+ * Description This function builds the get current player app setting values command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_current_player_app_values_cmd(
BT_HDR * p_pkt, uint8_t num_attrib_id, uint8_t* attrib_ids)
{
@@ -208,15 +208,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_set_current_player_app_values_cmd
-**
-** Description This function builds the set current player app setting values command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_set_current_player_app_values_cmd
+ *
+ * Description This function builds the set current player app setting values command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_set_current_player_app_values_cmd(BT_HDR * p_pkt, uint8_t num_attrib_id, tAVRC_APP_SETTING* p_val)
{
AVRC_TRACE_API("avrc_bld_set_current_player_app_values_cmd");
@@ -239,15 +239,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_player_app_setting_attr_text_cmd
-**
-** Description This function builds the get player app setting attribute text command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_player_app_setting_attr_text_cmd
+ *
+ * Description This function builds the get player app setting attribute text command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_player_app_setting_attr_text_cmd (BT_HDR * p_pkt, tAVRC_GET_APP_ATTR_TXT_CMD *p_cmd)
{
AVRC_TRACE_API("%s", __func__);
@@ -268,15 +268,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_player_app_setting_value_text_cmd
-**
-** Description This function builds the get player app setting value text command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_player_app_setting_value_text_cmd
+ *
+ * Description This function builds the get player app setting value text command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_player_app_setting_value_text_cmd (BT_HDR * p_pkt, tAVRC_GET_APP_VAL_TXT_CMD *p_cmd)
{
AVRC_TRACE_API("%s", __func__);
@@ -297,15 +297,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_element_attr_cmd
-**
-** Description This function builds the get element attribute command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_element_attr_cmd
+ *
+ * Description This function builds the get element attribute command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_element_attr_cmd(BT_HDR * p_pkt, uint8_t num_attrib, uint32_t* attrib_ids)
{
AVRC_TRACE_API("avrc_bld_get_element_attr_cmd");
@@ -330,15 +330,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_play_item_cmd
-**
-** Description This function builds the play item cmd
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_play_item_cmd
+ *
+ * Description This function builds the play item cmd
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_play_item_cmd(
BT_HDR * p_pkt, uint8_t scope, uint8_t *uid, uint16_t uid_counter)
{
@@ -358,15 +358,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_play_status_cmd
-**
-** Description This function builds the get play status command.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_play_status_cmd
+ *
+ * Description This function builds the get play status command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_play_status_cmd(BT_HDR * p_pkt)
{
AVRC_TRACE_API("avrc_bld_list_player_app_attr_cmd");
@@ -379,15 +379,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_folder_items_cmd
-**
-** Description This function builds the get folder items cmd.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_folder_items_cmd
+ *
+ * Description This function builds the get folder items cmd.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_folder_items_cmd(BT_HDR *p_pkt, const tAVRC_GET_ITEMS_CMD *cmd)
{
AVRC_TRACE_API("avrc_bld_get_folder_items_cmd scope %d, start_item %d, end_item %d",
@@ -410,15 +410,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_change_folder_cmd
-**
-** Description This function builds the change folder command
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_change_folder_cmd
+ *
+ * Description This function builds the change folder command
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_change_folder_cmd(BT_HDR *p_pkt, const tAVRC_CHG_PATH_CMD *cmd)
{
AVRC_TRACE_API("avrc_bld_change_folder_cmd");
@@ -439,15 +439,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_set_browsed_player_cmd
-**
-** Description This function builds the set browsed player cmd.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_set_browsed_player_cmd
+ *
+ * Description This function builds the set browsed player cmd.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_set_browsed_player_cmd(BT_HDR *p_pkt, const tAVRC_SET_BR_PLAYER_CMD *cmd)
{
AVRC_TRACE_API("%s", __func__);
@@ -466,15 +466,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_set_addressed_player_cmd
-**
-** Description This function builds the set addressed player cmd.
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_set_addressed_player_cmd
+ *
+ * Description This function builds the set addressed player cmd.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_set_addressed_player_cmd(
BT_HDR *p_pkt, const tAVRC_SET_ADDR_PLAYER_CMD *cmd)
{
@@ -493,15 +493,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_init_cmd_buffer
-**
-** Description This function initializes the command buffer based on PDU
-**
-** Returns NULL, if no GKI buffer or failure to build the message.
-** Otherwise, the GKI buffer that contains the initialized message.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_init_cmd_buffer
+ *
+ * Description This function initializes the command buffer based on PDU
+ *
+ * Returns NULL, if no GKI buffer or failure to build the message.
+ * Otherwise, the GKI buffer that contains the initialized message.
+ *
+ ******************************************************************************/
static BT_HDR *avrc_bld_init_cmd_buffer(tAVRC_COMMAND *p_cmd)
{
uint16_t chnl = AVCT_DATA_CTRL;
@@ -556,16 +556,16 @@
}
/*******************************************************************************
-**
-** Function AVRC_BldCommand
-**
-** Description This function builds the given AVRCP command to the given
-** GKI buffer
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function AVRC_BldCommand
+ *
+ * Description This function builds the given AVRCP command to the given
+ * GKI buffer
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
tAVRC_STS AVRC_BldCommand( tAVRC_COMMAND *p_cmd, BT_HDR **pp_pkt)
{
tAVRC_STS status = AVRC_STS_BAD_PARAM;
diff --git a/stack/avrc/avrc_bld_tg.cc b/stack/avrc/avrc_bld_tg.cc
index b0950ac..30b8b53 100644
--- a/stack/avrc/avrc_bld_tg.cc
+++ b/stack/avrc/avrc_bld_tg.cc
@@ -26,8 +26,8 @@
#include "osi/include/osi.h"
/*****************************************************************************
-** Global data
-*****************************************************************************/
+ * Global data
+ ****************************************************************************/
#if (AVRC_METADATA_INCLUDED == TRUE)
#define AVRC_ITEM_PLAYER_IS_VALID(_p_player) ((_p_player)->name.p_str && \
((_p_player)->major_type & AVRC_MJ_TYPE_INVALID) == 0 && \
@@ -39,15 +39,15 @@
#define AVRC_MIN_LEN_GET_FOLDER_ITEMS_RSP 17 /* 17 = item_type(1) + item len(2) + min item (14) */
/*******************************************************************************
-**
-** Function avrc_bld_get_capability_rsp
-**
-** Description This function builds the Get Capability response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_capability_rsp
+ *
+ * Description This function builds the Get Capability response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_capability_rsp (tAVRC_GET_CAPS_RSP *p_rsp, BT_HDR *p_pkt)
{
uint8_t *p_data, *p_start, *p_len, *p_count;
@@ -116,16 +116,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_list_app_settings_attr_rsp
-**
-** Description This function builds the List Application Settings Attribute
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_list_app_settings_attr_rsp
+ *
+ * Description This function builds the List Application Settings Attribute
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_list_app_settings_attr_rsp (tAVRC_LIST_APP_ATTR_RSP *p_rsp,
BT_HDR *p_pkt)
{
@@ -168,16 +168,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_list_app_settings_values_rsp
-**
-** Description This function builds the List Application Setting Values
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_list_app_settings_values_rsp
+ *
+ * Description This function builds the List Application Setting Values
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_list_app_settings_values_rsp (tAVRC_LIST_APP_VALUES_RSP *p_rsp,
BT_HDR *p_pkt)
{
@@ -218,16 +218,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_cur_app_setting_value_rsp
-**
-** Description This function builds the Get Current Application Setting Value
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_cur_app_setting_value_rsp
+ *
+ * Description This function builds the Get Current Application Setting Value
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_cur_app_setting_value_rsp (tAVRC_GET_CUR_APP_VALUE_RSP *p_rsp,
BT_HDR *p_pkt)
{
@@ -277,16 +277,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_set_app_setting_value_rsp
-**
-** Description This function builds the Set Application Setting Value
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_set_app_setting_value_rsp
+ *
+ * Description This function builds the Set Application Setting Value
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_set_app_setting_value_rsp (UNUSED_ATTR tAVRC_RSP *p_rsp,
UNUSED_ATTR BT_HDR *p_pkt)
{
@@ -296,16 +296,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_app_setting_text_rsp
-**
-** Description This function builds the Get Application Settings Attribute Text
-** or Get Application Settings Value Text response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_app_setting_text_rsp
+ *
+ * Description This function builds the Get Application Settings Attribute Text
+ * or Get Application Settings Value Text response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_app_setting_text_rsp (tAVRC_GET_APP_ATTR_TXT_RSP *p_rsp,
BT_HDR *p_pkt)
{
@@ -373,16 +373,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_app_setting_attr_text_rsp
-**
-** Description This function builds the Get Application Setting Attribute Text
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_app_setting_attr_text_rsp
+ *
+ * Description This function builds the Get Application Setting Attribute Text
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_app_setting_attr_text_rsp (tAVRC_GET_APP_ATTR_TXT_RSP *p_rsp,
BT_HDR *p_pkt)
{
@@ -391,16 +391,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_app_setting_value_text_rsp
-**
-** Description This function builds the Get Application Setting Value Text
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_app_setting_value_text_rsp
+ *
+ * Description This function builds the Get Application Setting Value Text
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_app_setting_value_text_rsp (tAVRC_GET_APP_ATTR_TXT_RSP *p_rsp,
BT_HDR *p_pkt)
{
@@ -409,16 +409,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_inform_charset_rsp
-**
-** Description This function builds the Inform Displayable Character Set
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_inform_charset_rsp
+ *
+ * Description This function builds the Inform Displayable Character Set
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_inform_charset_rsp (UNUSED_ATTR tAVRC_RSP *p_rsp,
UNUSED_ATTR BT_HDR *p_pkt)
{
@@ -428,16 +428,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_inform_battery_status_rsp
-**
-** Description This function builds the Inform Battery Status
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_inform_battery_status_rsp
+ *
+ * Description This function builds the Inform Battery Status
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_inform_battery_status_rsp (UNUSED_ATTR tAVRC_RSP *p_rsp,
UNUSED_ATTR BT_HDR *p_pkt)
{
@@ -552,16 +552,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_play_status_rsp
-**
-** Description This function builds the Get Play Status
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_play_status_rsp
+ *
+ * Description This function builds the Get Play Status
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_play_status_rsp (tAVRC_GET_PLAY_STATUS_RSP *p_rsp,
BT_HDR *p_pkt)
{
@@ -582,15 +582,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_notify_rsp
-**
-** Description This function builds the Notification response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_notify_rsp
+ *
+ * Description This function builds the Notification response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_notify_rsp (tAVRC_REG_NOTIF_RSP *p_rsp, BT_HDR *p_pkt)
{
uint8_t *p_data, *p_start;
@@ -723,16 +723,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_next_rsp
-**
-** Description This function builds the Request Continue or Abort
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_next_rsp
+ *
+ * Description This function builds the Request Continue or Abort
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_next_rsp (tAVRC_NEXT_RSP *p_rsp, BT_HDR *p_pkt)
{
uint8_t *p_start = (uint8_t *)(p_pkt + 1) + p_pkt->offset;
@@ -746,14 +746,14 @@
}
/*****************************************************************************
-**
-** Function avrc_bld_set_absolute_volume_rsp
-**
-** Description This function builds the set absolute volume response
-**
-** Returns AVRC_STS_NO_ERROR, if the response is build successfully
-**
-******************************************************************************/
+ *
+ * Function avrc_bld_set_absolute_volume_rsp
+ *
+ * Description This function builds the set absolute volume response
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is build successfully
+ *
+ *****************************************************************************/
static tAVRC_STS avrc_bld_set_absolute_volume_rsp(uint8_t abs_vol, BT_HDR *p_pkt)
{
AVRC_TRACE_API("%s", __func__);
@@ -768,16 +768,16 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_group_navigation_rsp
-**
-** Description This function builds the Group Navigation
-** response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_group_navigation_rsp
+ *
+ * Description This function builds the Group Navigation
+ * response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
tAVRC_STS avrc_bld_group_navigation_rsp (uint16_t navi_id, BT_HDR *p_pkt)
{
if (!AVRC_IS_VALID_GROUP(navi_id))
@@ -793,14 +793,14 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_rejected_rsp
-**
-** Description This function builds the General Response response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_rejected_rsp
+ *
+ * Description This function builds the General Response response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_rejected_rsp( tAVRC_RSP *p_rsp, BT_HDR *p_pkt )
{
uint8_t *p_start = (uint8_t *)(p_pkt + 1) + p_pkt->offset;
@@ -832,19 +832,19 @@
}
/*****************************************************************************
-** the following commands are introduced in AVRCP 1.4
-*****************************************************************************/
+ * the following commands are introduced in AVRCP 1.4
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function avrc_bld_ctrl_status_rsp
-**
-** Description This function builds the responses with a uint8_t parameter.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_ctrl_status_rsp
+ *
+ * Description This function builds the responses with a uint8_t parameter.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_ctrl_status_rsp (tAVRC_RSP *p_rsp, BT_HDR *p_pkt)
{
uint8_t *p_start = (uint8_t *)(p_pkt + 1) + p_pkt->offset;
@@ -861,15 +861,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_set_addr_player_rsp
-**
-** Description This function builds the Set Addresses Player response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_set_addr_player_rsp
+ *
+ * Description This function builds the Set Addresses Player response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_set_addr_player_rsp (tAVRC_RSP *p_rsp, BT_HDR *p_pkt)
{
AVRC_TRACE_API("%s", __func__);
@@ -877,17 +877,17 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_set_browsed_player_rsp
-**
-** Description This function builds the Set Browsed Player response.
-**
-** This message goes through the Browsing channel
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_set_browsed_player_rsp
+ *
+ * Description This function builds the Set Browsed Player response.
+ *
+ * This message goes through the Browsing channel
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_set_browsed_player_rsp (tAVRC_SET_BR_PLAYER_RSP *p_rsp,
BT_HDR *p_pkt)
{
@@ -950,21 +950,21 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_folder_items_rsp
-**
-** Description This function builds the Get Folder Items response.
-** The error code is returned in *p_status.
-** AVRC_STS_INTERNAL_ERR means no buffers.
-** Try again later or with smaller item_count
-**
-** This message goes through the Browsing channel
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** AVRC_STS_INTERNAL_ERR, if the given buffer does not have enough room
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_folder_items_rsp
+ *
+ * Description This function builds the Get Folder Items response.
+ * The error code is returned in *p_status.
+ * AVRC_STS_INTERNAL_ERR means no buffers.
+ * Try again later or with smaller item_count
+ *
+ * This message goes through the Browsing channel
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * AVRC_STS_INTERNAL_ERR, if the given buffer does not have enough room
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_folder_items_rsp (tAVRC_GET_ITEMS_RSP *p_rsp, BT_HDR *p_pkt)
{
uint8_t *p_data, *p_start;
@@ -1171,17 +1171,17 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_change_path_rsp
-**
-** Description This function builds the Change Path response.
-**
-** This message goes through the Browsing channel
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_change_path_rsp
+ *
+ * Description This function builds the Change Path response.
+ *
+ * This message goes through the Browsing channel
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_change_path_rsp (tAVRC_CHG_PATH_RSP *p_rsp, BT_HDR *p_pkt)
{
uint8_t *p_data, *p_start;
@@ -1198,19 +1198,19 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_item_attrs_rsp
-**
-** Description This function builds the GetItemAttributes response,
-**
-** The Get Item Attributes message goes through the
-** Browsing channel (already specified in the |p_pkt|)
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** AVRC_STS_INTERNAL_ERR, if the given buffer does not have enough room
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_attrs_rsp
+ *
+ * Description This function builds the GetItemAttributes response,
+ *
+ * The Get Item Attributes message goes through the
+ * Browsing channel (already specified in the |p_pkt|)
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * AVRC_STS_INTERNAL_ERR, if the given buffer does not have enough room
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_item_attrs_rsp (tAVRC_GET_ATTRS_RSP *p_rsp,
BT_HDR *p_pkt) {
AVRC_TRACE_API("%s", __func__);
@@ -1275,18 +1275,18 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_get_num_of_item_rsp
-**
-** Description This function builds the Get Total Number of Items response.
-**
-** This message goes through the Browsing channel
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** AVRC_STS_INTERNAL_ERR, if the given buffer does not have enough room
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_get_num_of_item_rsp
+ *
+ * Description This function builds the Get Total Number of Items response.
+ *
+ * This message goes through the Browsing channel
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * AVRC_STS_INTERNAL_ERR, if the given buffer does not have enough room
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_get_num_of_item_rsp (tAVRC_GET_NUM_OF_ITEMS_RSP *p_rsp, BT_HDR *p_pkt)
{
uint8_t *p_data, *p_start, *p_len;
@@ -1317,17 +1317,17 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_search_rsp
-**
-** Description This function builds the Search response.
-**
-** This message goes through the Browsing channel
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_search_rsp
+ *
+ * Description This function builds the Search response.
+ *
+ * This message goes through the Browsing channel
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_search_rsp (tAVRC_SEARCH_RSP *p_rsp, BT_HDR *p_pkt)
{
uint8_t *p_data, *p_start, *p_len;
@@ -1347,15 +1347,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_play_item_rsp
-**
-** Description This function builds the Play Item response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_play_item_rsp
+ *
+ * Description This function builds the Play Item response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_play_item_rsp (tAVRC_RSP *p_rsp, BT_HDR *p_pkt)
{
AVRC_TRACE_API("%s", __func__);
@@ -1363,15 +1363,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_add_to_now_playing_rsp
-**
-** Description This function builds the Add to Now Playing response.
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_add_to_now_playing_rsp
+ *
+ * Description This function builds the Add to Now Playing response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_bld_add_to_now_playing_rsp (tAVRC_RSP *p_rsp, BT_HDR *p_pkt)
{
AVRC_TRACE_API("%s", __func__);
@@ -1379,15 +1379,15 @@
}
/*******************************************************************************
-**
-** Function avrc_bld_init_rsp_buffer
-**
-** Description This function initializes the response buffer based on PDU
-**
-** Returns NULL, if no buffer or failure to build the message.
-** Otherwise, the buffer that contains the initialized message.
-**
-*******************************************************************************/
+ *
+ * Function avrc_bld_init_rsp_buffer
+ *
+ * Description This function initializes the response buffer based on PDU
+ *
+ * Returns NULL, if no buffer or failure to build the message.
+ * Otherwise, the buffer that contains the initialized message.
+ *
+ ******************************************************************************/
static BT_HDR *avrc_bld_init_rsp_buffer(tAVRC_RESPONSE *p_rsp)
{
uint16_t offset = 0;
@@ -1451,16 +1451,16 @@
}
/*******************************************************************************
-**
-** Function AVRC_BldResponse
-**
-** Description This function builds the given AVRCP response to the given
-** buffer
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function AVRC_BldResponse
+ *
+ * Description This function builds the given AVRCP response to the given
+ * buffer
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
tAVRC_STS AVRC_BldResponse( uint8_t handle, tAVRC_RESPONSE *p_rsp, BT_HDR **pp_pkt)
{
tAVRC_STS status = AVRC_STS_BAD_PARAM;
diff --git a/stack/avrc/avrc_int.h b/stack/avrc/avrc_int.h
index d55c061..5fb2706 100644
--- a/stack/avrc/avrc_int.h
+++ b/stack/avrc/avrc_int.h
@@ -40,8 +40,8 @@
* #define META_DEBUG_ENABLED
*/
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/* Number of attributes in AVRC SDP record. */
#define AVRC_NUM_ATTR 6
@@ -107,8 +107,8 @@
#define AVRC_CB_FLAGS_RSP_PENDING 0x01 /* Waiting for AVRC response */
/*****************************************************************************
-** Type definitions
-*****************************************************************************/
+ * Type definitions
+ ****************************************************************************/
#if (AVRC_METADATA_INCLUDED == TRUE)
/* type for Metadata fragmentation control block */
@@ -150,8 +150,8 @@
} tAVRC_CB;
/******************************************************************************
-** Main Control Block
-*******************************************************************************/
+ * Main Control Block
+ ******************************************************************************/
extern tAVRC_CB avrc_cb;
extern bool avrc_is_valid_pdu_id(uint8_t pdu_id);
diff --git a/stack/avrc/avrc_opt.cc b/stack/avrc/avrc_opt.cc
index 25e58fe..77c6844 100644
--- a/stack/avrc/avrc_opt.cc
+++ b/stack/avrc/avrc_opt.cc
@@ -29,21 +29,21 @@
#include "avrc_int.h"
/******************************************************************************
-**
-** Function avrc_vendor_msg
-**
-** Description Compose a VENDOR DEPENDENT command according to p_msg
-**
-** Input Parameters:
-** p_msg: Pointer to VENDOR DEPENDENT message structure.
-**
-** Output Parameters:
+ *
+ * Function avrc_vendor_msg
+ *
+ * Description Compose a VENDOR DEPENDENT command according to p_msg
+ *
+ * Input Parameters:
+ * p_msg: Pointer to VENDOR DEPENDENT message structure.
+ *
+ * Output Parameters:
* None.
-**
-** Returns pointer to a valid GKI buffer if successful.
-** NULL if p_msg is NULL.
-**
-******************************************************************************/
+ *
+ * Returns pointer to a valid GKI buffer if successful.
+ * NULL if p_msg is NULL.
+ *
+ *****************************************************************************/
static BT_HDR * avrc_vendor_msg(tAVRC_MSG_VENDOR *p_msg)
{
BT_HDR *p_cmd;
@@ -74,26 +74,26 @@
}
/******************************************************************************
-**
-** Function AVRC_UnitCmd
-**
-** Description Send a UNIT INFO command to the peer device. This
-** function can only be called for controller role connections.
-** Any response message from the peer is passed back through
-** the tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_UnitCmd
+ *
+ * Description Send a UNIT INFO command to the peer device. This
+ * function can only be called for controller role connections.
+ * Any response message from the peer is passed back through
+ * the tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
uint16_t AVRC_UnitCmd(uint8_t handle, uint8_t label)
{
BT_HDR *p_cmd = (BT_HDR *)osi_malloc(AVRC_CMD_BUF_SIZE);
@@ -113,30 +113,30 @@
}
/******************************************************************************
-**
-** Function AVRC_SubCmd
-**
-** Description Send a SUBUNIT INFO command to the peer device. This
-** function can only be called for controller role connections.
-** Any response message from the peer is passed back through
-** the tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label.
-**
-** page: Specifies which part of the subunit type table
-** is requested. For AVRCP it is typically zero.
-** Value range is 0-7.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_SubCmd
+ *
+ * Description Send a SUBUNIT INFO command to the peer device. This
+ * function can only be called for controller role connections.
+ * Any response message from the peer is passed back through
+ * the tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label.
+ *
+ * page: Specifies which part of the subunit type table
+ * is requested. For AVRCP it is typically zero.
+ * Value range is 0-7.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
uint16_t AVRC_SubCmd(uint8_t handle, uint8_t label, uint8_t page)
{
BT_HDR *p_cmd = (BT_HDR *)osi_malloc(AVRC_CMD_BUF_SIZE);
@@ -157,28 +157,28 @@
}
/******************************************************************************
-**
-** Function AVRC_VendorCmd
-**
-** Description Send a VENDOR DEPENDENT command to the peer device. This
-** function can only be called for controller role connections.
-** Any response message from the peer is passed back through
-** the tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label.
-**
-** p_msg: Pointer to VENDOR DEPENDENT message structure.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_VendorCmd
+ *
+ * Description Send a VENDOR DEPENDENT command to the peer device. This
+ * function can only be called for controller role connections.
+ * Any response message from the peer is passed back through
+ * the tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label.
+ *
+ * p_msg: Pointer to VENDOR DEPENDENT message structure.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
uint16_t AVRC_VendorCmd(uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR *p_msg)
{
BT_HDR *p_buf = avrc_vendor_msg(p_msg);
@@ -190,30 +190,30 @@
/******************************************************************************
-**
-** Function AVRC_VendorRsp
-**
-** Description Send a VENDOR DEPENDENT response to the peer device. This
-** function can only be called for target role connections.
-** This function must be called when a VENDOR DEPENDENT
-** command message is received from the peer through the
-** tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label. Must be the same value as
-** passed with the command message in the callback function.
-**
-** p_msg: Pointer to VENDOR DEPENDENT message structure.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_VendorRsp
+ *
+ * Description Send a VENDOR DEPENDENT response to the peer device. This
+ * function can only be called for target role connections.
+ * This function must be called when a VENDOR DEPENDENT
+ * command message is received from the peer through the
+ * tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label. Must be the same value as
+ * passed with the command message in the callback function.
+ *
+ * p_msg: Pointer to VENDOR DEPENDENT message structure.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
uint16_t AVRC_VendorRsp(uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR *p_msg)
{
BT_HDR *p_buf = avrc_vendor_msg(p_msg);
diff --git a/stack/avrc/avrc_pars_ct.cc b/stack/avrc/avrc_pars_ct.cc
index 08d8edc..7d6454e 100644
--- a/stack/avrc/avrc_pars_ct.cc
+++ b/stack/avrc/avrc_pars_ct.cc
@@ -25,22 +25,22 @@
#include "osi/include/osi.h"
/*****************************************************************************
-** Global data
-*****************************************************************************/
+ * Global data
+ ****************************************************************************/
#if (AVRC_METADATA_INCLUDED == TRUE)
/*******************************************************************************
-**
-** Function avrc_pars_vendor_rsp
-**
-** Description This function parses the vendor specific commands defined by
-** Bluetooth SIG
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function avrc_pars_vendor_rsp
+ *
+ * Description This function parses the vendor specific commands defined by
+ * Bluetooth SIG
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_pars_vendor_rsp(tAVRC_MSG_VENDOR *p_msg, tAVRC_RESPONSE *p_result)
{
tAVRC_STS status = AVRC_STS_NO_ERROR;
@@ -399,16 +399,16 @@
}
/*******************************************************************************
-**
-** Function avrc_ctrl_pars_vendor_rsp
-**
-** Description This function parses the vendor specific commands defined by
-** Bluetooth SIG
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function avrc_ctrl_pars_vendor_rsp
+ *
+ * Description This function parses the vendor specific commands defined by
+ * Bluetooth SIG
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_ctrl_pars_vendor_rsp(
tAVRC_MSG_VENDOR *p_msg, tAVRC_RESPONSE *p_result, uint8_t* p_buf, uint16_t* buf_len)
{
@@ -634,15 +634,15 @@
}
/*******************************************************************************
-**
-** Function AVRC_Ctrl_ParsResponse
-**
-** Description This function is a parse response for AVRCP Controller.
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function AVRC_Ctrl_ParsResponse
+ *
+ * Description This function is a parse response for AVRCP Controller.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
tAVRC_STS AVRC_Ctrl_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p_result, uint8_t *p_buf, uint16_t* buf_len)
{
tAVRC_STS status = AVRC_STS_INTERNAL_ERR;
@@ -669,15 +669,15 @@
}
/*******************************************************************************
-**
-** Function AVRC_ParsResponse
-**
-** Description This function is a superset of AVRC_ParsMetadata to parse the response.
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function AVRC_ParsResponse
+ *
+ * Description This function is a superset of AVRC_ParsMetadata to parse the response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
tAVRC_STS AVRC_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p_result,
UNUSED_ATTR uint8_t *p_buf,
UNUSED_ATTR uint16_t buf_len)
diff --git a/stack/avrc/avrc_pars_tg.cc b/stack/avrc/avrc_pars_tg.cc
index ff6b1e1..a1a4161 100644
--- a/stack/avrc/avrc_pars_tg.cc
+++ b/stack/avrc/avrc_pars_tg.cc
@@ -23,21 +23,21 @@
#include "avrc_int.h"
/*****************************************************************************
-** Global data
-*****************************************************************************/
+ * Global data
+ ****************************************************************************/
#if (AVRC_METADATA_INCLUDED == TRUE)
/*******************************************************************************
-**
-** Function avrc_ctrl_pars_vendor_cmd
-**
-** Description This function parses the vendor specific commands defined by
-** Bluetooth SIG for AVRCP Conroller.
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function avrc_ctrl_pars_vendor_cmd
+ *
+ * Description This function parses the vendor specific commands defined by
+ * Bluetooth SIG for AVRCP Conroller.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_ctrl_pars_vendor_cmd(tAVRC_MSG_VENDOR *p_msg, tAVRC_COMMAND *p_result)
{
tAVRC_STS status = AVRC_STS_NO_ERROR;
@@ -87,16 +87,16 @@
}
/*******************************************************************************
-**
-** Function avrc_pars_vendor_cmd
-**
-** Description This function parses the vendor specific commands defined by
-** Bluetooth SIG
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function avrc_pars_vendor_cmd
+ *
+ * Description This function parses the vendor specific commands defined by
+ * Bluetooth SIG
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_pars_vendor_cmd(tAVRC_MSG_VENDOR *p_msg, tAVRC_COMMAND *p_result,
uint8_t *p_buf, uint16_t buf_len)
{
@@ -374,16 +374,16 @@
}
/*******************************************************************************
-**
-** Function AVRC_Ctrl_ParsCommand
-**
-** Description This function is used to parse cmds received for CTRL
-** Currently it is for SetAbsVolume and Volume Change Notification..
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function AVRC_Ctrl_ParsCommand
+ *
+ * Description This function is used to parse cmds received for CTRL
+ * Currently it is for SetAbsVolume and Volume Change Notification..
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
tAVRC_STS AVRC_Ctrl_ParsCommand (tAVRC_MSG *p_msg, tAVRC_COMMAND *p_result)
{
tAVRC_STS status = AVRC_STS_INTERNAL_ERR;
@@ -408,16 +408,16 @@
}
/*******************************************************************************
-**
-** Function avrc_pars_browsing_cmd
-**
-** Description This function parses the commands that go through the
-** browsing channel
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP+1
-**
-*******************************************************************************/
+ *
+ * Function avrc_pars_browsing_cmd
+ *
+ * Description This function parses the commands that go through the
+ * browsing channel
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP+1
+ *
+ ******************************************************************************/
static tAVRC_STS avrc_pars_browsing_cmd(tAVRC_MSG_BROWSE *p_msg, tAVRC_COMMAND *p_result,
uint8_t *p_buf, uint16_t buf_len)
{
@@ -542,15 +542,15 @@
}
/*******************************************************************************
-**
-** Function AVRC_ParsCommand
-**
-** Description This function is a superset of AVRC_ParsMetadata to parse the command.
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function AVRC_ParsCommand
+ *
+ * Description This function is a superset of AVRC_ParsMetadata to parse the command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
tAVRC_STS AVRC_ParsCommand (tAVRC_MSG *p_msg, tAVRC_COMMAND *p_result,
uint8_t *p_buf, uint16_t buf_len)
{
diff --git a/stack/avrc/avrc_sdp.cc b/stack/avrc/avrc_sdp.cc
index ce2743e..e345c32 100644
--- a/stack/avrc/avrc_sdp.cc
+++ b/stack/avrc/avrc_sdp.cc
@@ -28,25 +28,25 @@
#include "avrc_int.h"
/*****************************************************************************
-** Global data
-*****************************************************************************/
+ * Global data
+ ****************************************************************************/
tAVRC_CB avrc_cb;
/******************************************************************************
-**
-** Function avrc_sdp_cback
-**
-** Description This is the SDP callback function used by A2DP_FindService.
-** This function will be executed by SDP when the service
-** search is completed. If the search is successful, it
-** finds the first record in the database that matches the
-** UUID of the search. Then retrieves various parameters
-** from the record. When it is finished it calls the
-** application callback function.
-**
-** Returns Nothing.
-**
-******************************************************************************/
+ *
+ * Function avrc_sdp_cback
+ *
+ * Description This is the SDP callback function used by A2DP_FindService.
+ * This function will be executed by SDP when the service
+ * search is completed. If the search is successful, it
+ * finds the first record in the database that matches the
+ * UUID of the search. Then retrieves various parameters
+ * from the record. When it is finished it calls the
+ * application callback function.
+ *
+ * Returns Nothing.
+ *
+ *****************************************************************************/
static void avrc_sdp_cback(uint16_t status)
{
AVRC_TRACE_API("%s status: %d", __func__, status);
@@ -61,42 +61,42 @@
}
/******************************************************************************
-**
-** Function AVRC_FindService
-**
-** 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.
-** 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
-** the callback before it makes another call to the function.
-** The application is responsible for allocating memory for the
-** discovery database. It is recommended that the size of the
-** discovery database be at least 300 bytes. The application
-** can deallocate the memory after the callback function has
-** executed.
-**
-** Input Parameters:
-** service_uuid: Indicates TG(UUID_SERVCLASS_AV_REM_CTRL_TARGET)
-** or CT(UUID_SERVCLASS_AV_REMOTE_CONTROL)
-**
-** bd_addr: BD address of the peer device.
-**
-** p_db: SDP discovery database parameters.
-**
-** p_cback: Pointer to the callback function.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_PARAMS if discovery database parameters are invalid.
-** AVRC_NO_RESOURCES if there are not enough resources to
-** perform the service search.
-**
-******************************************************************************/
+ *
+ * Function AVRC_FindService
+ *
+ * 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.
+ * 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
+ * the callback before it makes another call to the function.
+ * The application is responsible for allocating memory for the
+ * discovery database. It is recommended that the size of the
+ * discovery database be at least 300 bytes. The application
+ * can deallocate the memory after the callback function has
+ * executed.
+ *
+ * Input Parameters:
+ * service_uuid: Indicates TG(UUID_SERVCLASS_AV_REM_CTRL_TARGET)
+ * or CT(UUID_SERVCLASS_AV_REMOTE_CONTROL)
+ *
+ * bd_addr: BD address of the peer device.
+ *
+ * p_db: SDP discovery database parameters.
+ *
+ * p_cback: Pointer to the callback function.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_PARAMS if discovery database parameters are invalid.
+ * AVRC_NO_RESOURCES if there are not enough resources to
+ * perform the service search.
+ *
+ *****************************************************************************/
uint16_t AVRC_FindService(uint16_t service_uuid, BD_ADDR bd_addr,
tAVRC_SDP_DB_PARAMS *p_db, tAVRC_FIND_CBACK *p_cback)
{
@@ -147,40 +147,40 @@
}
/******************************************************************************
-**
-** Function AVRC_AddRecord
-**
-** Description This function is called to build an AVRCP SDP record.
-** Prior to calling this function the application must
-** call SDP_CreateRecord() to create an SDP record.
-**
-** Input Parameters:
-** service_uuid: Indicates TG(UUID_SERVCLASS_AV_REM_CTRL_TARGET)
-** or CT(UUID_SERVCLASS_AV_REMOTE_CONTROL)
-**
-** p_service_name: Pointer to a null-terminated character
-** string containing the service name.
-** If service name is not used set this to NULL.
-**
-** p_provider_name: Pointer to a null-terminated character
-** string containing the provider name.
-** If provider name is not used set this to NULL.
-**
-** categories: Supported categories.
-**
-** sdp_handle: SDP handle returned by SDP_CreateRecord().
-**
-** browse_supported: browse support info.
-**
-** profile_version: profile version of avrcp record.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_NO_RESOURCES if not enough resources to build the SDP record.
-**
-******************************************************************************/
+ *
+ * Function AVRC_AddRecord
+ *
+ * Description This function is called to build an AVRCP SDP record.
+ * Prior to calling this function the application must
+ * call SDP_CreateRecord() to create an SDP record.
+ *
+ * Input Parameters:
+ * service_uuid: Indicates TG(UUID_SERVCLASS_AV_REM_CTRL_TARGET)
+ * or CT(UUID_SERVCLASS_AV_REMOTE_CONTROL)
+ *
+ * p_service_name: Pointer to a null-terminated character
+ * string containing the service name.
+ * If service name is not used set this to NULL.
+ *
+ * p_provider_name: Pointer to a null-terminated character
+ * string containing the provider name.
+ * If provider name is not used set this to NULL.
+ *
+ * categories: Supported categories.
+ *
+ * sdp_handle: SDP handle returned by SDP_CreateRecord().
+ *
+ * browse_supported: browse support info.
+ *
+ * profile_version: profile version of avrcp record.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_NO_RESOURCES if not enough resources to build the SDP record.
+ *
+ *****************************************************************************/
uint16_t AVRC_AddRecord(uint16_t service_uuid, const char *p_service_name,
const char *p_provider_name, uint16_t categories,
uint32_t sdp_handle, bool browse_supported,
@@ -275,26 +275,26 @@
/******************************************************************************
-**
-** Function AVRC_SetTraceLevel
-**
-** Description Sets the trace level for AVRC. If 0xff is passed, the
-** current trace level is returned.
-**
-** Input Parameters:
-** new_level: The level to set the AVRC tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new trace level or current trace level if
-** the input parameter is 0xff.
-**
-******************************************************************************/
+ *
+ * Function AVRC_SetTraceLevel
+ *
+ * Description Sets the trace level for AVRC. If 0xff is passed, the
+ * current trace level is returned.
+ *
+ * Input Parameters:
+ * new_level: The level to set the AVRC tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new trace level or current trace level if
+ * the input parameter is 0xff.
+ *
+ *****************************************************************************/
uint8_t AVRC_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
@@ -304,16 +304,16 @@
}
/*******************************************************************************
-**
-** Function AVRC_Init
-**
-** Description This function is called at stack startup to allocate the
-** control block (if using dynamic memory), and initializes the
-** control block and tracing level.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVRC_Init
+ *
+ * Description This function is called at stack startup to allocate the
+ * control block (if using dynamic memory), and initializes the
+ * control block and tracing level.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void AVRC_Init(void)
{
memset(&avrc_cb, 0, sizeof(tAVRC_CB));
diff --git a/stack/avrc/avrc_utils.cc b/stack/avrc/avrc_utils.cc
index d0c203f..78f2b11 100644
--- a/stack/avrc/avrc_utils.cc
+++ b/stack/avrc/avrc_utils.cc
@@ -25,15 +25,15 @@
#if (AVRC_METADATA_INCLUDED == TRUE)
/**************************************************************************
-**
-** Function AVRC_IsValidAvcType
-**
-** Description Check if correct AVC type is specified
-**
-** Returns returns true if it is valid
-**
-**
-*******************************************************************************/
+ *
+ * Function AVRC_IsValidAvcType
+ *
+ * Description Check if correct AVC type is specified
+ *
+ * Returns returns true if it is valid
+ *
+ *
+ ******************************************************************************/
bool AVRC_IsValidAvcType(uint8_t pdu_id, uint8_t avc_type)
{
bool result=false;
@@ -92,14 +92,14 @@
}
/*******************************************************************************
-**
-** Function avrc_is_valid_player_attrib_value
-**
-** Description Check if the given attrib value is valid for its attribute
-**
-** Returns returns true if it is valid
-**
-*******************************************************************************/
+ *
+ * Function avrc_is_valid_player_attrib_value
+ *
+ * Description Check if the given attrib value is valid for its attribute
+ *
+ * Returns returns true if it is valid
+ *
+ ******************************************************************************/
bool avrc_is_valid_player_attrib_value(uint8_t attrib, uint8_t value)
{
bool result=false;
@@ -138,14 +138,14 @@
}
/*******************************************************************************
-**
-** Function AVRC_IsValidPlayerAttr
-**
-** Description Check if the given attrib value is a valid one
-**
-** Returns returns true if it is valid
-**
-*******************************************************************************/
+ *
+ * Function AVRC_IsValidPlayerAttr
+ *
+ * Description Check if the given attrib value is a valid one
+ *
+ * Returns returns true if it is valid
+ *
+ ******************************************************************************/
bool AVRC_IsValidPlayerAttr(uint8_t attr)
{
bool result=false;
@@ -162,16 +162,16 @@
/*******************************************************************************
-**
-** Function avrc_pars_pass_thru
-**
-** Description This function parses the pass thru commands defined by
-** Bluetooth SIG
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function avrc_pars_pass_thru
+ *
+ * Description This function parses the pass thru commands defined by
+ * Bluetooth SIG
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
tAVRC_STS avrc_pars_pass_thru(tAVRC_MSG_PASS *p_msg, uint16_t *p_vendor_unique_id)
{
uint8_t *p_data;
@@ -197,14 +197,14 @@
}
/*******************************************************************************
-**
-** Function avrc_opcode_from_pdu
-**
-** Description This function returns the opcode of the given pdu
-**
-** Returns AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSE
-**
-*******************************************************************************/
+ *
+ * Function avrc_opcode_from_pdu
+ *
+ * Description This function returns the opcode of the given pdu
+ *
+ * Returns AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSE
+ *
+ ******************************************************************************/
uint8_t avrc_opcode_from_pdu(uint8_t pdu)
{
uint8_t opcode = 0;
@@ -235,14 +235,14 @@
}
/*******************************************************************************
-**
-** Function avrc_is_valid_opcode
-**
-** Description This function returns the opcode of the given pdu
-**
-** Returns AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSE
-**
-*******************************************************************************/
+ *
+ * Function avrc_is_valid_opcode
+ *
+ * Description This function returns the opcode of the given pdu
+ *
+ * Returns AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSE
+ *
+ ******************************************************************************/
bool avrc_is_valid_opcode(uint8_t opcode)
{
bool is_valid = false;
diff --git a/stack/bnep/bnep_api.cc b/stack/bnep/bnep_api.cc
index 78f197c..1f7bae7 100644
--- a/stack/bnep/bnep_api.cc
+++ b/stack/bnep/bnep_api.cc
@@ -30,15 +30,15 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*******************************************************************************
-**
-** Function BNEP_Init
-**
-** Description This function initializes the BNEP unit. It should be called
-** before accessing any other APIs to initialize the control block
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Init
+ *
+ * Description This function initializes the BNEP unit. It should be called
+ * before accessing any other APIs to initialize the control block
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BNEP_Init (void)
{
memset (&bnep_cb, 0, sizeof (tBNEP_CB));
@@ -52,19 +52,19 @@
/*******************************************************************************
-**
-** Function BNEP_Register
-**
-** Description This function is called by the upper layer to register
-** 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
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Register
+ *
+ * Description This function is called by the upper layer to register
+ * 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
+ *
+ ******************************************************************************/
tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info)
{
/* There should be connection state call back registered */
@@ -88,18 +88,18 @@
/*******************************************************************************
-**
-** Function BNEP_Deregister
-**
-** Description This function is called by the upper layer to de-register
-** its callbacks.
-**
-** Parameters: void
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Deregister
+ *
+ * Description This function is called by the upper layer to de-register
+ * its callbacks.
+ *
+ * Parameters: void
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BNEP_Deregister (void)
{
/* Clear all the call backs registered */
@@ -116,21 +116,21 @@
/*******************************************************************************
-**
-** Function BNEP_Connect
-**
-** Description This function creates a BNEP connection to a remote
-** device.
-**
-** Parameters: p_rem_addr - BD_ADDR of the peer
-** src_uuid - source uuid for the connection
-** dst_uuid - destination uuid for the connection
-** p_handle - pointer to return the handle for the connection
-**
-** Returns BNEP_SUCCESS if connection started
-** BNEP_NO_RESOURCES if no resources
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Connect
+ *
+ * Description This function creates a BNEP connection to a remote
+ * device.
+ *
+ * Parameters: p_rem_addr - BD_ADDR of the peer
+ * src_uuid - source uuid for the connection
+ * dst_uuid - destination uuid for the connection
+ * p_handle - pointer to return the handle for the connection
+ *
+ * Returns BNEP_SUCCESS if connection started
+ * BNEP_NO_RESOURCES if no resources
+ *
+ ******************************************************************************/
tBNEP_RESULT BNEP_Connect (BD_ADDR p_rem_bda,
tBT_UUID *src_uuid,
tBT_UUID *dst_uuid,
@@ -221,20 +221,20 @@
/*******************************************************************************
-**
-** 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
-**
-** Returns BNEP_SUCCESS if connection started
-** BNEP_WRONG_HANDLE if the connection is not found
-** BNEP_WRONG_STATE if the responce is not expected
-**
-*******************************************************************************/
+ *
+ * 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
+ *
+ * Returns BNEP_SUCCESS if connection started
+ * BNEP_WRONG_HANDLE if the connection is not found
+ * BNEP_WRONG_STATE if the responce is not expected
+ *
+ ******************************************************************************/
tBNEP_RESULT BNEP_ConnectResp (uint16_t handle, tBNEP_RESULT resp)
{
tBNEP_CONN *p_bcb;
@@ -301,17 +301,17 @@
/*******************************************************************************
-**
-** Function BNEP_Disconnect
-**
-** Description This function is called to close the specified connection.
-**
-** Parameters: handle - handle of the connection
-**
-** Returns BNEP_SUCCESS if connection is disconnected
-** BNEP_WRONG_HANDLE if no connection is not found
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Disconnect
+ *
+ * Description This function is called to close the specified connection.
+ *
+ * Parameters: handle - handle of the connection
+ *
+ * Returns BNEP_SUCCESS if connection is disconnected
+ * BNEP_WRONG_HANDLE if no connection is not found
+ *
+ ******************************************************************************/
tBNEP_RESULT BNEP_Disconnect (uint16_t handle)
{
tBNEP_CONN *p_bcb;
@@ -335,26 +335,26 @@
/*******************************************************************************
-**
-** Function BNEP_WriteBuf
-**
-** Description This function sends data in a GKI buffer on BNEP connection
-**
-** Parameters: handle - handle of the connection to write
-** p_dest_addr - BD_ADDR/Ethernet addr of the destination
-** p_buf - pointer to address of buffer with data
-** protocol - protocol type of the packet
-** p_src_addr - (optional) BD_ADDR/ethernet address of the source
-** (should be NULL if it is local BD Addr)
-** fw_ext_present - forwarded extensions present
-**
-** Returns: BNEP_WRONG_HANDLE - if passed handle is not valid
-** BNEP_MTU_EXCEDED - If the data length is greater than MTU
-** BNEP_IGNORE_CMD - If the packet is filtered out
-** BNEP_Q_SIZE_EXCEEDED - If the Tx Q is full
-** BNEP_SUCCESS - If written successfully
-**
-*******************************************************************************/
+ *
+ * Function BNEP_WriteBuf
+ *
+ * Description This function sends data in a GKI buffer on BNEP connection
+ *
+ * Parameters: handle - handle of the connection to write
+ * p_dest_addr - BD_ADDR/Ethernet addr of the destination
+ * p_buf - pointer to address of buffer with data
+ * protocol - protocol type of the packet
+ * p_src_addr - (optional) BD_ADDR/ethernet address of the source
+ * (should be NULL if it is local BD Addr)
+ * fw_ext_present - forwarded extensions present
+ *
+ * Returns: BNEP_WRONG_HANDLE - if passed handle is not valid
+ * BNEP_MTU_EXCEDED - If the data length is greater than MTU
+ * BNEP_IGNORE_CMD - If the packet is filtered out
+ * BNEP_Q_SIZE_EXCEEDED - If the Tx Q is full
+ * BNEP_SUCCESS - If written successfully
+ *
+ ******************************************************************************/
tBNEP_RESULT BNEP_WriteBuf (uint16_t handle,
uint8_t *p_dest_addr,
BT_HDR *p_buf,
@@ -446,27 +446,27 @@
/*******************************************************************************
-**
-** Function BNEP_Write
-**
-** Description This function sends data over a BNEP connection
-**
-** Parameters: handle - handle of the connection to write
-** p_dest_addr - BD_ADDR/Ethernet addr of the destination
-** p_data - pointer to data start
-** protocol - protocol type of the packet
-** p_src_addr - (optional) BD_ADDR/ethernet address of the source
-** (should be NULL if it is local BD Addr)
-** fw_ext_present - forwarded extensions present
-**
-** Returns: BNEP_WRONG_HANDLE - if passed handle is not valid
-** BNEP_MTU_EXCEDED - If the data length is greater than MTU
-** BNEP_IGNORE_CMD - If the packet is filtered out
-** BNEP_Q_SIZE_EXCEEDED - If the Tx Q is full
-** BNEP_NO_RESOURCES - If not able to allocate a buffer
-** BNEP_SUCCESS - If written successfully
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Write
+ *
+ * Description This function sends data over a BNEP connection
+ *
+ * Parameters: handle - handle of the connection to write
+ * p_dest_addr - BD_ADDR/Ethernet addr of the destination
+ * p_data - pointer to data start
+ * protocol - protocol type of the packet
+ * p_src_addr - (optional) BD_ADDR/ethernet address of the source
+ * (should be NULL if it is local BD Addr)
+ * fw_ext_present - forwarded extensions present
+ *
+ * Returns: BNEP_WRONG_HANDLE - if passed handle is not valid
+ * BNEP_MTU_EXCEDED - If the data length is greater than MTU
+ * BNEP_IGNORE_CMD - If the packet is filtered out
+ * BNEP_Q_SIZE_EXCEEDED - If the Tx Q is full
+ * BNEP_NO_RESOURCES - If not able to allocate a buffer
+ * BNEP_SUCCESS - If written successfully
+ *
+ ******************************************************************************/
tBNEP_RESULT BNEP_Write (uint16_t handle,
uint8_t *p_dest_addr,
uint8_t *p_data,
@@ -557,22 +557,22 @@
/*******************************************************************************
-**
-** Function BNEP_SetProtocolFilters
-**
-** Description This function sets the protocol filters on peer device
-**
-** Parameters: handle - Handle for the connection
-** num_filters - total number of filter ranges
-** p_start_array - Array of beginings of all protocol ranges
-** p_end_array - Array of ends of all protocol ranges
-**
-** Returns BNEP_WRONG_HANDLE - if the connection handle is not valid
-** BNEP_SET_FILTER_FAIL - if the connection is in wrong state
-** BNEP_TOO_MANY_FILTERS - if too many filters
-** BNEP_SUCCESS - if request sent successfully
-**
-*******************************************************************************/
+ *
+ * Function BNEP_SetProtocolFilters
+ *
+ * Description This function sets the protocol filters on peer device
+ *
+ * Parameters: handle - Handle for the connection
+ * num_filters - total number of filter ranges
+ * p_start_array - Array of beginings of all protocol ranges
+ * p_end_array - Array of ends of all protocol ranges
+ *
+ * Returns BNEP_WRONG_HANDLE - if the connection handle is not valid
+ * BNEP_SET_FILTER_FAIL - if the connection is in wrong state
+ * BNEP_TOO_MANY_FILTERS - if too many filters
+ * BNEP_SUCCESS - if request sent successfully
+ *
+ ******************************************************************************/
tBNEP_RESULT BNEP_SetProtocolFilters (uint16_t handle,
uint16_t num_filters,
uint16_t *p_start_array,
@@ -614,24 +614,24 @@
/*******************************************************************************
-**
-** Function BNEP_SetMulticastFilters
-**
-** Description This function sets the filters for multicast addresses for BNEP.
-**
-** Parameters: handle - Handle for the connection
-** num_filters - total number of filter ranges
-** p_start_array - Pointer to sequence of beginings of all
-** multicast address ranges
-** p_end_array - Pointer to sequence of ends of all
-** multicast address ranges
-**
-** Returns BNEP_WRONG_HANDLE - if the connection handle is not valid
-** BNEP_SET_FILTER_FAIL - if the connection is in wrong state
-** BNEP_TOO_MANY_FILTERS - if too many filters
-** BNEP_SUCCESS - if request sent successfully
-**
-*******************************************************************************/
+ *
+ * Function BNEP_SetMulticastFilters
+ *
+ * Description This function sets the filters for multicast addresses for BNEP.
+ *
+ * Parameters: handle - Handle for the connection
+ * num_filters - total number of filter ranges
+ * p_start_array - Pointer to sequence of beginings of all
+ * multicast address ranges
+ * p_end_array - Pointer to sequence of ends of all
+ * multicast address ranges
+ *
+ * Returns BNEP_WRONG_HANDLE - if the connection handle is not valid
+ * BNEP_SET_FILTER_FAIL - if the connection is in wrong state
+ * BNEP_TOO_MANY_FILTERS - if too many filters
+ * BNEP_SUCCESS - if request sent successfully
+ *
+ ******************************************************************************/
tBNEP_RESULT BNEP_SetMulticastFilters (uint16_t handle,
uint16_t num_filters,
uint8_t *p_start_array,
@@ -675,15 +675,15 @@
}
/*******************************************************************************
-**
-** Function BNEP_SetTraceLevel
-**
-** Description This function sets the trace level for BNEP. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function BNEP_SetTraceLevel
+ *
+ * Description This function sets the trace level for BNEP. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
uint8_t BNEP_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
@@ -694,17 +694,17 @@
/*******************************************************************************
-**
-** Function BNEP_GetStatus
-**
-** Description This function gets the status information for BNEP connection
-**
-** Returns BNEP_SUCCESS - if the status is available
-** BNEP_NO_RESOURCES - if no structure is passed for output
-** BNEP_WRONG_HANDLE - if the handle is invalid
-** BNEP_WRONG_STATE - if not in connected state
-**
-*******************************************************************************/
+ *
+ * Function BNEP_GetStatus
+ *
+ * Description This function gets the status information for BNEP connection
+ *
+ * Returns BNEP_SUCCESS - if the status is available
+ * BNEP_NO_RESOURCES - if no structure is passed for output
+ * BNEP_WRONG_HANDLE - if the handle is invalid
+ * BNEP_WRONG_STATE - if not in connected state
+ *
+ ******************************************************************************/
tBNEP_RESULT BNEP_GetStatus (uint16_t handle, tBNEP_STATUS *p_status)
{
#if (BNEP_SUPPORTS_STATUS_API == TRUE)
diff --git a/stack/bnep/bnep_main.cc b/stack/bnep/bnep_main.cc
index 210d59b..bd25d2b 100644
--- a/stack/bnep/bnep_main.cc
+++ b/stack/bnep/bnep_main.cc
@@ -49,16 +49,16 @@
extern fixed_queue_t *btu_general_alarm_queue;
-/********************************************************************************/
+/******************************************************************************/
/* G L O B A L B N E P D A T A */
-/********************************************************************************/
+/******************************************************************************/
tBNEP_CB bnep_cb;
const uint16_t bnep_frame_hdr_sizes[] = {14, 1, 2, 8, 8};
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void bnep_connect_ind (BD_ADDR bd_addr, uint16_t l2cap_cid, uint16_t psm, uint8_t l2cap_id);
static void bnep_connect_cfm (uint16_t l2cap_cid, uint16_t result);
static void bnep_config_ind (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg);
@@ -70,14 +70,14 @@
/*******************************************************************************
-**
-** Function bnep_register_with_l2cap
-**
-** Description This function registers BNEP PSM with L2CAP
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_register_with_l2cap
+ *
+ * Description This function registers BNEP PSM with L2CAP
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tBNEP_RESULT bnep_register_with_l2cap (void)
{
/* Initialize the L2CAP configuration. We only care about MTU and flush */
@@ -109,16 +109,16 @@
/*******************************************************************************
-**
-** Function bnep_connect_ind
-**
-** Description This function handles an inbound connection indication
-** from L2CAP. This is the case where we are acting as a
-** server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_connect_ind
+ *
+ * Description This function handles an inbound connection indication
+ * from L2CAP. This is the case where we are acting as a
+ * server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void bnep_connect_ind (BD_ADDR bd_addr, uint16_t l2cap_cid,
UNUSED_ATTR uint16_t psm, uint8_t l2cap_id)
{
@@ -156,16 +156,16 @@
/*******************************************************************************
-**
-** Function bnep_connect_cfm
-**
-** Description This function handles the connect confirm events
-** from L2CAP. This is the case when we are acting as a
-** client and have sent a connect request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_connect_cfm
+ *
+ * Description This function handles the connect confirm events
+ * from L2CAP. This is the case when we are acting as a
+ * client and have sent a connect request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void bnep_connect_cfm (uint16_t l2cap_cid, uint16_t result)
{
tBNEP_CONN *p_bcb;
@@ -210,15 +210,15 @@
}
/*******************************************************************************
-**
-** Function bnep_config_ind
-**
-** Description This function processes the L2CAP configuration indication
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_config_ind
+ *
+ * Description This function processes the L2CAP configuration indication
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void bnep_config_ind (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
tBNEP_CONN *p_bcb;
@@ -287,15 +287,15 @@
/*******************************************************************************
-**
-** Function bnep_config_cfm
-**
-** Description This function processes the L2CAP configuration confirmation
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_config_cfm
+ *
+ * Description This function processes the L2CAP configuration confirmation
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void bnep_config_cfm (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
tBNEP_CONN *p_bcb;
@@ -349,15 +349,15 @@
/*******************************************************************************
-**
-** Function bnep_disconnect_ind
-**
-** Description This function handles a disconnect event from L2CAP. If
-** requested to, we ack the disconnect before dropping the CCB
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_disconnect_ind
+ *
+ * Description This function handles a disconnect event from L2CAP. If
+ * requested to, we ack the disconnect before dropping the CCB
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void bnep_disconnect_ind (uint16_t l2cap_cid, bool ack_needed)
{
tBNEP_CONN *p_bcb;
@@ -394,14 +394,14 @@
/*******************************************************************************
-**
-** Function bnep_disconnect_cfm
-**
-** Description This function gets the disconnect confirm event from L2CAP
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_disconnect_cfm
+ *
+ * Description This function gets the disconnect confirm event from L2CAP
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void bnep_disconnect_cfm (uint16_t l2cap_cid, uint16_t result)
{
BNEP_TRACE_EVENT ("BNEP - Rcvd L2CAP disc cfm, CID: 0x%x, Result 0x%x", l2cap_cid, result);
@@ -410,13 +410,13 @@
/*******************************************************************************
-**
-** Function bnep_congestion_ind
-**
-** Description This is a callback function called by L2CAP when
-** congestion status changes
-**
-*******************************************************************************/
+ *
+ * Function bnep_congestion_ind
+ *
+ * Description This is a callback function called by L2CAP when
+ * congestion status changes
+ *
+ ******************************************************************************/
static void bnep_congestion_ind (uint16_t l2cap_cid, bool is_congested)
{
tBNEP_CONN *p_bcb;
@@ -462,20 +462,20 @@
/*******************************************************************************
-**
-** Function bnep_data_ind
-**
-** Description This function is called when data is received from L2CAP.
-** if we are the originator of the connection, we are the SDP
-** client, and the received message is queued up for the client.
-**
-** If we are the destination of the connection, we are the SDP
-** server, so the message is passed to the server processing
-** function.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_data_ind
+ *
+ * Description This function is called when data is received from L2CAP.
+ * if we are the originator of the connection, we are the SDP
+ * client, and the received message is queued up for the client.
+ *
+ * If we are the destination of the connection, we are the SDP
+ * server, so the message is passed to the server processing
+ * function.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void bnep_data_ind (uint16_t l2cap_cid, BT_HDR *p_buf)
{
tBNEP_CONN *p_bcb;
@@ -672,16 +672,16 @@
/*******************************************************************************
-**
-** Function bnep_conn_timer_timeout
-**
-** Description This function processes a timeout. If it is a startup
-** timeout, we check for reading our BD address. If it
-** is an L2CAP timeout, we send a disconnect req to L2CAP.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_conn_timer_timeout
+ *
+ * Description This function processes a timeout. If it is a startup
+ * timeout, we check for reading our BD address. If it
+ * is an L2CAP timeout, we send a disconnect req to L2CAP.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnep_conn_timer_timeout(void *data)
{
tBNEP_CONN *p_bcb = (tBNEP_CONN *)data;
@@ -779,15 +779,15 @@
/*******************************************************************************
-**
-** Function bnep_connected
-**
-** Description This function is called when a connection is established
-** (after config).
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_connected
+ *
+ * Description This function is called when a connection is established
+ * (after config).
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnep_connected (tBNEP_CONN *p_bcb)
{
bool is_role_change;
diff --git a/stack/bnep/bnep_utils.cc b/stack/bnep/bnep_utils.cc
index 5b8c46c..83627cf 100644
--- a/stack/bnep/bnep_utils.cc
+++ b/stack/bnep/bnep_utils.cc
@@ -36,9 +36,9 @@
extern fixed_queue_t *btu_general_alarm_queue;
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static uint8_t *bnepu_init_hdr (BT_HDR *p_buf, uint16_t hdr_len, uint8_t pkt_type);
void bnepu_process_peer_multicast_filter_set (tBNEP_CONN *p_bcb, uint8_t *p_filters, uint16_t len);
@@ -46,15 +46,15 @@
/*******************************************************************************
-**
-** Function bnepu_find_bcb_by_cid
-**
-** Description This function searches the bcb table for an entry with the
-** passed CID.
-**
-** Returns the BCB address, or NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function bnepu_find_bcb_by_cid
+ *
+ * Description This function searches the bcb table for an entry with the
+ * passed CID.
+ *
+ * Returns the BCB address, or NULL if not found.
+ *
+ ******************************************************************************/
tBNEP_CONN *bnepu_find_bcb_by_cid (uint16_t cid)
{
uint16_t xx;
@@ -73,15 +73,15 @@
/*******************************************************************************
-**
-** Function bnepu_find_bcb_by_bd_addr
-**
-** Description This function searches the BCB table for an entry with the
-** passed Bluetooth Address.
-**
-** Returns the BCB address, or NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function bnepu_find_bcb_by_bd_addr
+ *
+ * Description This function searches the BCB table for an entry with the
+ * passed Bluetooth Address.
+ *
+ * Returns the BCB address, or NULL if not found.
+ *
+ ******************************************************************************/
tBNEP_CONN *bnepu_find_bcb_by_bd_addr (uint8_t *p_bda)
{
uint16_t xx;
@@ -103,14 +103,14 @@
/*******************************************************************************
-**
-** Function bnepu_allocate_bcb
-**
-** Description This function allocates a new BCB.
-**
-** Returns BCB address, or NULL if none available.
-**
-*******************************************************************************/
+ *
+ * Function bnepu_allocate_bcb
+ *
+ * Description This function allocates a new BCB.
+ *
+ * Returns BCB address, or NULL if none available.
+ *
+ ******************************************************************************/
tBNEP_CONN *bnepu_allocate_bcb (BD_ADDR p_rem_bda)
{
uint16_t xx;
@@ -139,14 +139,14 @@
/*******************************************************************************
-**
-** Function bnepu_release_bcb
-**
-** Description This function releases a BCB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_release_bcb
+ *
+ * Description This function releases a BCB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_release_bcb (tBNEP_CONN *p_bcb)
{
/* Ensure timer is stopped */
@@ -168,14 +168,14 @@
/*******************************************************************************
-**
-** Function bnep_send_conn_req
-**
-** Description This function sends a BNEP connection request to peer
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_send_conn_req
+ *
+ * Description This function sends a BNEP connection request to peer
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnep_send_conn_req (tBNEP_CONN *p_bcb)
{
BT_HDR *p_buf = (BT_HDR *)osi_malloc(BNEP_BUF_SIZE);
@@ -225,14 +225,14 @@
/*******************************************************************************
-**
-** Function bnep_send_conn_responce
-**
-** Description This function sends a BNEP setup response to peer
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_send_conn_responce
+ *
+ * Description This function sends a BNEP setup response to peer
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnep_send_conn_responce (tBNEP_CONN *p_bcb, uint16_t resp_code)
{
BT_HDR *p_buf = (BT_HDR *)osi_malloc(BNEP_BUF_SIZE);
@@ -259,14 +259,14 @@
/*******************************************************************************
-**
-** Function bnepu_send_peer_our_filters
-**
-** Description This function sends our filters to a peer
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_send_peer_our_filters
+ *
+ * Description This function sends our filters to a peer
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_send_peer_our_filters (tBNEP_CONN *p_bcb)
{
BT_HDR *p_buf = (BT_HDR *)osi_malloc(BNEP_BUF_SIZE);
@@ -305,14 +305,14 @@
/*******************************************************************************
-**
-** Function bnepu_send_peer_our_multi_filters
-**
-** Description This function sends our multicast filters to a peer
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_send_peer_our_multi_filters
+ *
+ * Description This function sends our multicast filters to a peer
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_send_peer_our_multi_filters (tBNEP_CONN *p_bcb)
{
BT_HDR *p_buf = (BT_HDR *)osi_malloc(BNEP_BUF_SIZE);
@@ -353,14 +353,14 @@
/*******************************************************************************
-**
-** Function bnepu_send_peer_filter_rsp
-**
-** Description This function sends a filter response to a peer
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_send_peer_filter_rsp
+ *
+ * Description This function sends a filter response to a peer
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_send_peer_filter_rsp (tBNEP_CONN *p_bcb, uint16_t response_code)
{
BT_HDR *p_buf = (BT_HDR *)osi_malloc(BNEP_BUF_SIZE);
@@ -386,14 +386,14 @@
/*******************************************************************************
-**
-** Function bnep_send_command_not_understood
-**
-** Description This function sends a BNEP command not understood message
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_send_command_not_understood
+ *
+ * Description This function sends a BNEP command not understood message
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnep_send_command_not_understood (tBNEP_CONN *p_bcb, uint8_t cmd_code)
{
BT_HDR *p_buf = (BT_HDR *)osi_malloc(BNEP_BUF_SIZE);
@@ -420,16 +420,16 @@
/*******************************************************************************
-**
-** Function bnepu_check_send_packet
-**
-** Description This function tries to send a packet to L2CAP.
-** If L2CAP is flow controlled, it enqueues the
-** packet to the transmit queue
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_check_send_packet
+ *
+ * Description This function tries to send a packet to L2CAP.
+ * If L2CAP is flow controlled, it enqueues the
+ * packet to the transmit queue
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_check_send_packet (tBNEP_CONN *p_bcb, BT_HDR *p_buf)
{
BNEP_TRACE_EVENT ("BNEP - bnepu_check_send_packet for CID: 0x%x", p_bcb->l2cap_cid);
@@ -454,16 +454,16 @@
/*******************************************************************************
-**
-** Function bnepu_build_bnep_hdr
-**
-** Description This function builds the BNEP header for a packet
-** Extension headers are not sent yet, so there is no
-** check for that.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_build_bnep_hdr
+ *
+ * Description This function builds the BNEP header for a packet
+ * Extension headers are not sent yet, so there is no
+ * check for that.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, uint16_t protocol,
uint8_t *p_src_addr, uint8_t *p_dest_addr, bool fw_ext_present)
{
@@ -518,14 +518,14 @@
/*******************************************************************************
-**
-** Function bnepu_init_hdr
-**
-** Description This function initializes the BNEP header
-**
-** Returns pointer to header in buffer
-**
-*******************************************************************************/
+ *
+ * Function bnepu_init_hdr
+ *
+ * Description This function initializes the BNEP header
+ *
+ * Returns pointer to header in buffer
+ *
+ ******************************************************************************/
static uint8_t *bnepu_init_hdr (BT_HDR *p_buf, uint16_t hdr_len, uint8_t pkt_type)
{
uint8_t *p = (uint8_t *)(p_buf + 1) + p_buf->offset;
@@ -553,16 +553,16 @@
/*******************************************************************************
-**
-** Function bnep_process_setup_conn_req
-**
-** Description This function processes a peer's setup connection request
-** message. The destination UUID is verified and response sent
-** Connection open indication will be given to PAN profile
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_process_setup_conn_req
+ *
+ * Description This function processes a peer's setup connection request
+ * message. The destination UUID is verified and response sent
+ * Connection open indication will be given to PAN profile
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnep_process_setup_conn_req (tBNEP_CONN *p_bcb, uint8_t *p_setup, uint8_t len)
{
BNEP_TRACE_EVENT ("BNEP - bnep_process_setup_conn_req for CID: 0x%x", p_bcb->l2cap_cid);
@@ -653,16 +653,16 @@
/*******************************************************************************
-**
-** Function bnep_process_setup_conn_responce
-**
-** Description This function processes a peer's setup connection response
-** message. The response code is verified and
-** Connection open indication will be given to PAN profile
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_process_setup_conn_responce
+ *
+ * Description This function processes a peer's setup connection response
+ * message. The response code is verified and
+ * Connection open indication will be given to PAN profile
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnep_process_setup_conn_responce (tBNEP_CONN *p_bcb, uint8_t *p_setup)
{
tBNEP_RESULT resp;
@@ -750,16 +750,16 @@
/*******************************************************************************
-**
-** Function bnep_process_control_packet
-**
-** Description This function processes a peer's setup connection request
-** message. The destination UUID is verified and response sent
-** Connection open indication will be given to PAN profile
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_process_control_packet
+ *
+ * Description This function processes a peer's setup connection request
+ * message. The destination UUID is verified and response sent
+ * Connection open indication will be given to PAN profile
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint8_t *bnep_process_control_packet (tBNEP_CONN *p_bcb, uint8_t *p, uint16_t *rem_len, bool is_ext)
{
uint8_t control_type;
@@ -867,16 +867,16 @@
/*******************************************************************************
-**
-** Function bnepu_process_peer_filter_set
-**
-** Description This function processes a peer's filter control
-** 'set' message. The filters are stored in the BCB,
-** and an appropriate filter response message sent.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_process_peer_filter_set
+ *
+ * Description This function processes a peer's filter control
+ * 'set' message. The filters are stored in the BCB,
+ * and an appropriate filter response message sent.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_process_peer_filter_set (tBNEP_CONN *p_bcb, uint8_t *p_filters, uint16_t len)
{
uint16_t num_filters = 0;
@@ -946,15 +946,15 @@
/*******************************************************************************
-**
-** Function bnepu_process_peer_filter_rsp
-**
-** Description This function processes a peer's filter control
-** 'response' message.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_process_peer_filter_rsp
+ *
+ * Description This function processes a peer's filter control
+ * 'response' message.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_process_peer_filter_rsp (tBNEP_CONN *p_bcb, uint8_t *p_data)
{
uint16_t resp_code;
@@ -992,15 +992,15 @@
}
/*******************************************************************************
-**
-** Function bnepu_process_multicast_filter_rsp
-**
-** Description This function processes multicast filter control
-** 'response' message.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_process_multicast_filter_rsp
+ *
+ * Description This function processes multicast filter control
+ * 'response' message.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_process_multicast_filter_rsp (tBNEP_CONN *p_bcb, uint8_t *p_data)
{
uint16_t resp_code;
@@ -1038,16 +1038,16 @@
}
/*******************************************************************************
-**
-** Function bnepu_process_peer_multicast_filter_set
-**
-** Description This function processes a peer's filter control
-** 'set' message. The filters are stored in the BCB,
-** and an appropriate filter response message sent.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_process_peer_multicast_filter_set
+ *
+ * Description This function processes a peer's filter control
+ * 'set' message. The filters are stored in the BCB,
+ * and an appropriate filter response message sent.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_process_peer_multicast_filter_set (tBNEP_CONN *p_bcb, uint8_t *p_filters, uint16_t len)
{
uint16_t resp_code = BNEP_FILTER_CRL_OK;
@@ -1120,14 +1120,14 @@
/*******************************************************************************
-**
-** Function bnepu_send_peer_multicast_filter_rsp
-**
-** Description This function sends a filter response to a peer
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnepu_send_peer_multicast_filter_rsp
+ *
+ * Description This function sends a filter response to a peer
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnepu_send_peer_multicast_filter_rsp (tBNEP_CONN *p_bcb, uint16_t response_code)
{
BT_HDR *p_buf = (BT_HDR *)osi_malloc(BNEP_BUF_SIZE);
@@ -1154,15 +1154,15 @@
/*******************************************************************************
-**
-** Function bnep_sec_check_complete
-**
-** Description This function is registered with BTM and will be called
-** after completing the security procedures
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bnep_sec_check_complete
+ *
+ * Description This function is registered with BTM and will be called
+ * after completing the security procedures
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void bnep_sec_check_complete (UNUSED_ATTR BD_ADDR bd_addr, UNUSED_ATTR tBT_TRANSPORT trasnport,
void *p_ref_data, uint8_t result)
{
@@ -1257,16 +1257,16 @@
/*******************************************************************************
-**
-** Function bnep_is_packet_allowed
-**
-** Description This function verifies whether the protocol passes through
-** the protocol filters set by the peer
-**
-** Returns BNEP_SUCCESS - if the protocol is allowed
-** BNEP_IGNORE_CMD - if the protocol is filtered out
-**
-*******************************************************************************/
+ *
+ * Function bnep_is_packet_allowed
+ *
+ * Description This function verifies whether the protocol passes through
+ * the protocol filters set by the peer
+ *
+ * Returns BNEP_SUCCESS - if the protocol is allowed
+ * BNEP_IGNORE_CMD - if the protocol is filtered out
+ *
+ ******************************************************************************/
tBNEP_RESULT bnep_is_packet_allowed (tBNEP_CONN *p_bcb,
BD_ADDR p_dest_addr,
uint16_t protocol,
@@ -1346,14 +1346,14 @@
}
/*******************************************************************************
-**
-** Function bnep_get_uuid32
-**
-** Description This function returns the 32 bit equivalent of the given UUID
-**
-** Returns uint32_t - 32 bit equivalent of the UUID
-**
-*******************************************************************************/
+ *
+ * Function bnep_get_uuid32
+ *
+ * Description This function returns the 32 bit equivalent of the given UUID
+ *
+ * Returns uint32_t - 32 bit equivalent of the UUID
+ *
+ ******************************************************************************/
uint32_t bnep_get_uuid32 (tBT_UUID *src_uuid)
{
uint32_t result;
diff --git a/stack/btm/btm_acl.cc b/stack/btm/btm_acl.cc
index 7bdd985..757753c 100644
--- a/stack/btm/btm_acl.cc
+++ b/stack/btm/btm_acl.cc
@@ -17,19 +17,19 @@
******************************************************************************/
/*****************************************************************************
-**
-** Name: btm_acl.cc
-**
-** Description: This file contains functions that handle ACL connections.
-** This includes operations such as hold and sniff modes,
-** supported packet types.
-**
-** This module contains both internal and external (API)
-** functions. External (API) functions are distinguishable
-** by their names beginning with uppercase BTM.
-**
-**
-******************************************************************************/
+ *
+ * Name: btm_acl.cc
+ *
+ * Description: This file contains functions that handle ACL connections.
+ * This includes operations such as hold and sniff modes,
+ * supported packet types.
+ *
+ * This module contains both internal and external (API)
+ * functions. External (API) functions are distinguishable
+ * by their names beginning with uppercase BTM.
+ *
+ *
+ *****************************************************************************/
#include <stdlib.h>
#include <string.h>
@@ -60,14 +60,14 @@
#define BTM_DEV_REPLY_TIMEOUT_MS (3 * 1000)
/*******************************************************************************
-**
-** Function btm_acl_init
-**
-** Description This function is called at BTM startup to initialize
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_init
+ *
+ * Description This function is called at BTM startup to initialize
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_acl_init (void)
{
BTM_TRACE_DEBUG ("btm_acl_init");
@@ -77,18 +77,18 @@
}
/*******************************************************************************
-**
-** Function btm_bda_to_acl
-**
-** Description This function returns the FIRST acl_db entry for the passed BDA.
-**
-** Parameters bda : BD address of the remote device
-** transport : Physical transport used for ACL connection (BR/EDR or LE)
-**
-** Returns Returns pointer to the ACL DB for the requested BDA if found.
-** NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function btm_bda_to_acl
+ *
+ * Description This function returns the FIRST acl_db entry for the passed BDA.
+ *
+ * Parameters bda : BD address of the remote device
+ * transport : Physical transport used for ACL connection (BR/EDR or LE)
+ *
+ * Returns Returns pointer to the ACL DB for the requested BDA if found.
+ * NULL if not found.
+ *
+ ******************************************************************************/
tACL_CONN *btm_bda_to_acl (const BD_ADDR bda, tBT_TRANSPORT transport)
{
tACL_CONN *p = &btm_cb.acl_db[0];
@@ -111,14 +111,14 @@
}
/*******************************************************************************
-**
-** Function btm_handle_to_acl_index
-**
-** Description This function returns the FIRST acl_db entry for the passed hci_handle.
-**
-** Returns index to the acl_db or MAX_L2CAP_LINKS.
-**
-*******************************************************************************/
+ *
+ * Function btm_handle_to_acl_index
+ *
+ * Description This function returns the FIRST acl_db entry for the passed hci_handle.
+ *
+ * Returns index to the acl_db or MAX_L2CAP_LINKS.
+ *
+ ******************************************************************************/
uint8_t btm_handle_to_acl_index (uint16_t hci_handle)
{
tACL_CONN *p = &btm_cb.acl_db[0];
@@ -138,15 +138,15 @@
#if (BLE_PRIVACY_SPT == TRUE)
/*******************************************************************************
-**
-** Function btm_ble_get_acl_remote_addr
-**
-** Description This function reads the active remote address used for the
-** connection.
-**
-** Returns success return true, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_get_acl_remote_addr
+ *
+ * Description This function reads the active remote address used for the
+ * connection.
+ *
+ * Returns success return true, otherwise false.
+ *
+ ******************************************************************************/
bool btm_ble_get_acl_remote_addr(tBTM_SEC_DEV_REC *p_dev_rec, BD_ADDR conn_addr,
tBLE_ADDR_TYPE *p_addr_type)
{
@@ -185,15 +185,15 @@
}
#endif
/*******************************************************************************
-**
-** Function btm_acl_created
-**
-** Description This function is called by L2CAP when an ACL connection
-** is created.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_created
+ *
+ * Description This function is called by L2CAP when an ACL connection
+ * is created.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
uint16_t hci_handle, uint8_t link_role, tBT_TRANSPORT transport)
{
@@ -324,15 +324,15 @@
}
/*******************************************************************************
-**
-** Function btm_acl_report_role_change
-**
-** Description This function is called when the local device is deemed
-** to be down. It notifies L2CAP of the failure.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_report_role_change
+ *
+ * Description This function is called when the local device is deemed
+ * to be down. It notifies L2CAP of the failure.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_acl_report_role_change (uint8_t hci_status, BD_ADDR bda)
{
tBTM_ROLE_SWITCH_CMPL ref_data;
@@ -349,16 +349,16 @@
}
/*******************************************************************************
-**
-** Function btm_acl_removed
-**
-** Description This function is called by L2CAP when an ACL connection
-** is removed. Since only L2CAP creates ACL links, we use
-** the L2CAP link index as our index into the control blocks.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_removed
+ *
+ * Description This function is called by L2CAP when an ACL connection
+ * is removed. Since only L2CAP creates ACL links, we use
+ * the L2CAP link index as our index into the control blocks.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_acl_removed (BD_ADDR bda, tBT_TRANSPORT transport)
{
tACL_CONN *p;
@@ -436,15 +436,15 @@
/*******************************************************************************
-**
-** Function btm_acl_device_down
-**
-** Description This function is called when the local device is deemed
-** to be down. It notifies L2CAP of the failure.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_device_down
+ *
+ * Description This function is called when the local device is deemed
+ * to be down. It notifies L2CAP of the failure.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_acl_device_down (void)
{
tACL_CONN *p = &btm_cb.acl_db[0];
@@ -461,15 +461,15 @@
}
/*******************************************************************************
-**
-** Function btm_acl_update_busy_level
-**
-** Description This function is called to update the busy level of the system
-** .
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_update_busy_level
+ *
+ * Description This function is called to update the busy level of the system
+ * .
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_acl_update_busy_level (tBTM_BLI_EVENT event)
{
bool old_inquiry_state = btm_cb.is_inquiry;
@@ -529,16 +529,16 @@
}
/*******************************************************************************
-**
-** Function BTM_GetRole
-**
-** Description This function is called to get the role of the local device
-** for the ACL connection with the specified remote device
-**
-** Returns BTM_SUCCESS if connection exists.
-** BTM_UNKNOWN_ADDR if no active link with bd addr specified
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetRole
+ *
+ * Description This function is called to get the role of the local device
+ * for the ACL connection with the specified remote device
+ *
+ * Returns BTM_SUCCESS if connection exists.
+ * BTM_UNKNOWN_ADDR if no active link with bd addr specified
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_GetRole (BD_ADDR remote_bd_addr, uint8_t *p_role)
{
tACL_CONN *p;
@@ -557,22 +557,22 @@
/*******************************************************************************
-**
-** 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
-** command was initiated, the callback function is called upon
-** completion.
-**
-** Returns BTM_SUCCESS if already in specified role.
-** BTM_CMD_STARTED if command issued to controller.
-** BTM_NO_RESOURCES if couldn't allocate memory to issue command
-** BTM_UNKNOWN_ADDR if no active link with bd addr specified
-** BTM_MODE_UNSUPPORTED if local device does not support role switching
-** BTM_BUSY if the previous command is not completed
-**
-*******************************************************************************/
+ *
+ * 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
+ * command was initiated, the callback function is called upon
+ * completion.
+ *
+ * Returns BTM_SUCCESS if already in specified role.
+ * BTM_CMD_STARTED if command issued to controller.
+ * BTM_NO_RESOURCES if couldn't allocate memory to issue command
+ * BTM_UNKNOWN_ADDR if no active link with bd addr specified
+ * BTM_MODE_UNSUPPORTED if local device does not support role switching
+ * BTM_BUSY if the previous command is not completed
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SwitchRole (BD_ADDR remote_bd_addr, uint8_t new_role, tBTM_CMPL_CB *p_cb)
{
tACL_CONN *p;
@@ -683,17 +683,17 @@
}
/*******************************************************************************
-**
-** Function btm_acl_encrypt_change
-**
-** 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.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_encrypt_change
+ *
+ * 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.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_acl_encrypt_change (uint16_t handle, uint8_t status, uint8_t encr_enable)
{
tACL_CONN *p;
@@ -770,14 +770,14 @@
}
}
/*******************************************************************************
-**
-** Function BTM_SetLinkPolicy
-**
-** Description Create and send HCI "Write Policy Set" command
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetLinkPolicy
+ *
+ * Description Create and send HCI "Write Policy Set" command
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetLinkPolicy (BD_ADDR remote_bda, uint16_t *settings)
{
tACL_CONN *p;
@@ -821,15 +821,15 @@
}
/*******************************************************************************
-**
-** Function BTM_SetDefaultLinkPolicy
-**
-** Description Set the default value for HCI "Write Policy Set" command
-** to use when an ACL link is created.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetDefaultLinkPolicy
+ *
+ * Description Set the default value for HCI "Write Policy Set" command
+ * to use when an ACL link is created.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_SetDefaultLinkPolicy (uint16_t settings)
{
uint8_t *localFeatures = BTM_ReadLocalFeatures();
@@ -902,15 +902,15 @@
}
/*******************************************************************************
-**
-** Function btm_read_remote_version_complete
-**
-** Description This function is called when the command complete message
-** is received from the HCI for the remote version info.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_remote_version_complete
+ *
+ * Description This function is called when the command complete message
+ * is received from the HCI for the remote version info.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_remote_version_complete (uint8_t *p)
{
tACL_CONN *p_acl_cb = &btm_cb.acl_db[0];
@@ -945,15 +945,15 @@
/*******************************************************************************
-**
-** Function btm_process_remote_ext_features
-**
-** Description Local function called to process all extended features pages
-** read from a remote device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_process_remote_ext_features
+ *
+ * Description Local function called to process all extended features pages
+ * read from a remote device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_process_remote_ext_features (tACL_CONN *p_acl_cb, uint8_t num_read_pages)
{
uint16_t handle = p_acl_cb->hci_handle;
@@ -999,15 +999,15 @@
/*******************************************************************************
-**
-** Function btm_read_remote_features
-**
-** Description Local function called to send a read remote supported features/
-** remote extended features page[0].
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_remote_features
+ *
+ * Description Local function called to send a read remote supported features/
+ * remote extended features page[0].
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_remote_features (uint16_t handle)
{
uint8_t acl_idx;
@@ -1033,14 +1033,14 @@
/*******************************************************************************
-**
-** Function btm_read_remote_ext_features
-**
-** Description Local function called to send a read remote extended features
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_remote_ext_features
+ *
+ * Description Local function called to send a read remote extended features
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_remote_ext_features (uint16_t handle, uint8_t page_number)
{
BTM_TRACE_DEBUG("btm_read_remote_ext_features() handle: %d page: %d", handle, page_number);
@@ -1050,15 +1050,15 @@
/*******************************************************************************
-**
-** Function btm_read_remote_features_complete
-**
-** Description This function is called when the remote supported features
-** complete event is received from the HCI.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_remote_features_complete
+ *
+ * Description This function is called when the remote supported features
+ * complete event is received from the HCI.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_remote_features_complete (uint8_t *p)
{
tACL_CONN *p_acl_cb;
@@ -1110,15 +1110,15 @@
}
/*******************************************************************************
-**
-** Function btm_read_remote_ext_features_complete
-**
-** Description This function is called when the remote extended features
-** complete event is received from the HCI.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_remote_ext_features_complete
+ *
+ * Description This function is called when the remote extended features
+ * complete event is received from the HCI.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_remote_ext_features_complete (uint8_t *p)
{
tACL_CONN *p_acl_cb;
@@ -1173,15 +1173,15 @@
}
/*******************************************************************************
-**
-** Function btm_read_remote_ext_features_failed
-**
-** Description This function is called when the remote extended features
-** complete event returns a failed status.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_remote_ext_features_failed
+ *
+ * Description This function is called when the remote extended features
+ * complete event returns a failed status.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_remote_ext_features_failed (uint8_t status, uint16_t handle)
{
tACL_CONN *p_acl_cb;
@@ -1207,15 +1207,15 @@
}
/*******************************************************************************
-**
-** Function btm_establish_continue
-**
-** Description This function is called when the command complete message
-** is received from the HCI for the read local link policy request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_establish_continue
+ *
+ * Description This function is called when the command complete message
+ * is received from the HCI for the read local link policy request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_establish_continue (tACL_CONN *p_acl_cb)
{
tBTM_BL_EVENT_DATA evt_data;
@@ -1252,15 +1252,15 @@
/*******************************************************************************
-**
-** Function BTM_SetDefaultLinkSuperTout
-**
-** Description Set the default value for HCI "Write Link Supervision Timeout"
-** command to use when an ACL link is created.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetDefaultLinkSuperTout
+ *
+ * Description Set the default value for HCI "Write Link Supervision Timeout"
+ * command to use when an ACL link is created.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_SetDefaultLinkSuperTout (uint16_t timeout)
{
BTM_TRACE_DEBUG ("BTM_SetDefaultLinkSuperTout");
@@ -1268,14 +1268,14 @@
}
/*******************************************************************************
-**
-** Function BTM_GetLinkSuperTout
-**
-** Description Read the link supervision timeout value of the connection
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetLinkSuperTout
+ *
+ * Description Read the link supervision timeout value of the connection
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_GetLinkSuperTout (BD_ADDR remote_bda, uint16_t *p_timeout)
{
tACL_CONN *p = btm_bda_to_acl(remote_bda, BT_TRANSPORT_BR_EDR);
@@ -1292,14 +1292,14 @@
/*******************************************************************************
-**
-** Function BTM_SetLinkSuperTout
-**
-** Description Create and send HCI "Write Link Supervision Timeout" command
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetLinkSuperTout
+ *
+ * Description Create and send HCI "Write Link Supervision Timeout" command
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetLinkSuperTout (BD_ADDR remote_bda, uint16_t timeout)
{
tACL_CONN *p = btm_bda_to_acl(remote_bda, BT_TRANSPORT_BR_EDR);
@@ -1325,15 +1325,15 @@
}
/*******************************************************************************
-**
-** Function BTM_IsAclConnectionUp
-**
-** Description This function is called to check if an ACL connection exists
-** to a specific remote BD Address.
-**
-** Returns true if connection is up, else false.
-**
-*******************************************************************************/
+ *
+ * Function BTM_IsAclConnectionUp
+ *
+ * Description This function is called to check if an ACL connection exists
+ * to a specific remote BD Address.
+ *
+ * Returns true if connection is up, else false.
+ *
+ ******************************************************************************/
bool BTM_IsAclConnectionUp (BD_ADDR remote_bda, tBT_TRANSPORT transport)
{
tACL_CONN *p;
@@ -1353,15 +1353,15 @@
}
/*******************************************************************************
-**
-** Function BTM_GetNumAclLinks
-**
-** Description This function is called to count the number of
-** ACL links that are active.
-**
-** Returns uint16_t Number of active ACL links
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetNumAclLinks
+ *
+ * Description This function is called to count the number of
+ * ACL links that are active.
+ *
+ * Returns uint16_t Number of active ACL links
+ *
+ ******************************************************************************/
uint16_t BTM_GetNumAclLinks (void)
{
uint16_t num_acl = 0;
@@ -1376,15 +1376,15 @@
}
/*******************************************************************************
-**
-** Function btm_get_acl_disc_reason_code
-**
-** Description This function is called to get the disconnection reason code
-** returned by the HCI at disconnection complete event.
-**
-** Returns true if connection is up, else false.
-**
-*******************************************************************************/
+ *
+ * Function btm_get_acl_disc_reason_code
+ *
+ * Description This function is called to get the disconnection reason code
+ * returned by the HCI at disconnection complete event.
+ *
+ * Returns true if connection is up, else false.
+ *
+ ******************************************************************************/
uint16_t btm_get_acl_disc_reason_code (void)
{
uint8_t res = btm_cb.acl_disc_reason;
@@ -1394,15 +1394,15 @@
/*******************************************************************************
-**
-** Function BTM_GetHCIConnHandle
-**
-** Description This function is called to get the handle for an ACL connection
-** to a specific remote BD Address.
-**
-** Returns the handle of the connection, or 0xFFFF if none.
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetHCIConnHandle
+ *
+ * Description This function is called to get the handle for an ACL connection
+ * to a specific remote BD Address.
+ *
+ * Returns the handle of the connection, or 0xFFFF if none.
+ *
+ ******************************************************************************/
uint16_t BTM_GetHCIConnHandle (const BD_ADDR remote_bda, tBT_TRANSPORT transport)
{
tACL_CONN *p;
@@ -1418,17 +1418,17 @@
}
/*******************************************************************************
-**
-** Function btm_process_clk_off_comp_evt
-**
-** Description This function is called when clock offset command completes.
-**
-** Input Parms hci_handle - connection handle associated with the change
-** clock offset
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_process_clk_off_comp_evt
+ *
+ * Description This function is called when clock offset command completes.
+ *
+ * Input Parms hci_handle - connection handle associated with the change
+ * clock offset
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_process_clk_off_comp_evt (uint16_t hci_handle, uint16_t clock_offset)
{
uint8_t xx;
@@ -1440,17 +1440,17 @@
}
/*******************************************************************************
-**
-** Function btm_acl_role_changed
-**
-** Description This function is called whan a link's master/slave role change
-** event or command status event (with error) is received.
-** It updates the link control block, and calls
-** the registered callback with status and role (if registered).
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_role_changed
+ *
+ * Description This function is called whan a link's master/slave role change
+ * event or command status event (with error) is received.
+ * It updates the link control block, and calls
+ * the registered callback with status and role (if registered).
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_acl_role_changed (uint8_t hci_status, BD_ADDR bd_addr, uint8_t new_role)
{
uint8_t *p_bda = (bd_addr) ? bd_addr :
@@ -1549,14 +1549,14 @@
}
/*******************************************************************************
-**
-** Function BTM_AllocateSCN
-**
-** Description Look through the Server Channel Numbers for a free one.
-**
-** Returns Allocated SCN number or 0 if none.
-**
-*******************************************************************************/
+ *
+ * Function BTM_AllocateSCN
+ *
+ * Description Look through the Server Channel Numbers for a free one.
+ *
+ * Returns Allocated SCN number or 0 if none.
+ *
+ ******************************************************************************/
uint8_t BTM_AllocateSCN(void)
{
@@ -1577,14 +1577,14 @@
}
/*******************************************************************************
-**
-** Function BTM_TryAllocateSCN
-**
-** Description Try to allocate a fixed server channel
-**
-** Returns Returns true if server channel was available
-**
-*******************************************************************************/
+ *
+ * Function BTM_TryAllocateSCN
+ *
+ * Description Try to allocate a fixed server channel
+ *
+ * Returns Returns true if server channel was available
+ *
+ ******************************************************************************/
bool BTM_TryAllocateSCN(uint8_t scn)
{
@@ -1605,14 +1605,14 @@
}
/*******************************************************************************
-**
-** Function BTM_FreeSCN
-**
-** Description Free the specified SCN.
-**
-** Returns true or false
-**
-*******************************************************************************/
+ *
+ * Function BTM_FreeSCN
+ *
+ * Description Free the specified SCN.
+ *
+ * Returns true or false
+ *
+ ******************************************************************************/
bool BTM_FreeSCN(uint8_t scn)
{
BTM_TRACE_DEBUG ("BTM_FreeSCN ");
@@ -1626,16 +1626,16 @@
}
/*******************************************************************************
-**
-** Function btm_set_packet_types
-**
-** Description This function sets the packet types used for a specific
-** ACL connection. It is called internally by btm_acl_created
-** or by an application/profile by BTM_SetPacketTypes.
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function btm_set_packet_types
+ *
+ * Description This function sets the packet types used for a specific
+ * ACL connection. It is called internally by btm_acl_created
+ * or by an application/profile by BTM_SetPacketTypes.
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_STATUS btm_set_packet_types (tACL_CONN *p, uint16_t pkt_types)
{
uint16_t temp_pkt_types;
@@ -1660,13 +1660,13 @@
}
/*******************************************************************************
-**
-** Function btm_get_max_packet_size
-**
-** Returns Returns maximum packet size that can be used for current
-** connection, 0 if connection is not established
-**
-*******************************************************************************/
+ *
+ * Function btm_get_max_packet_size
+ *
+ * Returns Returns maximum packet size that can be used for current
+ * connection, 0 if connection is not established
+ *
+ ******************************************************************************/
uint16_t btm_get_max_packet_size (BD_ADDR addr)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
@@ -1718,12 +1718,12 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadRemoteVersion
-**
-** Returns If connected report peer device info
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRemoteVersion
+ *
+ * Returns If connected report peer device info
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadRemoteVersion (BD_ADDR addr, uint8_t *lmp_version,
uint16_t *manufacturer, uint16_t *lmp_sub_version)
{
@@ -1745,12 +1745,12 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadRemoteFeatures
-**
-** Returns pointer to the remote supported features mask (8 bytes)
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRemoteFeatures
+ *
+ * Returns pointer to the remote supported features mask (8 bytes)
+ *
+ ******************************************************************************/
uint8_t *BTM_ReadRemoteFeatures (BD_ADDR addr)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
@@ -1764,13 +1764,13 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadRemoteExtendedFeatures
-**
-** Returns pointer to the remote extended features mask (8 bytes)
-** or NULL if bad page
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRemoteExtendedFeatures
+ *
+ * Returns pointer to the remote extended features mask (8 bytes)
+ * or NULL if bad page
+ *
+ ******************************************************************************/
uint8_t *BTM_ReadRemoteExtendedFeatures (BD_ADDR addr, uint8_t page_number)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
@@ -1790,12 +1790,12 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadNumberRemoteFeaturesPages
-**
-** Returns number of features pages read from the remote device.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadNumberRemoteFeaturesPages
+ *
+ * Returns number of features pages read from the remote device.
+ *
+ ******************************************************************************/
uint8_t BTM_ReadNumberRemoteFeaturesPages (BD_ADDR addr)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
@@ -1809,12 +1809,12 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadAllRemoteFeatures
-**
-** Returns pointer to all features of the remote (24 bytes).
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadAllRemoteFeatures
+ *
+ * Returns pointer to all features of the remote (24 bytes).
+ *
+ ******************************************************************************/
uint8_t *BTM_ReadAllRemoteFeatures (BD_ADDR addr)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
@@ -1828,15 +1828,15 @@
}
/*******************************************************************************
-**
-** Function BTM_RegBusyLevelNotif
-**
-** Description This function is called to register a callback to receive
-** busy level change events.
-**
-** Returns BTM_SUCCESS if successfully registered, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_RegBusyLevelNotif
+ *
+ * Description This function is called to register a callback to receive
+ * busy level change events.
+ *
+ * Returns BTM_SUCCESS if successfully registered, otherwise error
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_RegBusyLevelNotif (tBTM_BL_CHANGE_CB *p_cb, uint8_t *p_level,
tBTM_BL_EVENT_MASK evt_mask)
{
@@ -1857,14 +1857,14 @@
}
/*******************************************************************************
-**
-** Function BTM_SetQoS
-**
-** Description This function is called to setup QoS
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetQoS
+ *
+ * Description This function is called to setup QoS
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetQoS (BD_ADDR bd, FLOW_SPEC *p_flow, tBTM_CMPL_CB *p_cb)
{
tACL_CONN *p = &btm_cb.acl_db[0];
@@ -1897,14 +1897,14 @@
}
/*******************************************************************************
-**
-** Function btm_qos_setup_timeout
-**
-** Description Callback when QoS setup times out.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_qos_setup_timeout
+ *
+ * Description Callback when QoS setup times out.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_qos_setup_timeout(UNUSED_ATTR void *data)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_qos_setup_cmpl_cb;
@@ -1914,15 +1914,15 @@
}
/*******************************************************************************
-**
-** Function btm_qos_setup_complete
-**
-** Description This function is called when the command complete message
-** is received from the HCI for the qos setup request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_qos_setup_complete
+ *
+ * Description This function is called when the command complete message
+ * is received from the HCI for the qos setup request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_qos_setup_complete(uint8_t status, uint16_t handle, FLOW_SPEC *p_flow)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_qos_setup_cmpl_cb;
@@ -1954,16 +1954,16 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadRSSI
-**
-** Description This function is called to read the link policy settings.
-** The address of link policy results are returned in the callback.
-** (tBTM_RSSI_RESULTS)
-**
-** Returns BTM_CMD_STARTED if successfully initiated or error code
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRSSI
+ *
+ * Description This function is called to read the link policy settings.
+ * The address of link policy results are returned in the callback.
+ * (tBTM_RSSI_RESULTS)
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated or error code
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadRSSI (const BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
{
tACL_CONN *p;
@@ -1999,16 +1999,16 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadLinkQuality
-**
-** Description This function is called to read the link qulaity.
-** The value of the link quality is returned in the callback.
-** (tBTM_LINK_QUALITY_RESULTS)
-**
-** Returns BTM_CMD_STARTED if successfully initiated or error code
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLinkQuality
+ *
+ * Description This function is called to read the link qulaity.
+ * The value of the link quality is returned in the callback.
+ * (tBTM_LINK_QUALITY_RESULTS)
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated or error code
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadLinkQuality (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
{
tACL_CONN *p;
@@ -2039,17 +2039,17 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadTxPower
-**
-** 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)
-**
-** Returns BTM_CMD_STARTED if successfully initiated or error code
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadTxPower
+ *
+ * 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)
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated or error code
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadTxPower (BD_ADDR remote_bda, tBT_TRANSPORT transport, tBTM_CMPL_CB *p_cb)
{
tACL_CONN *p;
@@ -2091,14 +2091,14 @@
}
/*******************************************************************************
-**
-** Function btm_read_tx_power_timeout
-**
-** Description Callback when reading the tx power times out.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_tx_power_timeout
+ *
+ * Description Callback when reading the tx power times out.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_tx_power_timeout(UNUSED_ATTR void *data)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_tx_power_cmpl_cb;
@@ -2108,15 +2108,15 @@
}
/*******************************************************************************
-**
-** Function btm_read_tx_power_complete
-**
-** Description This function is called when the command complete message
-** is received from the HCI for the read tx power request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_tx_power_complete
+ *
+ * Description This function is called when the command complete message
+ * is received from the HCI for the read tx power request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_tx_power_complete(uint8_t *p, bool is_ble)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_tx_power_cmpl_cb;
@@ -2169,14 +2169,14 @@
}
/*******************************************************************************
-**
-** Function btm_read_rssi_timeout
-**
-** Description Callback when reading the RSSI times out.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_rssi_timeout
+ *
+ * Description Callback when reading the RSSI times out.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_rssi_timeout(UNUSED_ATTR void *data)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_rssi_cmpl_cb;
@@ -2186,15 +2186,15 @@
}
/*******************************************************************************
-**
-** Function btm_read_rssi_complete
-**
-** Description This function is called when the command complete message
-** is received from the HCI for the read rssi request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_rssi_complete
+ *
+ * Description This function is called when the command complete message
+ * is received from the HCI for the read rssi request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_rssi_complete (uint8_t *p)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_rssi_cmpl_cb;
@@ -2240,14 +2240,14 @@
}
/*******************************************************************************
-**
-** Function btm_read_link_quality_timeout
-**
-** Description Callback when reading the link quality times out.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_link_quality_timeout
+ *
+ * Description Callback when reading the link quality times out.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_link_quality_timeout(UNUSED_ATTR void *data)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_link_qual_cmpl_cb;
@@ -2257,15 +2257,15 @@
}
/*******************************************************************************
-**
-** Function btm_read_link_quality_complete
-**
-** Description This function is called when the command complete message
-** is received from the HCI for the read link quality.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_link_quality_complete
+ *
+ * Description This function is called when the command complete message
+ * is received from the HCI for the read link quality.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_link_quality_complete(uint8_t *p)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_link_qual_cmpl_cb;
@@ -2311,14 +2311,14 @@
}
/*******************************************************************************
-**
-** Function btm_remove_acl
-**
-** Description This function is called to disconnect an ACL connection
-**
-** Returns BTM_SUCCESS if successfully initiated, otherwise BTM_NO_RESOURCES.
-**
-*******************************************************************************/
+ *
+ * Function btm_remove_acl
+ *
+ * Description This function is called to disconnect an ACL connection
+ *
+ * Returns BTM_SUCCESS if successfully initiated, otherwise BTM_NO_RESOURCES.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_remove_acl (BD_ADDR bd_addr, tBT_TRANSPORT transport)
{
uint16_t hci_handle = BTM_GetHCIConnHandle(bd_addr, transport);
@@ -2350,15 +2350,15 @@
/*******************************************************************************
-**
-** Function BTM_SetTraceLevel
-**
-** Description This function sets the trace level for BTM. If called with
-** a value of 0xFF, it simply returns the current trace level.
-**
-** Returns The new or current trace level
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetTraceLevel
+ *
+ * Description This function sets the trace level for BTM. If called with
+ * a value of 0xFF, it simply returns the current trace level.
+ *
+ * Returns The new or current trace level
+ *
+ ******************************************************************************/
uint8_t BTM_SetTraceLevel (uint8_t new_level)
{
BTM_TRACE_DEBUG ("BTM_SetTraceLevel");
@@ -2369,16 +2369,16 @@
}
/*******************************************************************************
-**
-** Function btm_cont_rswitch
-**
-** Description This function is called to continue processing an active
-** role switch. It first disables encryption if enabled and
-** EPR is not supported
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_cont_rswitch
+ *
+ * Description This function is called to continue processing an active
+ * role switch. It first disables encryption if enabled and
+ * EPR is not supported
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_cont_rswitch (tACL_CONN *p, tBTM_SEC_DEV_REC *p_dev_rec,
uint8_t hci_status)
{
@@ -2414,12 +2414,12 @@
}
/*******************************************************************************
-**
-** Function btm_acl_resubmit_page
-**
-** Description send pending page request
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_resubmit_page
+ *
+ * Description send pending page request
+ *
+ ******************************************************************************/
void btm_acl_resubmit_page (void)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -2449,12 +2449,12 @@
}
/*******************************************************************************
-**
-** Function btm_acl_reset_paging
-**
-** Description set paging to false and free the page queue - called at hci_reset
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_reset_paging
+ *
+ * Description set paging to false and free the page queue - called at hci_reset
+ *
+ ******************************************************************************/
void btm_acl_reset_paging (void)
{
BT_HDR *p;
@@ -2467,12 +2467,12 @@
}
/*******************************************************************************
-**
-** Function btm_acl_paging
-**
-** Description send a paging command or queue it in btm_cb
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_paging
+ *
+ * Description send a paging command or queue it in btm_cb
+ *
+ ******************************************************************************/
void btm_acl_paging (BT_HDR *p, BD_ADDR bda)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -2518,15 +2518,15 @@
}
/*******************************************************************************
-**
-** Function btm_acl_notif_conn_collision
-**
-** Description Send connection collision event to upper layer if registered
-**
-** Returns true if sent out to upper layer,
-** false if no one needs the notification.
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_notif_conn_collision
+ *
+ * Description Send connection collision event to upper layer if registered
+ *
+ * Returns true if sent out to upper layer,
+ * false if no one needs the notification.
+ *
+ ******************************************************************************/
bool btm_acl_notif_conn_collision (BD_ADDR bda)
{
tBTM_BL_EVENT_DATA evt_data;
@@ -2550,12 +2550,12 @@
/*******************************************************************************
-**
-** Function btm_acl_chk_peer_pkt_type_support
-**
-** Description Check if peer supports requested packets
-**
-*******************************************************************************/
+ *
+ * Function btm_acl_chk_peer_pkt_type_support
+ *
+ * Description Check if peer supports requested packets
+ *
+ ******************************************************************************/
void btm_acl_chk_peer_pkt_type_support (tACL_CONN *p, uint16_t *p_pkt_type)
{
/* 3 and 5 slot packets? */
diff --git a/stack/btm/btm_ble.cc b/stack/btm/btm_ble.cc
index d8c1604..ff52bce 100644
--- a/stack/btm/btm_ble.cc
+++ b/stack/btm/btm_ble.cc
@@ -46,25 +46,25 @@
extern bool aes_cipher_msg_auth_code(BT_OCTET16 key, uint8_t *input, uint16_t length,
uint16_t tlen, uint8_t *p_signature);
-/*******************************************************************************/
+/******************************************************************************/
/* External Function to be called by other modules */
-/*******************************************************************************/
+/******************************************************************************/
/********************************************************
-**
-** Function BTM_SecAddBleDevice
-**
-** Description Add/modify device. This function will be normally called
-** during host startup to restore all required information
-** for a LE device stored in the NVRAM.
-**
-** Parameters: bd_addr - BD address of the peer
-** bd_name - Name of the peer device. NULL if unknown.
-** dev_type - Remote device's device type.
-** addr_type - LE device address type.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecAddBleDevice
+ *
+ * Description Add/modify device. This function will be normally called
+ * during host startup to restore all required information
+ * for a LE device stored in the NVRAM.
+ *
+ * Parameters: bd_addr - BD address of the peer
+ * bd_name - Name of the peer device. NULL if unknown.
+ * dev_type - Remote device's device type.
+ * addr_type - LE device address type.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool BTM_SecAddBleDevice (const BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type,
tBLE_ADDR_TYPE addr_type)
{
@@ -114,20 +114,20 @@
}
/*******************************************************************************
-**
-** Function BTM_SecAddBleKey
-**
-** 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
-** p_le_key - LE key values.
-** key_type - LE SMP key type.
+ *
+ * Function BTM_SecAddBleKey
+ *
+ * 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
+ * p_le_key - LE key values.
+ * key_type - LE SMP key type.
*
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_KEY_TYPE key_type)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -160,18 +160,18 @@
}
/*******************************************************************************
-**
-** Function BTM_BleLoadLocalKeys
-**
-** Description Local local identity key, encryption root or sign counter.
-**
-** Parameters: key_type: type of key, can be BTM_BLE_KEY_TYPE_ID, BTM_BLE_KEY_TYPE_ER
-** or BTM_BLE_KEY_TYPE_COUNTER.
-** p_key: pointer to the key.
+ *
+ * Function BTM_BleLoadLocalKeys
+ *
+ * Description Local local identity key, encryption root or sign counter.
+ *
+ * Parameters: key_type: type of key, can be BTM_BLE_KEY_TYPE_ID, BTM_BLE_KEY_TYPE_ER
+ * or BTM_BLE_KEY_TYPE_COUNTER.
+ * p_key: pointer to the key.
*
-** Returns non2.
-**
-*******************************************************************************/
+ * Returns non2.
+ *
+ ******************************************************************************/
void BTM_BleLoadLocalKeys(uint8_t key_type, tBTM_BLE_LOCAL_KEYS *p_key)
{
tBTM_DEVCB *p_devcb = &btm_cb.devcb;
@@ -196,16 +196,16 @@
}
/*******************************************************************************
-**
-** Function BTM_GetDeviceEncRoot
-**
-** Description This function is called to read the local device encryption
-** root.
-**
-** Returns void
-** the local device ER is copied into ble_encr_key_value
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetDeviceEncRoot
+ *
+ * Description This function is called to read the local device encryption
+ * root.
+ *
+ * Returns void
+ * the local device ER is copied into ble_encr_key_value
+ *
+ ******************************************************************************/
void BTM_GetDeviceEncRoot (BT_OCTET16 ble_encr_key_value)
{
BTM_TRACE_DEBUG ("%s", __func__);
@@ -213,16 +213,16 @@
}
/*******************************************************************************
-**
-** Function BTM_GetDeviceIDRoot
-**
-** Description This function is called to read the local device identity
-** root.
-**
-** Returns void
-** the local device IR is copied into irk
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetDeviceIDRoot
+ *
+ * Description This function is called to read the local device identity
+ * root.
+ *
+ * Returns void
+ * the local device IR is copied into irk
+ *
+ ******************************************************************************/
void BTM_GetDeviceIDRoot (BT_OCTET16 irk)
{
BTM_TRACE_DEBUG ("BTM_GetDeviceIDRoot ");
@@ -231,15 +231,15 @@
}
/*******************************************************************************
-**
-** Function BTM_GetDeviceDHK
-**
-** Description This function is called to read the local device DHK.
-**
-** Returns void
-** the local device DHK is copied into dhk
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetDeviceDHK
+ *
+ * Description This function is called to read the local device DHK.
+ *
+ * Returns void
+ * the local device DHK is copied into dhk
+ *
+ ******************************************************************************/
void BTM_GetDeviceDHK (BT_OCTET16 dhk)
{
BTM_TRACE_DEBUG ("BTM_GetDeviceDHK");
@@ -247,15 +247,15 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadConnectionAddr
-**
-** Description This function is called to get the local device address information
-** .
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadConnectionAddr
+ *
+ * Description This function is called to get the local device address information
+ * .
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_ReadConnectionAddr (BD_ADDR remote_bda, BD_ADDR local_conn_addr, tBLE_ADDR_TYPE *p_addr_type)
{
tACL_CONN *p_acl = btm_bda_to_acl(remote_bda, BT_TRANSPORT_LE);
@@ -273,15 +273,15 @@
}
/*******************************************************************************
-**
-** Function BTM_IsBleConnection
-**
-** Description This function is called to check if the connection handle
-** for an LE link
-**
-** Returns true if connection is LE link, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function BTM_IsBleConnection
+ *
+ * Description This function is called to check if the connection handle
+ * for an LE link
+ *
+ * Returns true if connection is LE link, otherwise false.
+ *
+ ******************************************************************************/
bool BTM_IsBleConnection (uint16_t conn_handle)
{
uint8_t xx;
@@ -299,18 +299,18 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadRemoteConnectionAddr
-**
-** Description This function is read the remote device address currently used
-**
-** Parameters pseudo_addr: pseudo random address available
-** conn_addr:connection address used
-** p_addr_type : BD Address type, Public or Random of the address used
-**
-** Returns bool , true if connection to remote device exists, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRemoteConnectionAddr
+ *
+ * Description This function is read the remote device address currently used
+ *
+ * Parameters pseudo_addr: pseudo random address available
+ * conn_addr:connection address used
+ * p_addr_type : BD Address type, Public or Random of the address used
+ *
+ * Returns bool , true if connection to remote device exists, else false
+ *
+ ******************************************************************************/
bool BTM_ReadRemoteConnectionAddr(BD_ADDR pseudo_addr, BD_ADDR conn_addr,
tBLE_ADDR_TYPE *p_addr_type)
{
@@ -340,18 +340,18 @@
}
/*******************************************************************************
-**
-** Function BTM_SecurityGrant
-**
-** 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.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecurityGrant
+ *
+ * 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.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void BTM_SecurityGrant(BD_ADDR bd_addr, uint8_t res)
{
tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_REPEATED_ATTEMPTS;
@@ -360,19 +360,19 @@
}
/*******************************************************************************
-**
-** Function BTM_BlePasskeyReply
-**
-** Description This function is called after Security Manager submitted
-** 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
-** 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_t)
-**
-*******************************************************************************/
+ *
+ * Function BTM_BlePasskeyReply
+ *
+ * Description This function is called after Security Manager submitted
+ * 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
+ * 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_t)
+ *
+ ******************************************************************************/
void BTM_BlePasskeyReply (BD_ADDR bd_addr, uint8_t res, uint32_t passkey)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -390,17 +390,17 @@
}
/*******************************************************************************
-**
-** Function BTM_BleConfirmReply
-**
-** Description This function is called after Security Manager submitted
-** numeric comparison request to the application.
-**
-** Parameters: bd_addr - Address of the device with which numeric
-** comparison was requested
-** res - comparison result BTM_SUCCESS if success
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleConfirmReply
+ *
+ * Description This function is called after Security Manager submitted
+ * numeric comparison request to the application.
+ *
+ * Parameters: bd_addr - Address of the device with which numeric
+ * comparison was requested
+ * res - comparison result BTM_SUCCESS if success
+ *
+ ******************************************************************************/
void BTM_BleConfirmReply (BD_ADDR bd_addr, uint8_t res)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -418,19 +418,19 @@
}
/*******************************************************************************
-**
-** Function BTM_BleOobDataReply
-**
-** Description This function is called to provide the OOB data for
-** 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
-** p_data - oob data, depending on transport and capabilities.
-** Might be "Simple Pairing Randomizer", or
-** "Security Manager TK Value".
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleOobDataReply
+ *
+ * Description This function is called to provide the OOB data for
+ * 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
+ * p_data - oob data, depending on transport and capabilities.
+ * Might be "Simple Pairing Randomizer", or
+ * "Security Manager TK Value".
+ *
+ ******************************************************************************/
void BTM_BleOobDataReply(BD_ADDR bd_addr, uint8_t res, uint8_t len, uint8_t *p_data)
{
tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_OOB_FAIL;
@@ -448,18 +448,18 @@
}
/*******************************************************************************
-**
-** Function BTM_BleSecureConnectionOobDataReply
-**
-** Description This function is called to provide the OOB data for
-** SMP in response to BTM_LE_OOB_REQ_EVT when secure connection
-** data is available
-**
-** Parameters: bd_addr - Address of the peer device
-** p_c - pointer to Confirmation.
-** p_r - pointer to Randomizer
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSecureConnectionOobDataReply
+ *
+ * Description This function is called to provide the OOB data for
+ * SMP in response to BTM_LE_OOB_REQ_EVT when secure connection
+ * data is available
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * p_c - pointer to Confirmation.
+ * p_r - pointer to Randomizer
+ *
+ ******************************************************************************/
void BTM_BleSecureConnectionOobDataReply(BD_ADDR bd_addr,
uint8_t *p_c, uint8_t *p_r)
{
@@ -487,17 +487,17 @@
}
/******************************************************************************
-**
-** Function BTM_BleSetConnScanParams
-**
-** Description Set scan parameter used in BLE connection request
-**
-** Parameters: scan_interval: scan interval
-** scan_window: scan window
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetConnScanParams
+ *
+ * Description Set scan parameter used in BLE connection request
+ *
+ * Parameters: scan_interval: scan interval
+ * scan_window: scan window
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_BleSetConnScanParams (uint32_t scan_interval, uint32_t scan_window)
{
tBTM_BLE_CB *p_ble_cb = &btm_cb.ble_ctr_cb;
@@ -530,22 +530,22 @@
}
/********************************************************
-**
-** Function BTM_BleSetPrefConnParams
-**
-** Description Set a peripheral's preferred connection parameters
-**
-** Parameters: bd_addr - BD address of the peripheral
-** scan_interval: scan interval
-** scan_window: scan window
-** min_conn_int - minimum preferred connection interval
-** max_conn_int - maximum preferred connection interval
-** slave_latency - preferred slave latency
-** supervision_tout - preferred supervision timeout
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetPrefConnParams
+ *
+ * Description Set a peripheral's preferred connection parameters
+ *
+ * Parameters: bd_addr - BD address of the peripheral
+ * scan_interval: scan interval
+ * scan_window: scan window
+ * min_conn_int - minimum preferred connection interval
+ * max_conn_int - maximum preferred connection interval
+ * slave_latency - preferred slave latency
+ * supervision_tout - preferred supervision timeout
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_BleSetPrefConnParams (BD_ADDR bd_addr,
uint16_t min_conn_int, uint16_t max_conn_int,
uint16_t slave_latency, uint16_t supervision_tout)
@@ -601,17 +601,17 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadDevInfo
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadDevInfo
+ *
+ * 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.
+ *
+ ******************************************************************************/
void BTM_ReadDevInfo (const BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR_TYPE *p_addr_type)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (remote_bda);
@@ -663,18 +663,18 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadConnectedTransportAddress
-**
-** Description This function is called to read the paired device/address type of other device paired
-** corresponding to the BD_address
-**
-** Parameter remote_bda: remote device address, carry out the transport address
-** transport: active transport
-**
-** Return true if an active link is identified; false otherwise
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadConnectedTransportAddress
+ *
+ * Description This function is called to read the paired device/address type of other device paired
+ * corresponding to the BD_address
+ *
+ * Parameter remote_bda: remote device address, carry out the transport address
+ * transport: active transport
+ *
+ * Return true if an active link is identified; false otherwise
+ *
+ ******************************************************************************/
bool BTM_ReadConnectedTransportAddress(BD_ADDR remote_bda, tBT_TRANSPORT transport)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev(remote_bda);
@@ -712,15 +712,15 @@
}
/*******************************************************************************
-**
-** Function BTM_BleReceiverTest
-**
-** Description This function is called to start the LE Receiver test
-**
-** Parameter rx_freq - Frequency Range
-** p_cmd_cmpl_cback - Command Complete callback
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleReceiverTest
+ *
+ * Description This function is called to start the LE Receiver test
+ *
+ * Parameter rx_freq - Frequency Range
+ * p_cmd_cmpl_cback - Command Complete callback
+ *
+ ******************************************************************************/
void BTM_BleReceiverTest(uint8_t rx_freq, tBTM_CMPL_CB *p_cmd_cmpl_cback)
{
btm_cb.devcb.p_le_test_cmd_cmpl_cb = p_cmd_cmpl_cback;
@@ -729,17 +729,17 @@
}
/*******************************************************************************
-**
-** Function BTM_BleTransmitterTest
-**
-** Description This function is called to start the LE Transmitter test
-**
-** Parameter tx_freq - Frequency Range
-** test_data_len - Length in bytes of payload data in each packet
-** packet_payload - Pattern to use in the payload
-** p_cmd_cmpl_cback - Command Complete callback
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleTransmitterTest
+ *
+ * Description This function is called to start the LE Transmitter test
+ *
+ * Parameter tx_freq - Frequency Range
+ * test_data_len - Length in bytes of payload data in each packet
+ * packet_payload - Pattern to use in the payload
+ * p_cmd_cmpl_cback - Command Complete callback
+ *
+ ******************************************************************************/
void BTM_BleTransmitterTest(uint8_t tx_freq, uint8_t test_data_len,
uint8_t packet_payload, tBTM_CMPL_CB *p_cmd_cmpl_cback)
{
@@ -748,14 +748,14 @@
}
/*******************************************************************************
-**
-** Function BTM_BleTestEnd
-**
-** Description This function is called to stop the in-progress TX or RX test
-**
-** Parameter p_cmd_cmpl_cback - Command complete callback
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleTestEnd
+ *
+ * Description This function is called to stop the in-progress TX or RX test
+ *
+ * Parameter p_cmd_cmpl_cback - Command complete callback
+ *
+ ******************************************************************************/
void BTM_BleTestEnd(tBTM_CMPL_CB *p_cmd_cmpl_cback)
{
btm_cb.devcb.p_le_test_cmd_cmpl_cb = p_cmd_cmpl_cback;
@@ -764,8 +764,8 @@
}
/*******************************************************************************
-** Internal Functions
-*******************************************************************************/
+ * Internal Functions
+ ******************************************************************************/
void btm_ble_test_command_complete(uint8_t *p)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_le_test_cmd_cmpl_cb;
@@ -779,14 +779,14 @@
}
/*******************************************************************************
-**
-** Function BTM_UseLeLink
-**
-** Description This function is to select the underneath physical link to use.
-**
-** Returns true to use LE, false use BR/EDR.
-**
-*******************************************************************************/
+ *
+ * Function BTM_UseLeLink
+ *
+ * Description This function is to select the underneath physical link to use.
+ *
+ * Returns true to use LE, false use BR/EDR.
+ *
+ ******************************************************************************/
bool BTM_UseLeLink (BD_ADDR bd_addr)
{
tACL_CONN *p;
@@ -810,14 +810,14 @@
}
/*******************************************************************************
-**
-** Function BTM_SetBleDataLength
-**
-** Description This function is to set maximum BLE transmission packet size
-**
-** Returns BTM_SUCCESS if success; otherwise failed.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetBleDataLength
+ *
+ * Description This function is to set maximum BLE transmission packet size
+ *
+ * Returns BTM_SUCCESS if success; otherwise failed.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetBleDataLength(BD_ADDR bd_addr, uint16_t tx_pdu_length)
{
tACL_CONN *p_acl = btm_bda_to_acl(bd_addr, BT_TRANSPORT_LE);
@@ -855,20 +855,20 @@
}
/*******************************************************************************
-**
-** Function btm_ble_determine_security_act
-**
-** Description This function checks the security of current LE link
-** and returns the appropriate action that needs to be
-** taken to achieve the required security.
-**
-** Parameter is_originator - True if outgoing connection
-** bdaddr: remote device address
-** security_required: Security required for the service.
-**
-** Returns The appropriate security action required.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_determine_security_act
+ *
+ * Description This function checks the security of current LE link
+ * and returns the appropriate action that needs to be
+ * taken to achieve the required security.
+ *
+ * Parameter is_originator - True if outgoing connection
+ * bdaddr: remote device address
+ * security_required: Security required for the service.
+ *
+ * Returns The appropriate security action required.
+ *
+ ******************************************************************************/
tBTM_SEC_ACTION btm_ble_determine_security_act(bool is_originator, BD_ADDR bdaddr, uint16_t security_required)
{
tBTM_LE_AUTH_REQ auth_req = 0x00;
@@ -944,21 +944,21 @@
}
/*******************************************************************************
-**
-** Function btm_ble_start_sec_check
-**
-** Description This function is to check and set the security required for
-** LE link for LE COC.
-**
-** Parameter bdaddr: remote device address.
-** psm : PSM of the LE COC sevice.
-** is_originator: true if outgoing connection.
-** p_callback : Pointer to the callback function.
-** p_ref_data : Pointer to be returned along with the callback.
-**
-** Returns true if link already meets the required security; otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_start_sec_check
+ *
+ * Description This function is to check and set the security required for
+ * LE link for LE COC.
+ *
+ * Parameter bdaddr: remote device address.
+ * psm : PSM of the LE COC sevice.
+ * is_originator: true if outgoing connection.
+ * p_callback : Pointer to the callback function.
+ * p_ref_data : Pointer to be returned along with the callback.
+ *
+ * Returns true if link already meets the required security; otherwise false.
+ *
+ ******************************************************************************/
bool btm_ble_start_sec_check(BD_ADDR bd_addr, uint16_t psm, bool is_originator,
tBTM_SEC_CALLBACK *p_callback, void *p_ref_data)
{
@@ -1018,16 +1018,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_rand_enc_complete
-**
-** Description This function is the callback functions for HCI_Rand command
-** and HCI_Encrypt command is completed.
-** This message is received from the HCI.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_rand_enc_complete
+ *
+ * Description This function is the callback functions for HCI_Rand command
+ * and HCI_Encrypt command is completed.
+ * This message is received from the HCI.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_rand_enc_complete (uint8_t *p, uint16_t op_code, tBTM_RAND_ENC_CB *p_enc_cplt_cback)
{
tBTM_RAND_ENC params;
@@ -1060,13 +1060,13 @@
}
/*******************************************************************************
-**
-** Function btm_ble_get_enc_key_type
-**
-** Description This function is to increment local sign counter
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_get_enc_key_type
+ *
+ * Description This function is to increment local sign counter
+ * Returns None
+ *
+ ******************************************************************************/
void btm_ble_increment_sign_ctr(BD_ADDR bd_addr, bool is_local )
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -1088,15 +1088,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_get_enc_key_type
-**
-** Description This function is to get the BLE key type that has been exchanged
-** in betweem local device and peer device.
-**
-** Returns p_key_type: output parameter to carry the key type value.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_get_enc_key_type
+ *
+ * Description This function is to get the BLE key type that has been exchanged
+ * in betweem local device and peer device.
+ *
+ * Returns p_key_type: output parameter to carry the key type value.
+ *
+ ******************************************************************************/
bool btm_ble_get_enc_key_type(BD_ADDR bd_addr, uint8_t *p_key_types)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -1113,13 +1113,13 @@
}
/*******************************************************************************
-**
-** Function btm_get_local_div
-**
-** Description This function is called to read the local DIV
-**
-** Returns TURE - if a valid DIV is availavle
-*******************************************************************************/
+ *
+ * Function btm_get_local_div
+ *
+ * Description This function is called to read the local DIV
+ *
+ * Returns TURE - if a valid DIV is availavle
+ ******************************************************************************/
bool btm_get_local_div (BD_ADDR bd_addr, uint16_t *p_div)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -1144,18 +1144,18 @@
}
/*******************************************************************************
-**
-** Function btm_sec_save_le_key
-**
-** Description This function is called by the SMP to update
-** an BLE key. SMP is internal, whereas all the keys shall
-** be sent to the application. The function is also called
-** when application passes ble key stored in NVRAM to the btm_sec.
-** pass_to_application parameter is false in this case.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_save_le_key
+ *
+ * Description This function is called by the SMP to update
+ * an BLE key. SMP is internal, whereas all the keys shall
+ * be sent to the application. The function is also called
+ * when application passes ble key stored in NVRAM to the btm_sec.
+ * pass_to_application parameter is false in this case.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY_VALUE *p_keys,
bool pass_to_application)
{
@@ -1292,14 +1292,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_sec_key_size
-**
-** Description update the current lin kencryption key size
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_sec_key_size
+ *
+ * Description update the current lin kencryption key size
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_update_sec_key_size(BD_ADDR bd_addr, uint8_t enc_key_size)
{
tBTM_SEC_DEV_REC *p_rec;
@@ -1314,14 +1314,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_read_sec_key_size
-**
-** Description update the current lin kencryption key size
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_read_sec_key_size
+ *
+ * Description update the current lin kencryption key size
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint8_t btm_ble_read_sec_key_size(BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_rec;
@@ -1336,14 +1336,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_link_sec_check
-**
-** Description Check BLE link security level match.
-**
-** Returns true: check is OK and the *p_sec_req_act contain the action
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_link_sec_check
+ *
+ * Description Check BLE link security level match.
+ *
+ * Returns true: check is OK and the *p_sec_req_act contain the action
+ *
+ ******************************************************************************/
void btm_ble_link_sec_check(BD_ADDR bd_addr, tBTM_LE_AUTH_REQ auth_req, tBTM_BLE_SEC_REQ_ACT *p_sec_req_act)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -1409,18 +1409,18 @@
}
/*******************************************************************************
-**
-** Function btm_ble_set_encryption
-**
-** 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.
-**
-** Returns void
-** the local device ER is copied into er
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_encryption
+ *
+ * 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.
+ *
+ * Returns void
+ * the local device ER is copied into er
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, tBTM_BLE_SEC_ACT sec_act, uint8_t link_role)
{
tBTM_STATUS cmd = BTM_NO_RESOURCES;
@@ -1488,16 +1488,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_ltk_request
-**
-** Description This function is called when encryption request is received
-** on a slave device.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_ltk_request
+ *
+ * Description This function is called when encryption request is received
+ * on a slave device.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8], uint16_t ediv)
{
tBTM_CB *p_cb = &btm_cb;
@@ -1519,15 +1519,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_start_encrypt
-**
-** Description This function is called to start LE encryption.
-**
-**
-** Returns BTM_SUCCESS if encryption was started successfully
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_start_encrypt
+ *
+ * Description This function is called to start LE encryption.
+ *
+ *
+ * Returns BTM_SUCCESS if encryption was started successfully
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_start_encrypt(BD_ADDR bda, bool use_stk, BT_OCTET16 stk)
{
tBTM_CB *p_cb = &btm_cb;
@@ -1572,14 +1572,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_link_encrypted
-**
-** Description This function is called when LE link encrption status is changed.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_link_encrypted
+ *
+ * Description This function is called when LE link encrption status is changed.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_link_encrypted(BD_ADDR bd_addr, uint8_t encr_enable)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -1616,15 +1616,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_ltk_request_reply
-**
-** Description This function is called to send a LTK request reply on a slave
-** device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_ltk_request_reply
+ *
+ * Description This function is called to send a LTK request reply on a slave
+ * device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_ltk_request_reply(BD_ADDR bda, bool use_stk, BT_OCTET16 stk)
{
tBTM_SEC_DEV_REC *p_rec = btm_find_dev (bda);
@@ -1655,14 +1655,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_io_capabilities_req
-**
-** Description This function is called to handle SMP get IO capability request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_io_capabilities_req
+ *
+ * Description This function is called to handle SMP get IO capability request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint8_t btm_ble_io_capabilities_req(tBTM_SEC_DEV_REC *p_dev_rec, tBTM_LE_IO_REQ *p_data)
{
uint8_t callback_rc = BTM_SUCCESS;
@@ -1738,15 +1738,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_br_keys_req
-**
-** Description This function is called to handle SMP request for keys sent
-** over BR/EDR.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_br_keys_req
+ *
+ * Description This function is called to handle SMP request for keys sent
+ * over BR/EDR.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint8_t btm_ble_br_keys_req(tBTM_SEC_DEV_REC *p_dev_rec, tBTM_LE_IO_REQ *p_data)
{
uint8_t callback_rc = BTM_SUCCESS;
@@ -1763,14 +1763,14 @@
#if (BLE_PRIVACY_SPT == TRUE)
/*******************************************************************************
-**
-** Function btm_ble_resolve_random_addr_on_conn_cmpl
-**
-** Description resolve random address complete on connection complete event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resolve_random_addr_on_conn_cmpl
+ *
+ * Description resolve random address complete on connection complete event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_resolve_random_addr_on_conn_cmpl(void * p_rec, void *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -1825,15 +1825,15 @@
#endif
/*******************************************************************************
-**
-** Function btm_ble_connected
-**
-** Description This function is when a LE connection to the peer device is
-** establsihed
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_connected
+ *
+ * Description This function is when a LE connection to the peer device is
+ * establsihed
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_connected (uint8_t *bda, uint16_t handle, uint8_t enc_mode, uint8_t role,
tBLE_ADDR_TYPE addr_type,
UNUSED_ATTR bool addr_matched)
@@ -1898,11 +1898,11 @@
}
/*****************************************************************************
-** Function btm_ble_conn_complete
-**
-** Description LE connection complete.
-**
-******************************************************************************/
+ * Function btm_ble_conn_complete
+ *
+ * Description LE connection complete.
+ *
+ *****************************************************************************/
void btm_ble_conn_complete(uint8_t *p,
UNUSED_ATTR uint16_t evt_len, bool enhanced)
{
@@ -1987,11 +1987,11 @@
}
/*****************************************************************************
-** Function btm_ble_create_ll_conn_complete
-**
-** Description LE connection complete.
-**
-******************************************************************************/
+ * Function btm_ble_create_ll_conn_complete
+ *
+ * Description LE connection complete.
+ *
+ *****************************************************************************/
void btm_ble_create_ll_conn_complete (uint8_t status)
{
if (status != HCI_SUCCESS)
@@ -2001,11 +2001,11 @@
}
}
/*****************************************************************************
-** Function btm_proc_smp_cback
-**
-** Description This function is the SMP callback handler.
-**
-******************************************************************************/
+ * Function btm_proc_smp_cback
+ *
+ * Description This function is the SMP callback handler.
+ *
+ *****************************************************************************/
uint8_t btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -2132,21 +2132,21 @@
}
/*******************************************************************************
-**
-** Function BTM_BleDataSignature
-**
-** Description This function is called to sign the data using AES128 CMAC
-** algorith.
-**
-** 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.
-**
-** Returns true if signing sucessul, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleDataSignature
+ *
+ * Description This function is called to sign the data using AES128 CMAC
+ * algorith.
+ *
+ * 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.
+ *
+ * Returns true if signing sucessul, otherwise false.
+ *
+ ******************************************************************************/
bool BTM_BleDataSignature (BD_ADDR bd_addr, uint8_t *p_text, uint16_t len,
BLE_SIGNATURE signature)
{
@@ -2191,20 +2191,20 @@
}
/*******************************************************************************
-**
-** Function BTM_BleVerifySignature
-**
-** Description This function is called to verify the data signature
-**
-** Parameter bd_addr: target device the data to be signed for.
-** p_orig: original data before signature.
-** len: length of the signing data
-** counter: counter used when doing data signing
-** p_comp: signature to be compared against.
+ *
+ * Function BTM_BleVerifySignature
+ *
+ * Description This function is called to verify the data signature
+ *
+ * Parameter bd_addr: target device the data to be signed for.
+ * p_orig: original data before signature.
+ * len: length of the signing data
+ * counter: counter used when doing data signing
+ * p_comp: signature to be compared against.
-** Returns true if signature verified correctly; otherwise false.
-**
-*******************************************************************************/
+ * Returns true if signature verified correctly; otherwise false.
+ *
+ ******************************************************************************/
bool BTM_BleVerifySignature (BD_ADDR bd_addr, uint8_t *p_orig, uint16_t len, uint32_t counter,
uint8_t *p_comp)
{
@@ -2242,15 +2242,15 @@
}
/*******************************************************************************
-**
-** Function BTM_GetLeSecurityState
-**
-** Description This function is called to get security mode 1 flags and
-** encryption key size for LE peer.
-**
-** Returns bool true if LE device is found, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetLeSecurityState
+ *
+ * Description This function is called to get security mode 1 flags and
+ * encryption key size for LE peer.
+ *
+ * Returns bool true if LE device is found, false otherwise.
+ *
+ ******************************************************************************/
bool BTM_GetLeSecurityState (BD_ADDR bd_addr, uint8_t *p_le_dev_sec_flags, uint8_t *p_le_key_size)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -2300,15 +2300,15 @@
}
/*******************************************************************************
-**
-** Function BTM_BleSecurityProcedureIsRunning
-**
-** Description This function indicates if LE security procedure is
-** currently running with the peer.
-**
-** Returns bool true if security procedure is running, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSecurityProcedureIsRunning
+ *
+ * Description This function indicates if LE security procedure is
+ * currently running with the peer.
+ *
+ * Returns bool true if security procedure is running, false otherwise.
+ *
+ ******************************************************************************/
bool BTM_BleSecurityProcedureIsRunning(BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -2326,16 +2326,16 @@
}
/*******************************************************************************
-**
-** Function BTM_BleGetSupportedKeySize
-**
-** Description This function gets the maximum encryption key size in bytes
-** the local device can suport.
-** record.
-**
-** Returns the key size or 0 if the size can't be retrieved.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleGetSupportedKeySize
+ *
+ * Description This function gets the maximum encryption key size in bytes
+ * the local device can suport.
+ * record.
+ *
+ * Returns the key size or 0 if the size can't be retrieved.
+ *
+ ******************************************************************************/
extern uint8_t BTM_BleGetSupportedKeySize (BD_ADDR bd_addr)
{
#if (L2CAP_LE_COC_INCLUDED == TRUE)
@@ -2374,18 +2374,18 @@
}
/*******************************************************************************
-** Utility functions for LE device IR/ER generation
-*******************************************************************************/
+ * Utility functions for LE device IR/ER generation
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function btm_notify_new_key
-**
-** Description This function is to notify application new keys have been
-** generated.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_notify_new_key
+ *
+ * Description This function is to notify application new keys have been
+ * generated.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_notify_new_key(uint8_t key_type)
{
tBTM_BLE_LOCAL_KEYS *p_locak_keys = NULL;
@@ -2416,15 +2416,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_process_er2
-**
-** Description This function is called when ER is generated, store it in
-** local control block.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_process_er2
+ *
+ * Description This function is called when ER is generated, store it in
+ * local control block.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_process_er2(tBTM_RAND_ENC *p)
{
BTM_TRACE_DEBUG ("btm_ble_process_er2");
@@ -2442,15 +2442,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_process_er
-**
-** Description This function is called when ER is generated, store it in
-** local control block.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_process_er
+ *
+ * Description This function is called when ER is generated, store it in
+ * local control block.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_process_er(tBTM_RAND_ENC *p)
{
BTM_TRACE_DEBUG ("btm_ble_process_er");
@@ -2468,15 +2468,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_process_irk
-**
-** Description This function is called when IRK is generated, store it in
-** local control block.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_process_irk
+ *
+ * Description This function is called when IRK is generated, store it in
+ * local control block.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_process_irk(tSMP_ENC *p)
{
BTM_TRACE_DEBUG ("btm_ble_process_irk");
@@ -2503,16 +2503,16 @@
}
/*******************************************************************************
-**
-** 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
-** random number.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * 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
+ * random number.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_process_dhk(tSMP_ENC *p)
{
uint8_t btm_ble_irk_pt = 0x01;
@@ -2545,16 +2545,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_process_ir2
-**
-** Description This function is called when IR is generated, proceed to calculate
-** DHK = Eir({0x03, 0, 0 ...})
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_process_ir2
+ *
+ * Description This function is called when IR is generated, proceed to calculate
+ * DHK = Eir({0x03, 0, 0 ...})
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_process_ir2(tBTM_RAND_ENC *p)
{
uint8_t btm_ble_dhk_pt = 0x03;
@@ -2581,16 +2581,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_process_ir
-**
-** Description This function is called when IR is generated, proceed to calculate
-** DHK = Eir({0x02, 0, 0 ...})
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_process_ir
+ *
+ * Description This function is called when IR is generated, proceed to calculate
+ * DHK = Eir({0x02, 0, 0 ...})
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_process_ir(tBTM_RAND_ENC *p)
{
BTM_TRACE_DEBUG ("btm_ble_process_ir");
@@ -2605,14 +2605,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_reset_id
-**
-** Description This function is called to reset LE device identity.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_reset_id
+ *
+ * Description This function is called to reset LE device identity.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_reset_id( void )
{
BTM_TRACE_DEBUG ("btm_ble_reset_id");
@@ -2623,15 +2623,15 @@
#if BTM_BLE_CONFORMANCE_TESTING == true
/*******************************************************************************
-**
-** Function btm_ble_set_no_disc_if_pair_fail
-**
-** Description This function indicates that whether no disconnect of the ACL
-** should be used if pairing failed
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_no_disc_if_pair_fail
+ *
+ * Description This function indicates that whether no disconnect of the ACL
+ * should be used if pairing failed
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_set_no_disc_if_pair_fail(bool disable_disc )
{
BTM_TRACE_DEBUG ("btm_ble_set_disc_enable_if_pair_fail disable_disc=%d", disable_disc);
@@ -2639,14 +2639,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_set_test_mac_value
-**
-** Description This function set test MAC value
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_test_mac_value
+ *
+ * Description This function set test MAC value
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_set_test_mac_value(bool enable, uint8_t *p_test_mac_val )
{
BTM_TRACE_DEBUG ("btm_ble_set_test_mac_value enable=%d", enable);
@@ -2655,14 +2655,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_set_test_local_sign_cntr_value
-**
-** Description This function set test local sign counter value
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * 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(bool enable, uint32_t test_local_sign_cntr )
{
BTM_TRACE_DEBUG ("btm_ble_set_test_local_sign_cntr_value enable=%d local_sign_cntr=%d",
@@ -2672,14 +2672,14 @@
}
/*******************************************************************************
-**
-** Function btm_set_random_address
-**
-** Description This function set a random address to local controller.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_set_random_address
+ *
+ * Description This function set a random address to local controller.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_set_random_address(BD_ADDR random_bda)
{
tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
@@ -2699,15 +2699,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_set_keep_rfu_in_auth_req
-**
-** Description This function indicates if RFU bits have to be kept as is
-** (by default they have to be set to 0 by the sender).
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_keep_rfu_in_auth_req
+ *
+ * Description This function indicates if RFU bits have to be kept as is
+ * (by default they have to be set to 0 by the sender).
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_set_keep_rfu_in_auth_req(bool keep_rfu)
{
BTM_TRACE_DEBUG ("btm_ble_set_keep_rfu_in_auth_req keep_rfus=%d", keep_rfu);
diff --git a/stack/btm/btm_ble_addr.cc b/stack/btm/btm_ble_addr.cc
index 38d4046..894c588 100644
--- a/stack/btm/btm_ble_addr.cc
+++ b/stack/btm/btm_ble_addr.cc
@@ -38,15 +38,15 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*******************************************************************************
-**
-** Function btm_gen_resolve_paddr_cmpl
-**
-** Description This is callback functioin when resolvable private address
-** generation is complete.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_gen_resolve_paddr_cmpl
+ *
+ * Description This is callback functioin when resolvable private address
+ * generation is complete.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
{
tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
@@ -79,15 +79,15 @@
}
}
/*******************************************************************************
-**
-** Function btm_gen_resolve_paddr_low
-**
-** Description This function is called when random address has generate the
-** random number base for low 3 byte bd address.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_gen_resolve_paddr_low
+ *
+ * Description This function is called when random address has generate the
+ * random number base for low 3 byte bd address.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_gen_resolve_paddr_low(tBTM_RAND_ENC *p)
{
tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
@@ -115,14 +115,14 @@
}
}
/*******************************************************************************
-**
-** Function btm_gen_resolvable_private_addr
-**
-** Description This function generate a resolvable private address.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_gen_resolvable_private_addr
+ *
+ * Description This function generate a resolvable private address.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_gen_resolvable_private_addr(void *p_cmd_cplt_cback)
{
BTM_TRACE_EVENT ("%s", __func__);
@@ -130,15 +130,15 @@
btsnd_hcic_ble_rand(p_cmd_cplt_cback);
}
/*******************************************************************************
-**
-** Function btm_gen_non_resolve_paddr_cmpl
-**
-** Description This is the callback function when non-resolvable private
-** function is generated and write to controller.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_gen_non_resolve_paddr_cmpl
+ *
+ * Description This is the callback function when non-resolvable private
+ * function is generated and write to controller.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_gen_non_resolve_paddr_cmpl(tBTM_RAND_ENC *p)
{
tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
@@ -170,15 +170,15 @@
}
}
/*******************************************************************************
-**
-** Function btm_gen_non_resolvable_private_addr
-**
-** Description This function generate a non-resolvable private address.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_gen_non_resolvable_private_addr
+ *
+ * Description This function generate a non-resolvable private address.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_gen_non_resolvable_private_addr (tBTM_BLE_ADDR_CBACK *p_cback, void *p)
{
tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
@@ -194,18 +194,18 @@
}
/*******************************************************************************
-** Utility functions for Random address resolving
-*******************************************************************************/
+ * Utility functions for Random address resolving
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function btm_ble_proc_resolve_x
-**
-** Description This function compares the X with random address 3 MSO bytes
-** to find a match.
-**
-** Returns true on match, false otherwise
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_proc_resolve_x
+ *
+ * Description This function compares the X with random address 3 MSO bytes
+ * to find a match.
+ *
+ * Returns true on match, false otherwise
+ *
+ ******************************************************************************/
static bool btm_ble_proc_resolve_x(tSMP_ENC *p)
{
tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
@@ -229,15 +229,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_init_pseudo_addr
-**
-** Description This function is used to initialize pseudo address.
-** If pseudo address is not available, use dummy address
-**
-** Returns true is updated; false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_init_pseudo_addr
+ *
+ * Description This function is used to initialize pseudo address.
+ * If pseudo address is not available, use dummy address
+ *
+ * Returns true is updated; false otherwise.
+ *
+ ******************************************************************************/
bool btm_ble_init_pseudo_addr (tBTM_SEC_DEV_REC *p_dev_rec, BD_ADDR new_pseudo_addr)
{
BD_ADDR dummy_bda = {0};
@@ -252,14 +252,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_addr_resolvable
-**
-** Description This function checks if a RPA is resolvable by the device key.
-**
-** Returns true is resolvable; false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_addr_resolvable
+ *
+ * Description This function checks if a RPA is resolvable by the device key.
+ *
+ * Returns true is resolvable; false otherwise.
+ *
+ ******************************************************************************/
bool btm_ble_addr_resolvable (BD_ADDR rpa, tBTM_SEC_DEV_REC *p_dev_rec)
{
bool rt = false;
@@ -296,16 +296,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_match_random_bda
-**
-** 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.
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_match_random_bda
+ *
+ * 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.
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
static bool btm_ble_match_random_bda(void *data, void *context)
{
/* use the 3 MSB of bd address as prand */
@@ -336,15 +336,15 @@
}
/*******************************************************************************
-**
-** 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
-** address is matched to.
-**
-*******************************************************************************/
+ *
+ * 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
+ * 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;
@@ -372,15 +372,15 @@
}
/*******************************************************************************
-** address mapping between pseudo address and real connection address
-*******************************************************************************/
+ * address mapping between pseudo address and real connection address
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function btm_find_dev_by_identity_addr
-**
-** Description find the security record whose LE static address is matching
-**
-*******************************************************************************/
+ *
+ * Function btm_find_dev_by_identity_addr
+ *
+ * Description find the security record whose LE static address is matching
+ *
+ ******************************************************************************/
tBTM_SEC_DEV_REC* btm_find_dev_by_identity_addr(BD_ADDR bd_addr, uint8_t addr_type)
{
#if (BLE_PRIVACY_SPT == TRUE)
@@ -404,13 +404,13 @@
}
/*******************************************************************************
-**
-** Function btm_identity_addr_to_random_pseudo
-**
-** Description This function map a static BD address to a pseudo random address
-** in security database.
-**
-*******************************************************************************/
+ *
+ * Function btm_identity_addr_to_random_pseudo
+ *
+ * Description This function map a static BD address to a pseudo random address
+ * in security database.
+ *
+ ******************************************************************************/
bool btm_identity_addr_to_random_pseudo(BD_ADDR bd_addr, uint8_t *p_addr_type, bool refresh)
{
#if (BLE_PRIVACY_SPT == TRUE)
@@ -436,13 +436,13 @@
}
/*******************************************************************************
-**
-** Function btm_random_pseudo_to_identity_addr
-**
-** Description This function map a random pseudo address to a public address
-** random_pseudo is input and output parameter
-**
-*******************************************************************************/
+ *
+ * Function btm_random_pseudo_to_identity_addr
+ *
+ * Description This function map a random pseudo address to a public address
+ * random_pseudo is input and output parameter
+ *
+ ******************************************************************************/
bool btm_random_pseudo_to_identity_addr(BD_ADDR random_pseudo, uint8_t *p_static_addr_type)
{
#if (BLE_PRIVACY_SPT == TRUE)
@@ -464,13 +464,13 @@
}
/*******************************************************************************
-**
-** Function btm_ble_refresh_peer_resolvable_private_addr
-**
-** Description This function refresh the currently used resolvable remote private address into security
-** database and set active connection address.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_refresh_peer_resolvable_private_addr
+ *
+ * Description This function refresh the currently used resolvable remote private address into security
+ * database and set active connection address.
+ *
+ ******************************************************************************/
void btm_ble_refresh_peer_resolvable_private_addr(BD_ADDR pseudo_bda, BD_ADDR rpa,
uint8_t rra_type)
{
@@ -539,13 +539,13 @@
}
/*******************************************************************************
-**
-** Function btm_ble_refresh_local_resolvable_private_addr
-**
-** Description This function refresh the currently used resolvable private address for the
-** active link to the remote device
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_refresh_local_resolvable_private_addr
+ *
+ * Description This function refresh the currently used resolvable private address for the
+ * active link to the remote device
+ *
+ ******************************************************************************/
void btm_ble_refresh_local_resolvable_private_addr(BD_ADDR pseudo_addr,
BD_ADDR local_rpa)
{
diff --git a/stack/btm/btm_ble_adv_filter.cc b/stack/btm/btm_ble_adv_filter.cc
index e637c35..8da4e71 100644
--- a/stack/btm/btm_ble_adv_filter.cc
+++ b/stack/btm/btm_ble_adv_filter.cc
@@ -70,16 +70,16 @@
#define BTM_BLE_ADV_FILT_SUBCODE_MASK 0x0F
/*******************************************************************************
-**
-** Function btm_ble_obtain_vsc_details
-**
-** Description This function obtains the VSC details
-**
-** Parameters
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_obtain_vsc_details
+ *
+ * Description This function obtains the VSC details
+ *
+ * Parameters
+ *
+ * Returns status
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_obtain_vsc_details()
{
tBTM_STATUS st = BTM_SUCCESS;
@@ -98,15 +98,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_advfilt_enq_op_q
-**
-** Description enqueue an adv filter operation in q to check command complete
-** status
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_advfilt_enq_op_q
+ *
+ * Description enqueue an adv filter operation in q to check command complete
+ * status
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_advfilt_enq_op_q(uint8_t action, uint8_t ocf, tBTM_BLE_FILT_CB_EVT cb_evt,
tBTM_BLE_REF_VALUE ref, tBTM_BLE_PF_CFG_CBACK *p_cmpl_cback,
tBTM_BLE_PF_PARAM_CBACK *p_filt_param_cback)
@@ -125,15 +125,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_advfilt_deq_op_q
-**
-** Description dequeue an adv filter operation from q when command complete
-** is received
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_advfilt_deq_op_q
+ *
+ * Description dequeue an adv filter operation from q when command complete
+ * is received
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_advfilt_deq_op_q(uint8_t *p_action,uint8_t *p_ocf, tBTM_BLE_FILT_CB_EVT *p_cb_evt,
tBTM_BLE_REF_VALUE *p_ref, tBTM_BLE_PF_CFG_CBACK ** p_cmpl_cback,
tBTM_BLE_PF_PARAM_CBACK **p_filt_param_cback)
@@ -154,14 +154,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_condtype_to_ocf
-**
-** Description Convert cond_type to OCF
-**
-** Returns Returns ocf value
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_condtype_to_ocf
+ *
+ * Description Convert cond_type to OCF
+ *
+ * Returns Returns ocf value
+ *
+ ******************************************************************************/
uint8_t btm_ble_condtype_to_ocf(uint8_t cond_type)
{
uint8_t ocf = 0;
@@ -197,14 +197,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_ocf_to_condtype
-**
-** Description Convert OCF to cond type
-**
-** Returns Returns condtype value
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_ocf_to_condtype
+ *
+ * Description Convert OCF to cond type
+ *
+ * Returns Returns condtype value
+ *
+ ******************************************************************************/
uint8_t btm_ble_ocf_to_condtype(uint8_t ocf)
{
uint8_t cond_type = 0;
@@ -243,14 +243,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_scan_pf_cmpl_cback
-**
-** Description the BTM BLE customer feature VSC complete callback for ADV PF filtering
-**
-** Returns pointer to the counter if found; NULL otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_scan_pf_cmpl_cback
+ *
+ * Description the BTM BLE customer feature VSC complete callback for ADV PF filtering
+ *
+ * Returns pointer to the counter if found; NULL otherwise.
+ *
+ ******************************************************************************/
void btm_ble_scan_pf_cmpl_cback(tBTM_VSC_CMPL *p_params)
{
uint8_t status = 0;
@@ -356,14 +356,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_find_addr_filter_counter
-**
-** Description find the per bd address ADV payload filter counter by BD_ADDR.
-**
-** Returns pointer to the counter if found; NULL otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_find_addr_filter_counter
+ *
+ * Description find the per bd address ADV payload filter counter by BD_ADDR.
+ *
+ * Returns pointer to the counter if found; NULL otherwise.
+ *
+ ******************************************************************************/
tBTM_BLE_PF_COUNT* btm_ble_find_addr_filter_counter(tBLE_BD_ADDR *p_le_bda)
{
uint8_t i;
@@ -384,14 +384,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_alloc_addr_filter_counter
-**
-** Description allocate the per device adv payload filter counter.
-**
-** Returns pointer to the counter if allocation succeed; NULL otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_alloc_addr_filter_counter
+ *
+ * Description allocate the per device adv payload filter counter.
+ *
+ * Returns pointer to the counter if allocation succeed; NULL otherwise.
+ *
+ ******************************************************************************/
tBTM_BLE_PF_COUNT * btm_ble_alloc_addr_filter_counter(BD_ADDR bd_addr)
{
uint8_t i;
@@ -409,14 +409,14 @@
return NULL;
}
/*******************************************************************************
-**
-** Function btm_ble_dealloc_addr_filter_counter
-**
-** Description de-allocate the per device adv payload filter counter.
-**
-** Returns true if deallocation succeed; false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_dealloc_addr_filter_counter
+ *
+ * Description de-allocate the per device adv payload filter counter.
+ *
+ * Returns true if deallocation succeed; false otherwise.
+ *
+ ******************************************************************************/
bool btm_ble_dealloc_addr_filter_counter(tBLE_BD_ADDR *p_bd_addr, uint8_t filter_type)
{
uint8_t i;
@@ -442,16 +442,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_pf_local_name
-**
-** Description this function update(add,delete or clear) the adv lcoal name filtering condition.
-**
-**
-** Returns BTM_SUCCESS if sucessful,
-** BTM_ILLEGAL_VALUE if paramter is not valid.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_pf_local_name
+ *
+ * Description this function update(add,delete or clear) the adv lcoal name filtering condition.
+ *
+ *
+ * Returns BTM_SUCCESS if sucessful,
+ * BTM_ILLEGAL_VALUE if paramter is not valid.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_update_pf_local_name(tBTM_BLE_SCAN_COND_OP action,
tBTM_BLE_PF_FILT_INDEX filt_index,
tBTM_BLE_PF_COND_PARAM *p_cond)
@@ -491,16 +491,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_srvc_data_change
-**
-** Description this function update(add/remove) service data change filter.
-**
-**
-** Returns BTM_SUCCESS if sucessful,
-** BTM_ILLEGAL_VALUE if paramter is not valid.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_srvc_data_change
+ *
+ * Description this function update(add/remove) service data change filter.
+ *
+ *
+ * Returns BTM_SUCCESS if sucessful,
+ * BTM_ILLEGAL_VALUE if paramter is not valid.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_update_srvc_data_change(tBTM_BLE_SCAN_COND_OP action,
tBTM_BLE_PF_FILT_INDEX filt_index,
tBTM_BLE_PF_COND_PARAM *p_cond)
@@ -517,17 +517,17 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_pf_manu_data
-**
-** Description this function update(add,delete or clear) the adv manufacturer
-** data filtering condition.
-**
-**
-** Returns BTM_SUCCESS if sucessful,
-** BTM_ILLEGAL_VALUE if paramter is not valid.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_pf_manu_data
+ *
+ * Description this function update(add,delete or clear) the adv manufacturer
+ * data filtering condition.
+ *
+ *
+ * Returns BTM_SUCCESS if sucessful,
+ * BTM_ILLEGAL_VALUE if paramter is not valid.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_update_pf_manu_data(tBTM_BLE_SCAN_COND_OP action,
tBTM_BLE_PF_FILT_INDEX filt_index,
tBTM_BLE_PF_COND_PARAM *p_data,
@@ -632,15 +632,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_cs_update_pf_counter
-**
-** Description this function is to update the adv data payload filter counter
-**
-** Returns current number of the counter; BTM_BLE_INVALID_COUNTER if
-** counter update failed.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_cs_update_pf_counter
+ *
+ * Description this function is to update the adv data payload filter counter
+ *
+ * Returns current number of the counter; BTM_BLE_INVALID_COUNTER if
+ * counter update failed.
+ *
+ ******************************************************************************/
uint8_t btm_ble_cs_update_pf_counter(tBTM_BLE_SCAN_COND_OP action,
uint8_t cond_type, tBLE_BD_ADDR *p_bd_addr,
uint8_t num_available)
@@ -700,16 +700,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_addr_filter
-**
-** Description this function update(add,delete or clear) the address filter of adv.
-**
-**
-** Returns BTM_CMD_STARTED if sucessful,
-** BTM_ILLEGAL_VALUE if paramter is not valid.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_addr_filter
+ *
+ * Description this function update(add,delete or clear) the address filter of adv.
+ *
+ *
+ * Returns BTM_CMD_STARTED if sucessful,
+ * BTM_ILLEGAL_VALUE if paramter is not valid.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_update_addr_filter(tBTM_BLE_SCAN_COND_OP action,
tBTM_BLE_PF_FILT_INDEX filt_index,
tBTM_BLE_PF_COND_PARAM *p_cond)
@@ -745,16 +745,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_uuid_filter
-**
-** Description this function update(add,delete or clear) service UUID filter.
-**
-**
-** Returns BTM_CMD_STARTED if sucessful,
-** BTM_ILLEGAL_VALUE if paramter is not valid.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_uuid_filter
+ *
+ * Description this function update(add,delete or clear) service UUID filter.
+ *
+ *
+ * Returns BTM_CMD_STARTED if sucessful,
+ * BTM_ILLEGAL_VALUE if paramter is not valid.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_update_uuid_filter(tBTM_BLE_SCAN_COND_OP action,
tBTM_BLE_PF_FILT_INDEX filt_index,
tBTM_BLE_PF_COND_TYPE filter_type,
@@ -884,16 +884,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_clear_scan_pf_filter
-**
-** Description clear all adv payload filter by de-select all the adv pf feature bits
-**
-**
-** Returns BTM_CMD_STARTED if sucessful,
-** BTM_ILLEGAL_VALUE if paramter is not valid.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_clear_scan_pf_filter
+ *
+ * Description clear all adv payload filter by de-select all the adv pf feature bits
+ *
+ *
+ * Returns BTM_CMD_STARTED if sucessful,
+ * BTM_ILLEGAL_VALUE if paramter is not valid.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_clear_scan_pf_filter(tBTM_BLE_SCAN_COND_OP action,
tBTM_BLE_PF_FILT_INDEX filt_index,
tBTM_BLE_PF_COND_PARAM *p_cond,
@@ -988,22 +988,22 @@
}
/*******************************************************************************
-**
-** Function BTM_BleAdvFilterParamSetup
-**
-** Description This function is called to setup the adv data payload filter
-** condition.
-**
-** Parameters action - Type of action to be performed
-** filt_index - Filter index
-** p_filt_params - Filter parameters
-** p_target - Target device
-** p_cmpl_back - Callback pointer
-** ref_value - reference value
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleAdvFilterParamSetup
+ *
+ * Description This function is called to setup the adv data payload filter
+ * condition.
+ *
+ * Parameters action - Type of action to be performed
+ * filt_index - Filter index
+ * p_filt_params - Filter parameters
+ * p_target - Target device
+ * p_cmpl_back - Callback pointer
+ * ref_value - reference value
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleAdvFilterParamSetup(int action, tBTM_BLE_PF_FILT_INDEX filt_index,
tBTM_BLE_PF_FILT_PARAMS *p_filt_params,
tBLE_BD_ADDR *p_target, tBTM_BLE_PF_PARAM_CBACK *p_cmpl_cback,
@@ -1114,18 +1114,18 @@
}
/*******************************************************************************
-**
-** Function BTM_BleEnableDisableFilterFeature
-**
-** Description This function is called to enable / disable the APCF feature
-**
-** Parameters enable the generic scan condition.
-** enable: enable or disable the filter condition
-** p_stat_cback - Status callback pointer
-** ref_value - Ref value
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleEnableDisableFilterFeature
+ *
+ * Description This function is called to enable / disable the APCF feature
+ *
+ * Parameters enable the generic scan condition.
+ * enable: enable or disable the filter condition
+ * p_stat_cback - Status callback pointer
+ * ref_value - Ref value
+ * Returns void
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleEnableDisableFilterFeature(uint8_t enable,
tBTM_BLE_PF_STATUS_CBACK *p_stat_cback,
tBTM_BLE_REF_VALUE ref_value)
@@ -1155,22 +1155,22 @@
}
/*******************************************************************************
-**
-** Function BTM_BleCfgFilterCondition
-**
-** Description This function is called to configure the adv data payload filter
-** condition.
-**
-** Parameters action: to read/write/clear
-** cond_type: filter condition type.
-** filt_index - Filter index
-** p_cond: filter condition parameter
-** p_cmpl_cback - Config callback pointer
-** ref_value - Reference value
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleCfgFilterCondition
+ *
+ * Description This function is called to configure the adv data payload filter
+ * condition.
+ *
+ * Parameters action: to read/write/clear
+ * cond_type: filter condition type.
+ * filt_index - Filter index
+ * p_cond: filter condition parameter
+ * p_cmpl_cback - Config callback pointer
+ * ref_value - Reference value
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleCfgFilterCondition(tBTM_BLE_SCAN_COND_OP action,
tBTM_BLE_PF_COND_TYPE cond_type,
tBTM_BLE_PF_FILT_INDEX filt_index,
@@ -1240,16 +1240,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_adv_filter_init
-**
-** Description This function initializes the adv filter control block
-**
-** Parameters
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_adv_filter_init
+ *
+ * Description This function initializes the adv filter control block
+ *
+ * Parameters
+ *
+ * Returns status
+ *
+ ******************************************************************************/
void btm_ble_adv_filter_init(void)
{
memset(&btm_ble_adv_filt_cb, 0, sizeof(tBTM_BLE_ADV_FILTER_CB));
@@ -1264,16 +1264,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_adv_filter_cleanup
-**
-** Description This function de-initializes the adv filter control block
-**
-** Parameters
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_adv_filter_cleanup
+ *
+ * Description This function de-initializes the adv filter control block
+ *
+ * Parameters
+ *
+ * Returns status
+ *
+ ******************************************************************************/
void btm_ble_adv_filter_cleanup(void)
{
osi_free_and_reset((void **)&btm_ble_adv_filt_cb.p_addr_filter_count);
diff --git a/stack/btm/btm_ble_batchscan.cc b/stack/btm/btm_ble_batchscan.cc
index ce3b632..327aa79 100644
--- a/stack/btm/btm_ble_batchscan.cc
+++ b/stack/btm/btm_ble_batchscan.cc
@@ -42,20 +42,20 @@
#define BTM_BLE_BATCH_SCAN_SUBCODE_MASK 0x0F
/*******************************************************************************
-** Local functions
-*******************************************************************************/
+ * Local functions
+ ******************************************************************************/
void btm_ble_batchscan_vsc_cmpl_cback (tBTM_VSC_CMPL *p_params);
void btm_ble_batchscan_cleanup(void);
/*******************************************************************************
-**
-** Function btm_ble_batchscan_filter_track_adv_vse_cback
-**
-** Description VSE callback for batch scan, filter, and tracking events.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_batchscan_filter_track_adv_vse_cback
+ *
+ * Description VSE callback for batch scan, filter, and tracking events.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void btm_ble_batchscan_filter_track_adv_vse_cback(uint8_t len, uint8_t *p)
{
tBTM_BLE_TRACK_ADV_DATA adv_data;
@@ -133,15 +133,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_batchscan_enq_op_q
-**
-** Description enqueue a batchscan operation in q to check command complete
-** status
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_batchscan_enq_op_q
+ *
+ * Description enqueue a batchscan operation in q to check command complete
+ * status
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_batchscan_enq_op_q(uint8_t opcode, tBTM_BLE_BATCH_SCAN_STATE cur_state,
uint8_t cb_evt, tBTM_BLE_REF_VALUE ref_value)
{
@@ -157,15 +157,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_batchscan_enq_rep_q
-**
-** Description enqueue a batchscan report operation in q to check command complete
-** status
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_batchscan_enq_rep_q
+ *
+ * Description enqueue a batchscan report operation in q to check command complete
+ * status
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_batchscan_enq_rep_q(uint8_t report_format, tBTM_BLE_REF_VALUE ref_value)
{
int i = 0;
@@ -189,14 +189,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_batchscan_enq_rep_data
-**
-** Description setup the data in the main report queue
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_batchscan_enq_rep_data
+ *
+ * Description setup the data in the main report queue
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_batchscan_enq_rep_data(uint8_t report_format, uint8_t num_records, uint8_t *p_data,
uint8_t data_len)
{
@@ -239,15 +239,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_batchscan_deq_rep_q
-**
-** Description dequeue a batchscan report in q when command complete
-** is received
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_batchscan_deq_rep_q
+ *
+ * Description dequeue a batchscan report in q when command complete
+ * is received
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_batchscan_deq_rep_data(uint8_t report_format, tBTM_BLE_REF_VALUE *p_ref_value,
uint8_t *p_num_records, uint8_t **p_data, uint16_t *p_data_len)
{
@@ -284,15 +284,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_batchscan_deq_op_q
-**
-** Description dequeue a batch scan operation from q when command complete
-** is received
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_batchscan_deq_op_q
+ *
+ * Description dequeue a batch scan operation from q when command complete
+ * is received
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_batchscan_deq_op_q(uint8_t *p_opcode,tBTM_BLE_BATCH_SCAN_STATE *cur_state,
uint8_t *p_cb_evt, tBTM_BLE_REF_VALUE *p_ref)
{
@@ -306,15 +306,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_read_batchscan_reports
-**
-** Description This function reads the reports from controller
-**
-** Parameters scan_mode - The mode for which the reports are to be read out from the controller
-** ref_value - Reference value
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_read_batchscan_reports
+ *
+ * Description This function reads the reports from controller
+ *
+ * Parameters scan_mode - The mode for which the reports are to be read out from the controller
+ * ref_value - Reference value
+ *
+ ******************************************************************************/
void btm_ble_read_batchscan_reports(tBTM_BLE_BATCH_SCAN_MODE scan_mode,
tBTM_BLE_REF_VALUE ref_value)
{
@@ -335,16 +335,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_batchscan_vsc_cmpl_cback
-**
-** Description Batch scan VSC complete callback
-**
-** Parameters p_params - VSC completed callback parameters
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_batchscan_vsc_cmpl_cback
+ *
+ * Description Batch scan VSC complete callback
+ *
+ * Parameters p_params - VSC completed callback parameters
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_batchscan_vsc_cmpl_cback (tBTM_VSC_CMPL *p_params)
{
uint8_t *p = p_params->p_param_buf;
@@ -469,16 +469,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_set_storage_config
-**
-** Description This function writes the storage configuration in controller
-**
-** Parameters batch_scan_full_max -Max storage space (in %) allocated to full scanning
-** batch_scan_trunc_max -Max storage space (in %) allocated to truncated scanning
-** batch_scan_notify_threshold - Setup notification level based on total space
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_storage_config
+ *
+ * Description This function writes the storage configuration in controller
+ *
+ * Parameters batch_scan_full_max -Max storage space (in %) allocated to full scanning
+ * batch_scan_trunc_max -Max storage space (in %) allocated to truncated scanning
+ * batch_scan_notify_threshold - Setup notification level based on total space
+ *
+ ******************************************************************************/
void btm_ble_set_storage_config(uint8_t batch_scan_full_max, uint8_t batch_scan_trunc_max,
uint8_t batch_scan_notify_threshold)
{
@@ -498,18 +498,18 @@
}
/*******************************************************************************
-**
-** Function btm_ble_set_batchscan_param
-**
-** Description This function writes the batch scan params in controller
-**
-** Parameters scan_mode -Batch scan mode
-** scan_interval - Scan interval
-** scan_window - Scan window
-** discard_rule -Discard rules
-** addr_type - Address type
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_batchscan_param
+ *
+ * Description This function writes the batch scan params in controller
+ *
+ * Parameters scan_mode -Batch scan mode
+ * scan_interval - Scan interval
+ * scan_window - Scan window
+ * discard_rule -Discard rules
+ * addr_type - Address type
+ *
+ ******************************************************************************/
void btm_ble_set_batchscan_param(tBTM_BLE_BATCH_SCAN_MODE scan_mode,
uint32_t scan_interval, uint32_t scan_window, tBLE_ADDR_TYPE addr_type,
tBTM_BLE_DISCARD_RULE discard_rule)
@@ -536,14 +536,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_enable_disable_batchscan
-**
-** Description This function enables the customer specific feature in controller
-**
-** Parameters enable_disable: true - enable, false - disable
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_enable_disable_batchscan
+ *
+ * Description This function enables the customer specific feature in controller
+ *
+ * Parameters enable_disable: true - enable, false - disable
+ *
+ ******************************************************************************/
void btm_ble_enable_disable_batchscan(bool should_enable)
{
uint8_t shld_enable = 0x01;
@@ -576,22 +576,22 @@
}
/*******************************************************************************
-**
-** Function BTM_BleSetStorageConfig
-**
-** Description This function is called to write storage config params.
-**
-** Parameters: batch_scan_full_max - Max storage space (in %) allocated to full style
-** batch_scan_trunc_max - Max storage space (in %) allocated to trunc style
-** batch_scan_notify_threshold - Setup notification level based on total space
-** p_setup_cback - Setup callback pointer
-** p_thres_cback - Threshold callback pointer
-** p_rep_cback - Reports callback pointer
-** ref_value - Reference value
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetStorageConfig
+ *
+ * Description This function is called to write storage config params.
+ *
+ * Parameters: batch_scan_full_max - Max storage space (in %) allocated to full style
+ * batch_scan_trunc_max - Max storage space (in %) allocated to trunc style
+ * batch_scan_notify_threshold - Setup notification level based on total space
+ * p_setup_cback - Setup callback pointer
+ * p_thres_cback - Threshold callback pointer
+ * p_rep_cback - Reports callback pointer
+ * ref_value - Reference value
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleSetStorageConfig(uint8_t batch_scan_full_max, uint8_t batch_scan_trunc_max,
uint8_t batch_scan_notify_threshold,
tBTM_BLE_SCAN_SETUP_CBACK *p_setup_cback,
@@ -650,20 +650,20 @@
/*******************************************************************************
-**
-** Function BTM_BleEnableBatchScan
-**
-** Description This function is called to configure and enable batch scanning
-**
-** Parameters: scan_mode -Batch scan mode
-** scan_interval - Scan interval value
-** scan_window - Scan window value
-** discard_rule - Data discard rule
-** ref_value - Reference value
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleEnableBatchScan
+ *
+ * Description This function is called to configure and enable batch scanning
+ *
+ * Parameters: scan_mode -Batch scan mode
+ * scan_interval - Scan interval value
+ * scan_window - Scan window value
+ * discard_rule - Data discard rule
+ * ref_value - Reference value
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleEnableBatchScan(tBTM_BLE_BATCH_SCAN_MODE scan_mode,
uint32_t scan_interval, uint32_t scan_window, tBLE_ADDR_TYPE addr_type,
tBTM_BLE_DISCARD_RULE discard_rule, tBTM_BLE_REF_VALUE ref_value)
@@ -726,14 +726,14 @@
}
/*******************************************************************************
-**
-** Function BTM_BleDisableBatchScan
-**
-** Description This function is called to disable batch scanning
-**
-** Parameters: ref_value - Reference value
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleDisableBatchScan
+ *
+ * Description This function is called to disable batch scanning
+ *
+ * Parameters: ref_value - Reference value
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleDisableBatchScan(tBTM_BLE_REF_VALUE ref_value)
{
tBTM_BLE_VSC_CB cmn_ble_vsc_cb;
@@ -759,17 +759,17 @@
}
/*******************************************************************************
-**
-** Function BTM_BleReadScanReports
-**
-** Description This function is called to start reading batch scan reports
-**
-** Parameters: scan_mode - Batch scan mode
-** ref_value - Reference value
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleReadScanReports
+ *
+ * Description This function is called to start reading batch scan reports
+ *
+ * Parameters: scan_mode - Batch scan mode
+ * ref_value - Reference value
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleReadScanReports(tBTM_BLE_BATCH_SCAN_MODE scan_mode,
tBTM_BLE_REF_VALUE ref_value)
{
@@ -817,17 +817,17 @@
/*******************************************************************************
-**
-** Function BTM_BleTrackAdvertiser
-**
-** Description This function is called to setup the callback for tracking advertisers
-**
-** Parameters: p_track_cback - Tracking callback pointer
-** ref_value - Reference value
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleTrackAdvertiser
+ *
+ * Description This function is called to setup the callback for tracking advertisers
+ *
+ * Parameters: p_track_cback - Tracking callback pointer
+ * ref_value - Reference value
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleTrackAdvertiser(tBTM_BLE_TRACK_ADV_CBACK *p_track_cback,
tBTM_BLE_REF_VALUE ref_value)
{
@@ -850,16 +850,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_batchscan_init
-**
-** Description This function initialize the batch scan control block.
-**
-** Parameters None
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_batchscan_init
+ *
+ * Description This function initialize the batch scan control block.
+ *
+ * Parameters None
+ *
+ * Returns status
+ *
+ ******************************************************************************/
void btm_ble_batchscan_init(void)
{
BTM_TRACE_EVENT (" btm_ble_batchscan_init");
@@ -869,16 +869,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_batchscan_cleanup
-**
-** Description This function cleans the batch scan control block.
-**
-** Parameters None
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_batchscan_cleanup
+ *
+ * Description This function cleans the batch scan control block.
+ *
+ * Parameters None
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_batchscan_cleanup(void)
{
int index = 0;
diff --git a/stack/btm/btm_ble_bgconn.cc b/stack/btm/btm_ble_bgconn.cc
index 3a4d24f..b8eb031 100644
--- a/stack/btm/btm_ble_bgconn.cc
+++ b/stack/btm/btm_ble_bgconn.cc
@@ -95,11 +95,11 @@
}
/*******************************************************************************
-**
-** Function btm_update_scanner_filter_policy
-**
-** Description This function updates the filter policy of scanner
-*******************************************************************************/
+ *
+ * Function btm_update_scanner_filter_policy
+ *
+ * Description This function updates the filter policy of scanner
+ ******************************************************************************/
void btm_update_scanner_filter_policy(tBTM_BLE_SFP scan_policy)
{
tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var;
@@ -127,11 +127,11 @@
}
}
/*******************************************************************************
-**
-** Function btm_add_dev_to_controller
-**
-** Description This function load the device into controller white list
-*******************************************************************************/
+ *
+ * Function btm_add_dev_to_controller
+ *
+ * Description This function load the device into controller white list
+ ******************************************************************************/
bool btm_add_dev_to_controller (bool to_add, BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -178,11 +178,11 @@
}
/*******************************************************************************
-**
-** Function btm_execute_wl_dev_operation
-**
-** Description execute the pending whitelist device operation(loading or removing)
-*******************************************************************************/
+ *
+ * Function btm_execute_wl_dev_operation
+ *
+ * Description execute the pending whitelist device operation(loading or removing)
+ ******************************************************************************/
bool btm_execute_wl_dev_operation(void)
{
tBTM_BLE_WL_OP *p_dev_op = btm_cb.ble_ctr_cb.wl_op_q;
@@ -202,11 +202,11 @@
return rt;
}
/*******************************************************************************
-**
-** Function btm_enq_wl_dev_operation
-**
-** Description enqueue the pending whitelist device operation(loading or removing).
-*******************************************************************************/
+ *
+ * Function btm_enq_wl_dev_operation
+ *
+ * Description enqueue the pending whitelist device operation(loading or removing).
+ ******************************************************************************/
void btm_enq_wl_dev_operation(bool to_add, BD_ADDR bd_addr)
{
tBTM_BLE_WL_OP *p_dev_op = btm_cb.ble_ctr_cb.wl_op_q;
@@ -236,13 +236,13 @@
}
/*******************************************************************************
-**
-** Function btm_update_dev_to_white_list
-**
-** Description This function adds or removes a device into/from
-** the white list.
-**
-*******************************************************************************/
+ *
+ * Function btm_update_dev_to_white_list
+ *
+ * Description This function adds or removes a device into/from
+ * the white list.
+ *
+ ******************************************************************************/
bool btm_update_dev_to_white_list(bool to_add, BD_ADDR bd_addr)
{
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
@@ -265,12 +265,12 @@
}
/*******************************************************************************
-**
-** Function btm_ble_clear_white_list
-**
-** Description This function clears the white list.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_clear_white_list
+ *
+ * Description This function clears the white list.
+ *
+ ******************************************************************************/
void btm_ble_clear_white_list (void)
{
BTM_TRACE_EVENT ("btm_ble_clear_white_list");
@@ -279,12 +279,12 @@
}
/*******************************************************************************
-**
-** Function btm_ble_clear_white_list_complete
-**
-** Description Indicates white list cleared.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_clear_white_list_complete
+ *
+ * Description Indicates white list cleared.
+ *
+ ******************************************************************************/
void btm_ble_clear_white_list_complete(uint8_t *p_data,
UNUSED_ATTR uint16_t evt_len)
{
@@ -299,12 +299,12 @@
}
/*******************************************************************************
-**
-** Function btm_ble_white_list_init
-**
-** Description Initialize white list size
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_white_list_init
+ *
+ * Description Initialize white list size
+ *
+ ******************************************************************************/
void btm_ble_white_list_init(uint8_t white_list_size)
{
BTM_TRACE_DEBUG("%s white_list_size = %d", __func__, white_list_size);
@@ -312,12 +312,12 @@
}
/*******************************************************************************
-**
-** Function btm_ble_add_2_white_list_complete
-**
-** Description White list element added
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_add_2_white_list_complete
+ *
+ * Description White list element added
+ *
+ ******************************************************************************/
void btm_ble_add_2_white_list_complete(uint8_t status)
{
BTM_TRACE_EVENT("%s status=%d", __func__, status);
@@ -326,12 +326,12 @@
}
/*******************************************************************************
-**
-** Function btm_ble_remove_from_white_list_complete
-**
-** Description White list element removal complete
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_remove_from_white_list_complete
+ *
+ * Description White list element removal complete
+ *
+ ******************************************************************************/
void btm_ble_remove_from_white_list_complete(uint8_t *p,
UNUSED_ATTR uint16_t evt_len)
{
@@ -341,16 +341,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_start_auto_conn
-**
-** Description This function is to start/stop auto connection procedure.
-**
-** Parameters start: true to start; false to stop.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_start_auto_conn
+ *
+ * Description This function is to start/stop auto connection procedure.
+ *
+ * Parameters start: true to start; false to stop.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool btm_ble_start_auto_conn(bool start)
{
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
@@ -424,18 +424,18 @@
}
/*******************************************************************************
-**
-** Function btm_ble_start_select_conn
-**
-** 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
-** selection.
-**
-** Returns bool : selective connectino procedure is started.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_start_select_conn
+ *
+ * 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
+ * selection.
+ *
+ * Returns bool : selective connectino procedure is started.
+ *
+ ******************************************************************************/
bool btm_ble_start_select_conn(bool start, tBTM_BLE_SEL_CBACK *p_select_cback)
{
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
@@ -511,18 +511,18 @@
return true;
}
/*******************************************************************************
-**
-** Function btm_ble_initiate_select_conn
-**
-** 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
-** selection.
-**
-** Returns bool : selective connectino procedure is started.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_initiate_select_conn
+ *
+ * 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
+ * selection.
+ *
+ * Returns bool : selective connectino procedure is started.
+ *
+ ******************************************************************************/
void btm_ble_initiate_select_conn(BD_ADDR bda)
{
BTM_TRACE_EVENT ("btm_ble_initiate_select_conn");
@@ -534,17 +534,17 @@
}
}
/*******************************************************************************
-**
-** Function btm_ble_suspend_bg_conn
-**
-** Description This function is to suspend an active background connection
-** procedure.
-**
-** Parameters none.
-**
-** Returns none.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_suspend_bg_conn
+ *
+ * Description This function is to suspend an active background connection
+ * procedure.
+ *
+ * Parameters none.
+ *
+ * Returns none.
+ *
+ ******************************************************************************/
bool btm_ble_suspend_bg_conn(void)
{
BTM_TRACE_EVENT ("%s", __func__);
@@ -557,14 +557,14 @@
return false;
}
/*******************************************************************************
-**
-** Function btm_suspend_wl_activity
-**
-** Description This function is to suspend white list related activity
-**
-** Returns none.
-**
-*******************************************************************************/
+ *
+ * Function btm_suspend_wl_activity
+ *
+ * Description This function is to suspend white list related activity
+ *
+ * Returns none.
+ *
+ ******************************************************************************/
static void btm_suspend_wl_activity(tBTM_BLE_WL_STATE wl_state)
{
if (wl_state & BTM_BLE_WL_INIT)
@@ -582,14 +582,14 @@
}
/*******************************************************************************
-**
-** Function btm_resume_wl_activity
-**
-** Description This function is to resume white list related activity
-**
-** Returns none.
-**
-*******************************************************************************/
+ *
+ * Function btm_resume_wl_activity
+ *
+ * Description This function is to resume white list related activity
+ *
+ * Returns none.
+ *
+ ******************************************************************************/
static void btm_resume_wl_activity(tBTM_BLE_WL_STATE wl_state)
{
btm_ble_resume_bg_conn();
@@ -601,17 +601,17 @@
}
/*******************************************************************************
-**
-** Function btm_ble_resume_bg_conn
-**
-** Description This function is to resume a background auto connection
-** procedure.
-**
-** Parameters none.
-**
-** Returns none.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resume_bg_conn
+ *
+ * Description This function is to resume a background auto connection
+ * procedure.
+ *
+ * Parameters none.
+ *
+ * Returns none.
+ *
+ ******************************************************************************/
bool btm_ble_resume_bg_conn(void)
{
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
@@ -629,27 +629,27 @@
return ret;
}
/*******************************************************************************
-**
-** Function btm_ble_get_conn_st
-**
-** Description This function get BLE connection state
-**
-** Returns connection state
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_get_conn_st
+ *
+ * Description This function get BLE connection state
+ *
+ * Returns connection state
+ *
+ ******************************************************************************/
tBTM_BLE_CONN_ST btm_ble_get_conn_st(void)
{
return btm_cb.ble_ctr_cb.conn_state;
}
/*******************************************************************************
-**
-** Function btm_ble_set_conn_st
-**
-** Description This function set BLE connection state
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_conn_st
+ *
+ * Description This function set BLE connection state
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
void btm_ble_set_conn_st(tBTM_BLE_CONN_ST new_st)
{
btm_cb.ble_ctr_cb.conn_state = new_st;
@@ -661,14 +661,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_enqueue_direct_conn_req
-**
-** Description This function enqueue the direct connection request
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_enqueue_direct_conn_req
+ *
+ * Description This function enqueue the direct connection request
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
void btm_ble_enqueue_direct_conn_req(void *p_param)
{
tBTM_BLE_CONN_REQ *p = (tBTM_BLE_CONN_REQ *)osi_malloc(sizeof(tBTM_BLE_CONN_REQ));
@@ -678,14 +678,14 @@
fixed_queue_enqueue(btm_cb.ble_ctr_cb.conn_pending_q, p);
}
/*******************************************************************************
-**
-** Function btm_ble_dequeue_direct_conn_req
-**
-** Description This function dequeues the direct connection request
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_dequeue_direct_conn_req
+ *
+ * Description This function dequeues the direct connection request
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
void btm_ble_dequeue_direct_conn_req(BD_ADDR rem_bda)
{
if (fixed_queue_is_empty(btm_cb.ble_ctr_cb.conn_pending_q))
@@ -709,14 +709,14 @@
}
}
/*******************************************************************************
-**
-** Function btm_send_pending_direct_conn
-**
-** Description This function send the pending direct connection request in queue
-**
-** Returns true if started, false otherwise
-**
-*******************************************************************************/
+ *
+ * Function btm_send_pending_direct_conn
+ *
+ * Description This function send the pending direct connection request in queue
+ *
+ * Returns true if started, false otherwise
+ *
+ ******************************************************************************/
bool btm_send_pending_direct_conn(void)
{
tBTM_BLE_CONN_REQ *p_req;
diff --git a/stack/btm/btm_ble_cont_energy.cc b/stack/btm/btm_ble_cont_energy.cc
index 77873b8..476fcbd 100644
--- a/stack/btm/btm_ble_cont_energy.cc
+++ b/stack/btm/btm_ble_cont_energy.cc
@@ -30,16 +30,16 @@
tBTM_BLE_ENERGY_INFO_CB ble_energy_info_cb;
/*******************************************************************************
-**
-** Function btm_ble_cont_energy_cmpl_cback
-**
-** Description Controller VSC complete callback
-**
-** Parameters
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_cont_energy_cmpl_cback
+ *
+ * Description Controller VSC complete callback
+ *
+ * Parameters
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_cont_energy_cmpl_cback (tBTM_VSC_CMPL *p_params)
{
uint8_t *p = p_params->p_param_buf;
@@ -70,16 +70,16 @@
}
/*******************************************************************************
-**
-** Function BTM_BleGetEnergyInfo
-**
-** Description This function obtains the energy info
-**
-** Parameters p_ener_cback - Callback pointer
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleGetEnergyInfo
+ *
+ * Description This function obtains the energy info
+ *
+ * Parameters p_ener_cback - Callback pointer
+ *
+ * Returns status
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleGetEnergyInfo(tBTM_BLE_ENERGY_INFO_CBACK *p_ener_cback)
{
tBTM_BLE_VSC_CB cmn_ble_vsc_cb;
diff --git a/stack/btm/btm_ble_gap.cc b/stack/btm/btm_ble_gap.cc
index 878063d..ecf3c6a 100644
--- a/stack/btm/btm_ble_gap.cc
+++ b/stack/btm/btm_ble_gap.cc
@@ -62,8 +62,8 @@
#endif
/*******************************************************************************
-** Local functions
-*******************************************************************************/
+ * Local functions
+ ******************************************************************************/
static void btm_ble_update_adv_flag(uint8_t flag);
static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, uint8_t addr_type, uint8_t evt_type, uint8_t *p);
static uint8_t btm_set_conn_mode_adv_init_addr(tBTM_BLE_INQ_CB *p_cb,
@@ -226,15 +226,15 @@
#define BTM_LE_STATES_SUPPORTED(x, y, z) ((x)[(z)] & (y))
/*******************************************************************************
-**
-** Function BTM_BleUpdateAdvFilterPolicy
-**
-** Description This function update the filter policy of advertiser.
-**
-** Parameter adv_policy: advertising filter policy
-**
-** Return void
-*******************************************************************************/
+ *
+ * Function BTM_BleUpdateAdvFilterPolicy
+ *
+ * Description This function update the filter policy of advertiser.
+ *
+ * Parameter adv_policy: advertising filter policy
+ *
+ * Return void
+ ******************************************************************************/
void BTM_BleUpdateAdvFilterPolicy(tBTM_BLE_AFP adv_policy)
{
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
@@ -276,18 +276,18 @@
}
/*******************************************************************************
-**
-** Function btm_ble_send_extended_scan_params
-**
-** Description This function sends out the extended scan parameters command to the controller
-**
-** Parameters scan_type - Scan type
-** scan_int - Scan interval
-** scan_win - Scan window
-** addr_type_own - Own address type
-** scan_filter_policy - Scan filter policy
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_send_extended_scan_params
+ *
+ * Description This function sends out the extended scan parameters command to the controller
+ *
+ * Parameters scan_type - Scan type
+ * scan_int - Scan interval
+ * scan_win - Scan window
+ * addr_type_own - Own address type
+ * scan_filter_policy - Scan filter policy
+ *
+ ******************************************************************************/
void btm_ble_send_extended_scan_params(uint8_t scan_type, uint32_t scan_int,
uint32_t scan_win, uint8_t addr_type_own,
uint8_t scan_filter_policy)
@@ -309,18 +309,18 @@
}
/*******************************************************************************
-**
-** Function BTM_BleObserve
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleObserve
+ *
+ * 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(bool start, uint8_t duration,
tBTM_INQ_RESULTS_CB *p_results_cb, tBTM_CMPL_CB *p_cmpl_cb)
{
@@ -407,14 +407,14 @@
#if (BLE_VND_INCLUDED == TRUE)
/*******************************************************************************
-**
-** Function btm_vsc_brcm_features_complete
-**
-** Description Command Complete callback for HCI_BLE_VENDOR_CAP_OCF
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_vsc_brcm_features_complete
+ *
+ * Description Command Complete callback for HCI_BLE_VENDOR_CAP_OCF
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_vendor_capability_vsc_cmpl_cback (tBTM_VSC_CMPL *p_vcs_cplt_params)
{
uint8_t status = 0xFF;
@@ -485,16 +485,16 @@
#endif /* (BLE_VND_INCLUDED == TRUE) */
/*******************************************************************************
-**
-** Function BTM_BleGetVendorCapabilities
-**
-** Description This function reads local LE features
-**
-** Parameters p_cmn_vsc_cb : Locala LE capability structure
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleGetVendorCapabilities
+ *
+ * Description This function reads local LE features
+ *
+ * Parameters p_cmn_vsc_cb : Locala LE capability structure
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB *p_cmn_vsc_cb)
{
BTM_TRACE_DEBUG("BTM_BleGetVendorCapabilities");
@@ -506,16 +506,16 @@
}
/******************************************************************************
-**
-** Function BTM_BleReadControllerFeatures
-**
-** Description Reads BLE specific controller features
-**
-** Parameters: tBTM_BLE_CTRL_FEATURES_CBACK : Callback to notify when features are read
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleReadControllerFeatures
+ *
+ * Description Reads BLE specific controller features
+ *
+ * Parameters: tBTM_BLE_CTRL_FEATURES_CBACK : Callback to notify when features are read
+ *
+ * Returns void
+ *
+ ******************************************************************************/
#if (BLE_VND_INCLUDED == TRUE)
extern void BTM_BleReadControllerFeatures(tBTM_BLE_CTRL_FEATURES_CBACK *p_vsc_cback)
{
@@ -535,17 +535,17 @@
#endif
/*******************************************************************************
-**
-** Function BTM_BleEnableMixedPrivacyMode
-**
-** Description This function is called to enabled Mixed mode if privacy 1.2
-** is applicable in controller.
-**
-** Parameters mixed_on: mixed mode to be used or not.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleEnableMixedPrivacyMode
+ *
+ * Description This function is called to enabled Mixed mode if privacy 1.2
+ * is applicable in controller.
+ *
+ * Parameters mixed_on: mixed mode to be used or not.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_BleEnableMixedPrivacyMode(bool mixed_on)
{
@@ -557,17 +557,17 @@
}
/*******************************************************************************
-**
-** Function BTM_BleConfigPrivacy
-**
-** Description This function is called to enable or disable the privacy in
-** LE channel of the local device.
-**
-** Parameters privacy_mode: privacy mode on or off.
-**
-** Returns bool privacy mode set success; otherwise failed.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleConfigPrivacy
+ *
+ * Description This function is called to enable or disable the privacy in
+ * LE channel of the local device.
+ *
+ * Parameters privacy_mode: privacy mode on or off.
+ *
+ * Returns bool privacy mode set success; otherwise failed.
+ *
+ ******************************************************************************/
bool BTM_BleConfigPrivacy(bool privacy_mode)
{
#if (BLE_PRIVACY_SPT == TRUE)
@@ -611,14 +611,14 @@
}
/*******************************************************************************
-**
-** Function BTM_BleMaxMultiAdvInstanceCount
-**
-** Description Returns max number of multi adv instances supported by controller
-**
-** Returns Max multi adv instance count
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleMaxMultiAdvInstanceCount
+ *
+ * Description Returns max number of multi adv instances supported by controller
+ *
+ * Returns Max multi adv instance count
+ *
+ ******************************************************************************/
extern uint8_t BTM_BleMaxMultiAdvInstanceCount(void)
{
return btm_cb.cmn_ble_vsc_cb.adv_inst_max < BTM_BLE_MULTI_ADV_MAX ?
@@ -627,14 +627,14 @@
#if (BLE_PRIVACY_SPT == TRUE)
/*******************************************************************************
-**
-** Function btm_ble_resolve_random_addr_on_adv
-**
-** Description resolve random address complete callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resolve_random_addr_on_adv
+ *
+ * Description resolve random address complete callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_resolve_random_addr_on_adv(void * p_rec, void *p)
{
tBTM_SEC_DEV_REC *match_rec = (tBTM_SEC_DEV_REC *) p_rec;
@@ -671,14 +671,14 @@
#endif
/*******************************************************************************
-**
-** Function BTM_BleLocalPrivacyEnabled
-**
-** Description Checks if local device supports private address
-**
-** Returns Return true if local privacy is enabled else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleLocalPrivacyEnabled
+ *
+ * Description Checks if local device supports private address
+ *
+ * Returns Return true if local privacy is enabled else false
+ *
+ ******************************************************************************/
bool BTM_BleLocalPrivacyEnabled(void)
{
#if (BLE_PRIVACY_SPT == TRUE)
@@ -689,19 +689,19 @@
}
/*******************************************************************************
-**
-** Function BTM_BleSetBgConnType
-**
-** 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.
-** p_select_cback: callback function when selective connection procedure
-** is being used.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetBgConnType
+ *
+ * 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.
+ * p_select_cback: callback function when selective connection procedure
+ * is being used.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
tBTM_BLE_SEL_CBACK *p_select_cback)
{
@@ -752,18 +752,18 @@
}
/*******************************************************************************
-**
-** Function BTM_BleClearBgConnDev
-**
-** Description This function is called to clear the whitelist,
-** end any pending whitelist connections,
+ *
+ * Function BTM_BleClearBgConnDev
+ *
+ * Description This function is called to clear the whitelist,
+ * end any pending whitelist connections,
* and reset the local bg device list.
-**
-** Parameters void
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Parameters void
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_BleClearBgConnDev(void)
{
btm_ble_start_auto_conn(false);
@@ -772,20 +772,20 @@
}
/*******************************************************************************
-**
-** Function BTM_BleUpdateBgConnDev
-**
-** Description This function is called to add or remove a device into/from
-** background connection procedure. The background connection
+ *
+ * Function BTM_BleUpdateBgConnDev
+ *
+ * Description This function is called to add or remove a device into/from
+ * background connection procedure. The background connection
* procedure is decided by the background connection type, it can be
* auto connection, or selective connection.
-**
-** Parameters add_remove: true to add; false to remove.
-** remote_bda: device address to add/remove.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Parameters add_remove: true to add; false to remove.
+ * remote_bda: device address to add/remove.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool BTM_BleUpdateBgConnDev(bool add_remove, BD_ADDR remote_bda)
{
BTM_TRACE_EVENT("%s() add=%d", __func__, add_remove);
@@ -793,20 +793,20 @@
}
/*******************************************************************************
-**
-** Function BTM_BleSetConnectableMode
-**
-** Description This function is called to set BLE connectable mode for a
-** peripheral device.
-**
-** Parameters conn_mode: directed connectable mode, or non-directed.It can
-** be BTM_BLE_CONNECT_EVT, BTM_BLE_CONNECT_DIR_EVT or
-** BTM_BLE_CONNECT_LO_DUTY_DIR_EVT
-**
-** Returns BTM_ILLEGAL_VALUE if controller does not support BLE.
-** BTM_SUCCESS is status set successfully; otherwise failure.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetConnectableMode
+ *
+ * Description This function is called to set BLE connectable mode for a
+ * peripheral device.
+ *
+ * Parameters conn_mode: directed connectable mode, or non-directed.It can
+ * be BTM_BLE_CONNECT_EVT, BTM_BLE_CONNECT_DIR_EVT or
+ * BTM_BLE_CONNECT_LO_DUTY_DIR_EVT
+ *
+ * Returns BTM_ILLEGAL_VALUE if controller does not support BLE.
+ * BTM_SUCCESS is status set successfully; otherwise failure.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleSetConnectableMode(tBTM_BLE_CONN_MODE connectable_mode)
{
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
@@ -832,14 +832,14 @@
#endif
/*******************************************************************************
-**
-** Function btm_set_conn_mode_adv_init_addr
-**
-** Description set initator address type and local address type based on adv
-** mode.
-**
-**
-*******************************************************************************/
+ *
+ * Function btm_set_conn_mode_adv_init_addr
+ *
+ * Description set initator address type and local address type based on adv
+ * mode.
+ *
+ *
+ ******************************************************************************/
static uint8_t btm_set_conn_mode_adv_init_addr(tBTM_BLE_INQ_CB *p_cb,
BD_ADDR_PTR p_peer_addr_ptr,
tBLE_ADDR_TYPE *p_peer_addr_type,
@@ -925,19 +925,19 @@
}
/*******************************************************************************
-**
-** Function BTM_BleSetAdvParams
-**
-** Description This function is called to set advertising parameters.
-**
-** Parameters adv_int_min: minimum advertising interval
-** adv_int_max: maximum advertising interval
-** p_dir_bda: connectable direct initiator's LE device address
-** chnl_map: advertising channel map.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetAdvParams
+ *
+ * Description This function is called to set advertising parameters.
+ *
+ * Parameters adv_int_min: minimum advertising interval
+ * adv_int_max: maximum advertising interval
+ * p_dir_bda: connectable direct initiator's LE device address
+ * chnl_map: advertising channel map.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_BleSetAdvParams(uint16_t adv_int_min, uint16_t adv_int_max,
tBLE_BD_ADDR *p_dir_bda,
tBTM_BLE_ADV_CHNL_MAP chnl_map)
@@ -994,20 +994,20 @@
}
/*******************************************************************************
-**
-** Function BTM_BleSetScanParams
-**
-** Description This function is called to set scan parameters.
-**
-** Parameters client_if - Client IF
-** scan_interval - Scan interval
-** scan_window - Scan window
-** scan_mode - Scan mode
-** scan_setup_status_cback - Scan param setup status callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetScanParams
+ *
+ * Description This function is called to set scan parameters.
+ *
+ * Parameters client_if - Client IF
+ * scan_interval - Scan interval
+ * scan_window - Scan window
+ * scan_mode - Scan mode
+ * scan_setup_status_cback - Scan param setup status callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_BleSetScanParams(tGATT_IF client_if, uint32_t scan_interval, uint32_t scan_window,
tBLE_SCAN_MODE scan_mode,
tBLE_SCAN_PARAM_SETUP_CBACK scan_setup_status_cback)
@@ -1056,16 +1056,16 @@
}
/*******************************************************************************
-**
-** Function BTM_BleWriteScanRsp
-**
-** Description This function is called to write LE scan response.
-**
-** Parameters: p_scan_rsp: scan response information.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleWriteScanRsp
+ *
+ * Description This function is called to write LE scan response.
+ *
+ * Parameters: p_scan_rsp: scan response information.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_BleWriteScanRsp(uint8_t* data, uint8_t length,
tBTM_BLE_ADV_DATA_CMPL_CBACK *p_adv_data_cback)
{
@@ -1086,18 +1086,18 @@
}
/*******************************************************************************
-**
-** Function BTM_CheckAdvData
-**
-** Description This function is called to get ADV data for a specific type.
-**
-** Parameters p_adv - pointer of ADV data
-** type - finding ADV data type
-** p_length - return the length of ADV data not including type
-**
-** Returns pointer of ADV data
-**
-*******************************************************************************/
+ *
+ * Function BTM_CheckAdvData
+ *
+ * Description This function is called to get ADV data for a specific type.
+ *
+ * Parameters p_adv - pointer of ADV data
+ * type - finding ADV data type
+ * p_length - return the length of ADV data not including type
+ *
+ * Returns pointer of ADV data
+ *
+ ******************************************************************************/
uint8_t *BTM_CheckAdvData( uint8_t *p_adv, uint8_t type, uint8_t *p_length)
{
uint8_t *p = p_adv;
@@ -1126,16 +1126,16 @@
}
/*******************************************************************************
-**
-** Function BTM__BLEReadDiscoverability
-**
-** Description This function is called to read the current LE discoverability
-** mode of the device.
-**
-** Returns BTM_BLE_NON_DISCOVERABLE ,BTM_BLE_LIMITED_DISCOVERABLE or
-** BTM_BLE_GENRAL_DISCOVERABLE
-**
-*******************************************************************************/
+ *
+ * Function BTM__BLEReadDiscoverability
+ *
+ * Description This function is called to read the current LE discoverability
+ * mode of the device.
+ *
+ * Returns BTM_BLE_NON_DISCOVERABLE ,BTM_BLE_LIMITED_DISCOVERABLE or
+ * BTM_BLE_GENRAL_DISCOVERABLE
+ *
+ ******************************************************************************/
uint16_t BTM_BleReadDiscoverability()
{
BTM_TRACE_API("%s", __func__);
@@ -1144,15 +1144,15 @@
}
/*******************************************************************************
-**
-** Function BTM__BLEReadConnectability
-**
-** Description This function is called to read the current LE connectibility
-** mode of the device.
-**
-** Returns BTM_BLE_NON_CONNECTABLE or BTM_BLE_CONNECTABLE
-**
-*******************************************************************************/
+ *
+ * Function BTM__BLEReadConnectability
+ *
+ * Description This function is called to read the current LE connectibility
+ * mode of the device.
+ *
+ * Returns BTM_BLE_NON_CONNECTABLE or BTM_BLE_CONNECTABLE
+ *
+ ******************************************************************************/
uint16_t BTM_BleReadConnectability()
{
BTM_TRACE_API ("%s", __func__);
@@ -1161,14 +1161,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_select_adv_interval
-**
-** Description select adv interval based on device mode
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_select_adv_interval
+ *
+ * Description select adv interval based on device mode
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_select_adv_interval(tBTM_BLE_INQ_CB *p_cb, uint8_t evt_type, uint16_t *p_adv_int_min, uint16_t *p_adv_int_max)
{
if (p_cb->adv_interval_min && p_cb->adv_interval_max)
@@ -1205,20 +1205,20 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_dmt_flag_bits
-**
-** Description Obtain updated adv flag value based on connect and discoverability mode.
-** Also, setup DMT support value in the flag based on whether the controller
-** supports both LE and BR/EDR.
-**
-** Parameters: flag_value (Input / Output) - flag value
-** connect_mode (Input) - Connect mode value
-** disc_mode (Input) - discoverability mode
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_dmt_flag_bits
+ *
+ * Description Obtain updated adv flag value based on connect and discoverability mode.
+ * Also, setup DMT support value in the flag based on whether the controller
+ * supports both LE and BR/EDR.
+ *
+ * Parameters: flag_value (Input / Output) - flag value
+ * connect_mode (Input) - Connect mode value
+ * disc_mode (Input) - discoverability mode
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_update_dmt_flag_bits(uint8_t *adv_flag_value, const uint16_t connect_mode,
const uint16_t disc_mode)
{
@@ -1237,17 +1237,17 @@
}
/*******************************************************************************
-**
-** Function btm_ble_set_adv_flag
-**
-** Description Set adv flag in adv data.
-**
-** Parameters: connect_mode (Input)- Connect mode value
-** disc_mode (Input) - discoverability mode
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_adv_flag
+ *
+ * Description Set adv flag in adv data.
+ *
+ * Parameters: connect_mode (Input)- Connect mode value
+ * disc_mode (Input) - discoverability mode
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_set_adv_flag(uint16_t connect_mode, uint16_t disc_mode)
{
uint8_t flag = 0, old_flag = 0;
@@ -1281,16 +1281,16 @@
}
}
/*******************************************************************************
-**
-** Function btm_ble_set_discoverability
-**
-** Description This function is called to set BLE discoverable mode.
-**
-** Parameters: combined_mode: discoverability mode.
-**
-** Returns BTM_SUCCESS is status set successfully; otherwise failure.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_discoverability
+ *
+ * Description This function is called to set BLE discoverable mode.
+ *
+ * Parameters: combined_mode: discoverability mode.
+ *
+ * Returns BTM_SUCCESS is status set successfully; otherwise failure.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_set_discoverability(uint16_t combined_mode)
{
tBTM_LE_RANDOM_CB *p_addr_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
@@ -1381,16 +1381,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_set_connectability
-**
-** Description This function is called to set BLE connectability mode.
-**
-** Parameters: combined_mode: connectability mode.
-**
-** Returns BTM_SUCCESS is status set successfully; otherwise failure.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_connectability
+ *
+ * Description This function is called to set BLE connectability mode.
+ *
+ * Parameters: combined_mode: connectability mode.
+ *
+ * Returns BTM_SUCCESS is status set successfully; otherwise failure.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_set_connectability(uint16_t combined_mode)
{
tBTM_LE_RANDOM_CB *p_addr_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
@@ -1466,24 +1466,24 @@
}
/*******************************************************************************
-**
-** Function btm_ble_start_inquiry
-**
-** Description This function is called to start BLE inquiry procedure.
-** If the duration is zero, the periodic inquiry mode is cancelled.
-**
-** Parameters: mode - GENERAL or LIMITED inquiry
-** p_inq_params - pointer to the BLE inquiry parameter.
-** 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_NO_RESOURCES if could not allocate a message buffer
-** BTM_BUSY - if an inquiry is already active
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_start_inquiry
+ *
+ * Description This function is called to start BLE inquiry procedure.
+ * If the duration is zero, the periodic inquiry mode is cancelled.
+ *
+ * Parameters: mode - GENERAL or LIMITED inquiry
+ * p_inq_params - pointer to the BLE inquiry parameter.
+ * 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_NO_RESOURCES if could not allocate a message buffer
+ * BTM_BUSY - if an inquiry is already active
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_start_inquiry (uint8_t mode, uint8_t duration)
{
tBTM_STATUS status = BTM_CMD_STARTED;
@@ -1547,14 +1547,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_read_remote_name_cmpl
-**
-** Description This function is called when BLE remote name is received.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_read_remote_name_cmpl
+ *
+ * Description This function is called when BLE remote name is received.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_read_remote_name_cmpl(bool status, BD_ADDR bda, uint16_t length, char *p_name)
{
uint8_t hci_status = HCI_SUCCESS;
@@ -1577,17 +1577,17 @@
}
/*******************************************************************************
-**
-** Function btm_ble_read_remote_name
-**
-** Description This function read remote LE device name using GATT read
-** procedure.
-**
-** Parameters: None.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_read_remote_name
+ *
+ * Description This function read remote LE device name using GATT read
+ * procedure.
+ *
+ * Parameters: None.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_read_remote_name(BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur, tBTM_CMPL_CB *p_cb)
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -1624,16 +1624,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_cancel_remote_name
-**
-** Description This function cancel read remote LE device name.
-**
-** Parameters: None.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_cancel_remote_name
+ *
+ * Description This function cancel read remote LE device name.
+ *
+ * Parameters: None.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool btm_ble_cancel_remote_name(BD_ADDR remote_bda)
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -1649,17 +1649,17 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_adv_flag
-**
-** Description This function update the limited discoverable flag in the adv
-** data.
-**
-** Parameters: None.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_adv_flag
+ *
+ * Description This function update the limited discoverable flag in the adv
+ * data.
+ *
+ * Parameters: None.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_update_adv_flag(uint8_t flag)
{
tBTM_BLE_LOCAL_ADV_DATA *p_adv_data = &btm_cb.ble_ctr_cb.inq_var.adv_data;
@@ -1697,14 +1697,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_cache_adv_data
-**
-** Description Update advertising cache data.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_cache_adv_data
+ *
+ * Description Update advertising cache data.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_cache_adv_data(UNUSED_ATTR tBTM_INQ_RESULTS *p_cur, uint8_t data_len,
uint8_t *p, uint8_t evt_type)
{
@@ -1742,17 +1742,17 @@
}
/*******************************************************************************
-**
-** Function btm_ble_is_discoverable
-**
-** Description check ADV flag to make sure device is discoverable and match
-** the search condition
-**
-** Parameters
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_is_discoverable
+ *
+ * Description check ADV flag to make sure device is discoverable and match
+ * the search condition
+ *
+ * Parameters
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint8_t btm_ble_is_discoverable(BD_ADDR bda, uint8_t evt_type,
UNUSED_ATTR uint8_t *p)
{
@@ -1930,16 +1930,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_inq_result
-**
-** Description Update adv packet information into inquiry result.
-**
-** Parameters
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_inq_result
+ *
+ * Description Update adv packet information into inquiry result.
+ *
+ * Parameters
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool btm_ble_update_inq_result(tINQ_DB_ENT *p_i, uint8_t addr_type, uint8_t evt_type, uint8_t *p)
{
bool to_report = true;
@@ -2052,15 +2052,15 @@
}
/*******************************************************************************
-**
-** Function btm_clear_all_pending_le_entry
-**
-** Description This function is called to clear all LE pending entry in
-** inquiry database.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_clear_all_pending_le_entry
+ *
+ * Description This function is called to clear all LE pending entry in
+ * inquiry database.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_clear_all_pending_le_entry(void)
{
uint16_t xx;
@@ -2077,16 +2077,16 @@
}
/*******************************************************************************
-**
-** Function btm_send_sel_conn_callback
-**
-** Description send selection connection request callback.
-**
-** Parameters
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_send_sel_conn_callback
+ *
+ * Description send selection connection request callback.
+ *
+ * Parameters
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_send_sel_conn_callback(BD_ADDR remote_bda, uint8_t evt_type, uint8_t *p_data,
UNUSED_ATTR uint8_t addr_type)
{
@@ -2120,18 +2120,18 @@
}
/*******************************************************************************
-**
-** 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.
-** If the inquiry database is full, the oldest entry is discarded.
-**
-** Parameters
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * 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.
+ * If the inquiry database is full, the oldest entry is discarded.
+ *
+ * Parameters
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_process_adv_pkt (uint8_t *p_data)
{
BD_ADDR bda;
@@ -2180,17 +2180,17 @@
}
/*******************************************************************************
-**
-** Function btm_ble_process_adv_pkt_cont
-**
-** Description This function is called after random address resolution is
-** done, and proceed to process adv packet.
-**
-** Parameters
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_process_adv_pkt_cont
+ *
+ * Description This function is called after random address resolution is
+ * done, and proceed to process adv packet.
+ *
+ * Parameters
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, uint8_t addr_type, uint8_t evt_type, uint8_t *p)
{
tINQ_DB_ENT *p_i;
@@ -2299,14 +2299,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_start_scan
-**
-** Description Start the BLE scan.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_start_scan
+ *
+ * Description Start the BLE scan.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_start_scan(void)
{
tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var;
@@ -2323,14 +2323,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_stop_scan
-**
-** Description Stop the BLE scan.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_stop_scan
+ *
+ * Description Stop the BLE scan.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_stop_scan(void)
{
BTM_TRACE_EVENT ("btm_ble_stop_scan ");
@@ -2346,14 +2346,14 @@
btm_cb.ble_ctr_cb.wl_state &= ~BTM_BLE_WL_SCAN;
}
/*******************************************************************************
-**
-** Function btm_ble_stop_inquiry
-**
-** Description Stop the BLE Inquiry.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_stop_inquiry
+ *
+ * Description Stop the BLE Inquiry.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_stop_inquiry(void)
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -2382,14 +2382,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_stop_observe
-**
-** Description Stop the BLE Observe.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_stop_observe
+ *
+ * Description Stop the BLE Observe.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_stop_observe(void)
{
tBTM_BLE_CB *p_ble_cb = & btm_cb.ble_ctr_cb;
@@ -2409,14 +2409,14 @@
(p_obs_cb)((tBTM_INQUIRY_CMPL *) &btm_cb.btm_inq_vars.inq_cmpl_info);
}
/*******************************************************************************
-**
-** Function btm_ble_adv_states_operation
-**
-** Description Set or clear adv states in topology mask
-**
-** Returns operation status. true if sucessful, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_adv_states_operation
+ *
+ * Description Set or clear adv states in topology mask
+ *
+ * Returns operation status. true if sucessful, false otherwise.
+ *
+ ******************************************************************************/
typedef bool (BTM_TOPOLOGY_FUNC_PTR)(tBTM_BLE_STATE_MASK);
static bool btm_ble_adv_states_operation(BTM_TOPOLOGY_FUNC_PTR *p_handler, uint8_t adv_evt)
{
@@ -2452,14 +2452,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_start_adv
-**
-** Description start the BLE advertising.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_start_adv
+ *
+ * Description start the BLE advertising.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_start_adv(void)
{
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
@@ -2487,14 +2487,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_stop_adv
-**
-** Description Stop the BLE advertising.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_stop_adv
+ *
+ * Description Stop the BLE advertising.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_stop_adv(void)
{
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
@@ -2520,14 +2520,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_start_slow_adv
-**
-** Description Restart adv with slow adv interval
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_start_slow_adv
+ *
+ * Description Restart adv with slow adv interval
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_ble_start_slow_adv(void)
{
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
@@ -2581,16 +2581,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_read_remote_features_complete
-**
-** Description This function is called when the command complete message
-** is received from the HCI for the read LE remote feature supported
-** complete event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_read_remote_features_complete
+ *
+ * Description This function is called when the command complete message
+ * is received from the HCI for the read LE remote feature supported
+ * complete event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_read_remote_features_complete(uint8_t *p)
{
tACL_CONN *p_acl_cb = &btm_cb.acl_db[0];
@@ -2623,14 +2623,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_write_adv_enable_complete
-**
-** Description This function process the write adv enable command complete.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_write_adv_enable_complete
+ *
+ * Description This function process the write adv enable command complete.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_write_adv_enable_complete(uint8_t * p)
{
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
@@ -2644,14 +2644,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_dir_adv_tout
-**
-** Description when directed adv time out
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_dir_adv_tout
+ *
+ * Description when directed adv time out
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_dir_adv_tout(void)
{
btm_cb.ble_ctr_cb.inq_var.adv_mode = BTM_BLE_ADV_DISABLE;
@@ -2661,14 +2661,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_set_topology_mask
-**
-** Description set BLE topology mask
-**
-** Returns true is request is allowed, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_set_topology_mask
+ *
+ * Description set BLE topology mask
+ *
+ * Returns true is request is allowed, false otherwise.
+ *
+ ******************************************************************************/
bool btm_ble_set_topology_mask(tBTM_BLE_STATE_MASK request_state_mask)
{
request_state_mask &= BTM_BLE_STATE_ALL_MASK;
@@ -2677,14 +2677,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_clear_topology_mask
-**
-** Description Clear BLE topology bit mask
-**
-** Returns true is request is allowed, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_clear_topology_mask
+ *
+ * Description Clear BLE topology bit mask
+ *
+ * Returns true is request is allowed, false otherwise.
+ *
+ ******************************************************************************/
bool btm_ble_clear_topology_mask (tBTM_BLE_STATE_MASK request_state_mask)
{
request_state_mask &= BTM_BLE_STATE_ALL_MASK;
@@ -2693,14 +2693,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_link_topology_mask
-**
-** Description This function update the link topology mask
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_link_topology_mask
+ *
+ * Description This function update the link topology mask
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_update_link_topology_mask(uint8_t link_role, bool increase)
{
btm_ble_clear_topology_mask (BTM_BLE_STATE_ALL_CONN_MASK);
@@ -2727,15 +2727,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_mode_operation
-**
-** Description This function update the GAP role operation when a link status
-** is updated.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_mode_operation
+ *
+ * Description This function update the GAP role operation when a link status
+ * is updated.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_update_mode_operation(uint8_t link_role, BD_ADDR bd_addr, uint8_t status)
{
if (status == HCI_ERR_DIRECTED_ADVERTISING_TIMEOUT)
@@ -2764,14 +2764,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_init
-**
-** Description Initialize the control block variable values.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_init
+ *
+ * Description Initialize the control block variable values.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_init(void)
{
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
@@ -2812,15 +2812,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_topology_check
-**
-** Description check to see requested state is supported. One state check at
-** a time is supported
-**
-** Returns true is request is allowed, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_topology_check
+ *
+ * Description check to see requested state is supported. One state check at
+ * a time is supported
+ *
+ * Returns true is request is allowed, false otherwise.
+ *
+ ******************************************************************************/
bool btm_ble_topology_check(tBTM_BLE_STATE_MASK request_state_mask)
{
bool rt = false;
diff --git a/stack/btm/btm_ble_multi_adv.cc b/stack/btm/btm_ble_multi_adv.cc
index 7ee1a73..3767dd5 100644
--- a/stack/btm/btm_ble_multi_adv.cc
+++ b/stack/btm/btm_ble_multi_adv.cc
@@ -62,9 +62,9 @@
}
};
-/************************************************************************************
-** Externs
-************************************************************************************/
+/*******************************************************************************
+ * Externs
+ ******************************************************************************/
extern fixed_queue_t *btu_general_alarm_queue;
void DoNothing(uint8_t) {}
@@ -454,16 +454,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_multi_adv_init
-**
-** Description This function initialize the multi adv control block.
-**
-** Parameters None
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_multi_adv_init
+ *
+ * Description This function initialize the multi adv control block.
+ *
+ * Parameters None
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_multi_adv_init() {
BleAdvertiserHciInterface::Initialize();
BleAdvertisingManager::Initialize(BleAdvertiserHciInterface::Get());
@@ -472,15 +472,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_multi_adv_cleanup
-**
-** Description This function cleans up multi adv control block.
-**
-** Parameters
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_multi_adv_cleanup
+ *
+ * Description This function cleans up multi adv control block.
+ *
+ * Parameters
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_multi_adv_cleanup(void) {
BleAdvertisingManager::CleanUp();
BleAdvertiserHciInterface::CleanUp();
diff --git a/stack/btm/btm_ble_privacy.cc b/stack/btm/btm_ble_privacy.cc
index 4638394..9b9d955 100644
--- a/stack/btm/btm_ble_privacy.cc
+++ b/stack/btm/btm_ble_privacy.cc
@@ -48,20 +48,20 @@
#define BTM_BLE_META_ADD_WL_ATTR_LEN 9
/*******************************************************************************
-** Functions implemented controller based privacy using Resolving List
-*******************************************************************************/
+ * Functions implemented controller based privacy using Resolving List
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function btm_ble_enq_resolving_list_pending
-**
-** Description add target address into resolving pending operation queue
-**
-** Parameters target_bda: target device address
-** add_entry: true for add entry, false for remove entry
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_enq_resolving_list_pending
+ *
+ * Description add target address into resolving pending operation queue
+ *
+ * Parameters target_bda: target device address
+ * add_entry: true for add entry, false for remove entry
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_enq_resolving_list_pending(BD_ADDR pseudo_bda, uint8_t op_code)
{
tBTM_BLE_RESOLVE_Q *p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q;
@@ -73,17 +73,17 @@
}
/*******************************************************************************
-**
-** Function btm_ble_brcm_find_resolving_pending_entry
-**
-** Description check to see if the action is in pending list
-**
-** Parameters true: action pending;
-** false: new action
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_brcm_find_resolving_pending_entry
+ *
+ * Description check to see if the action is in pending list
+ *
+ * Parameters true: action pending;
+ * false: new action
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool btm_ble_brcm_find_resolving_pending_entry(BD_ADDR pseudo_addr, uint8_t action)
{
tBTM_BLE_RESOLVE_Q *p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q;
@@ -101,16 +101,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_deq_resolving_pending
-**
-** Description dequeue target address from resolving pending operation queue
-**
-** Parameters pseudo_addr: pseudo_addr device address
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_deq_resolving_pending
+ *
+ * Description dequeue target address from resolving pending operation queue
+ *
+ * Parameters pseudo_addr: pseudo_addr device address
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool btm_ble_deq_resolving_pending(BD_ADDR pseudo_addr)
{
tBTM_BLE_RESOLVE_Q *p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q;
@@ -128,14 +128,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_clear_irk_index
-**
-** Description clear IRK list index mask for availability
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_clear_irk_index
+ *
+ * Description clear IRK list index mask for availability
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void btm_ble_clear_irk_index(uint8_t index)
{
uint8_t byte;
@@ -150,14 +150,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_find_irk_index
-**
-** Description find the first available IRK list index
-**
-** Returns index from 0 ~ max (127 default)
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_find_irk_index
+ *
+ * Description find the first available IRK list index
+ *
+ * Returns index from 0 ~ max (127 default)
+ *
+ ******************************************************************************/
uint8_t btm_ble_find_irk_index(void)
{
uint8_t i = 0;
@@ -182,14 +182,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_update_resolving_list
-**
-** Description update resolving list entry in host maintained record
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_update_resolving_list
+ *
+ * Description update resolving list entry in host maintained record
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_update_resolving_list(BD_ADDR pseudo_bda, bool add)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev(pseudo_bda);
@@ -222,15 +222,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_clear_resolving_list_complete
-**
-** Description This function is called when command complete for
-** clear resolving list
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_clear_resolving_list_complete
+ *
+ * Description This function is called when command complete for
+ * clear resolving list
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_clear_resolving_list_complete(uint8_t *p, uint16_t evt_len)
{
uint8_t status = 0;
@@ -268,15 +268,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_add_resolving_list_entry_complete
-**
-** Description This function is called when command complete for
-** add resolving list entry
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_add_resolving_list_entry_complete
+ *
+ * Description This function is called when command complete for
+ * add resolving list entry
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_add_resolving_list_entry_complete(uint8_t *p, uint16_t evt_len)
{
uint8_t status;
@@ -311,15 +311,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_remove_resolving_list_entry_complete
-**
-** Description This function is called when command complete for
-** remove resolving list entry
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_remove_resolving_list_entry_complete
+ *
+ * Description This function is called when command complete for
+ * remove resolving list entry
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_remove_resolving_list_entry_complete(uint8_t *p, uint16_t evt_len)
{
BD_ADDR pseudo_bda;
@@ -349,15 +349,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_read_resolving_list_entry_complete
-**
-** Description This function is called when command complete for
-** remove resolving list entry
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_read_resolving_list_entry_complete
+ *
+ * Description This function is called when command complete for
+ * remove resolving list entry
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_read_resolving_list_entry_complete(uint8_t *p, uint16_t evt_len)
{
uint8_t status, rra_type = BTM_BLE_ADDR_PSEUDO;
@@ -393,18 +393,18 @@
}
/*******************************************************************************
VSC that implement controller based privacy
-********************************************************************************/
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function btm_ble_resolving_list_vsc_op_cmpl
-**
-** Description IRK operation VSC complete handler
-**
-** Parameters
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resolving_list_vsc_op_cmpl
+ *
+ * Description IRK operation VSC complete handler
+ *
+ * Parameters
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_resolving_list_vsc_op_cmpl (tBTM_VSC_CMPL *p_params)
{
uint8_t *p = p_params->p_param_buf, op_subcode;
@@ -437,17 +437,17 @@
}
/*******************************************************************************
-**
-** Function btm_ble_remove_resolving_list_entry
-**
-** Description This function to remove an IRK entry from the list
-**
-** Parameters ble_addr_type: address type
-** ble_addr: LE adddress
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_remove_resolving_list_entry
+ *
+ * Description This function to remove an IRK entry from the list
+ *
+ * Parameters ble_addr_type: address type
+ * ble_addr: LE adddress
+ *
+ * Returns status
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_remove_resolving_list_entry(tBTM_SEC_DEV_REC *p_dev_rec)
{
/* if controller does not support RPA offloading or privacy 1.2, skip */
@@ -479,14 +479,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_clear_resolving_list
-**
-** Description This function clears the resolving list
-**
-** Parameters None.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_clear_resolving_list
+ *
+ * Description This function clears the resolving list
+ *
+ * Parameters None.
+ *
+ ******************************************************************************/
void btm_ble_clear_resolving_list(void)
{
@@ -508,16 +508,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_read_resolving_list_entry
-**
-** Description This function read an IRK entry by index
-**
-** Parameters entry index.
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_read_resolving_list_entry
+ *
+ * Description This function read an IRK entry by index
+ *
+ * Parameters entry index.
+ *
+ * Returns status
+ *
+ ******************************************************************************/
tBTM_STATUS btm_ble_read_resolving_list_entry(tBTM_SEC_DEV_REC *p_dev_rec)
{
if (!(p_dev_rec->ble.in_controller_list & BTM_RESOLVING_LIST_BIT))
@@ -550,18 +550,18 @@
/*******************************************************************************
-**
-** Function btm_ble_suspend_resolving_list_activity
-**
-** Description This function suspends all resolving list activity, including
-** scan, initiating, and advertising, if resolving list is being
-** enabled.
-**
-** Parameters
-**
-** Returns true if suspended; false otherwise
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_suspend_resolving_list_activity
+ *
+ * Description This function suspends all resolving list activity, including
+ * scan, initiating, and advertising, if resolving list is being
+ * enabled.
+ *
+ * Parameters
+ *
+ * Returns true if suspended; false otherwise
+ *
+ ******************************************************************************/
bool btm_ble_suspend_resolving_list_activity(void)
{
tBTM_BLE_CB *p_ble_cb = &btm_cb.ble_ctr_cb;
@@ -600,16 +600,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_resume_resolving_list_activity
-**
-** Description This function resumes the resolving list activity, including
-** scanning, initiating, and advertising, if any of these
-** activities has been suspended earlier.
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resume_resolving_list_activity
+ *
+ * Description This function resumes the resolving list activity, including
+ * scanning, initiating, and advertising, if any of these
+ * activities has been suspended earlier.
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void btm_ble_resume_resolving_list_activity(void)
{
tBTM_BLE_CB *p_ble_cb = &btm_cb.ble_ctr_cb;
@@ -627,15 +627,15 @@
}
/*******************************************************************************
-**
-** Function btm_ble_vendor_enable_irk_feature
-**
-** Description This function is called to enable or disable the RRA
-** offloading feature.
-**
-** Parameters enable: enable or disable the RRA offloading feature
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_vendor_enable_irk_feature
+ *
+ * Description This function is called to enable or disable the RRA
+ * offloading feature.
+ *
+ * Parameters enable: enable or disable the RRA offloading feature
+ *
+ ******************************************************************************/
void btm_ble_vendor_enable_irk_feature(bool enable)
{
uint8_t param[20], *p;
@@ -652,14 +652,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_exe_disable_resolving_list
-**
-** Description execute resolving list disable
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_exe_disable_resolving_list
+ *
+ * Description execute resolving list disable
+ *
+ * Returns none
+ *
+ ******************************************************************************/
bool btm_ble_exe_disable_resolving_list(void)
{
if (!btm_ble_suspend_resolving_list_activity())
@@ -674,14 +674,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_exe_enable_resolving_list
-**
-** Description enable LE resolve address list
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_exe_enable_resolving_list
+ *
+ * Description enable LE resolve address list
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void btm_ble_exe_enable_resolving_list(void)
{
if (!btm_ble_suspend_resolving_list_activity())
@@ -694,14 +694,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_disable_resolving_list
-**
-** Description Disable LE Address resolution
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_disable_resolving_list
+ *
+ * Description Disable LE Address resolution
+ *
+ * Returns none
+ *
+ ******************************************************************************/
bool btm_ble_disable_resolving_list(uint8_t rl_mask, bool to_resume )
{
uint8_t rl_state = btm_cb.ble_ctr_cb.rl_state;
@@ -729,16 +729,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_resolving_list_load_dev
-**
-** Description This function add a device which is using RPA into white list
-**
-** Parameters pointer to device security record
-**
-** Returns true if device added, otherwise falase.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resolving_list_load_dev
+ *
+ * Description This function add a device which is using RPA into white list
+ *
+ * Parameters pointer to device security record
+ *
+ * Returns true if device added, otherwise falase.
+ *
+ ******************************************************************************/
bool btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC *p_dev_rec)
{
bool rt = false;
@@ -830,16 +830,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_resolving_list_remove_dev
-**
-** Description This function removes the device from resolving list
-**
-** Parameters
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resolving_list_remove_dev
+ *
+ * Description This function removes the device from resolving list
+ *
+ * Parameters
+ *
+ * Returns status
+ *
+ ******************************************************************************/
void btm_ble_resolving_list_remove_dev(tBTM_SEC_DEV_REC *p_dev_rec)
{
uint8_t rl_mask = btm_cb.ble_ctr_cb.rl_state;
@@ -869,14 +869,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_enable_resolving_list
-**
-** Description enable LE resolve address list
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_enable_resolving_list
+ *
+ * Description enable LE resolve address list
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void btm_ble_enable_resolving_list(uint8_t rl_mask)
{
uint8_t rl_state = btm_cb.ble_ctr_cb.rl_state;
@@ -892,14 +892,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_resolving_list_empty
-**
-** Description check to see if resoving list is empty or not
-**
-** Returns true: empty; false non-empty
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resolving_list_empty
+ *
+ * Description check to see if resoving list is empty or not
+ *
+ * Returns true: empty; false non-empty
+ *
+ ******************************************************************************/
bool btm_ble_resolving_list_empty(void)
{
return (controller_get_interface()->get_ble_resolving_list_max_size() ==
@@ -919,16 +919,16 @@
/*******************************************************************************
-**
-** Function btm_ble_enable_resolving_list_for_platform
-**
-** Description enable/disable resolving list feature depending on if any
-** resolving list is empty and whitelist is involoved in the
-** operation.
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_enable_resolving_list_for_platform
+ *
+ * Description enable/disable resolving list feature depending on if any
+ * resolving list is empty and whitelist is involoved in the
+ * operation.
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void btm_ble_enable_resolving_list_for_platform (uint8_t rl_mask)
{
/* if controller does not support, skip */
@@ -953,16 +953,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_resolving_list_init
-**
-** Description Initialize resolving list in host stack
-**
-** Parameters Max resolving list size
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resolving_list_init
+ *
+ * Description Initialize resolving list in host stack
+ *
+ * Parameters Max resolving list size
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_resolving_list_init(uint8_t max_irk_list_sz)
{
tBTM_BLE_RESOLVE_Q *p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q;
@@ -987,16 +987,16 @@
}
/*******************************************************************************
-**
-** Function btm_ble_resolving_list_cleanup
-**
-** Description Cleanup resolving list dynamic memory
-**
-** Parameters
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_resolving_list_cleanup
+ *
+ * Description Cleanup resolving list dynamic memory
+ *
+ * Parameters
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_ble_resolving_list_cleanup(void)
{
tBTM_BLE_RESOLVE_Q *p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q;
diff --git a/stack/btm/btm_dev.cc b/stack/btm/btm_dev.cc
index b66b3e0..92f54c0 100644
--- a/stack/btm/btm_dev.cc
+++ b/stack/btm/btm_dev.cc
@@ -38,24 +38,24 @@
#include "l2c_api.h"
/*******************************************************************************
-**
-** Function BTM_SecAddDevice
-**
-** Description Add/modify device. 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
-** dev_class - Device Class
-** bd_name - Name of the peer device. NULL if unknown.
-** features - Remote device's features (up to 3 pages). NULL if not known
-** trusted_mask - Bitwise OR of services that do not
-** require authorization. (array of uint32_t)
-** link_key - Connection link key. NULL if unknown.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecAddDevice
+ *
+ * Description Add/modify device. 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
+ * dev_class - Device Class
+ * bd_name - Name of the peer device. NULL if unknown.
+ * features - Remote device's features (up to 3 pages). NULL if not known
+ * trusted_mask - Bitwise OR of services that do not
+ * require authorization. (array of uint32_t)
+ * link_key - Connection link key. NULL if unknown.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool BTM_SecAddDevice (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name,
uint8_t *features, uint32_t trusted_mask[],
LINK_KEY link_key, uint8_t key_type, tBTM_IO_CAP io_cap,
@@ -156,16 +156,16 @@
/*******************************************************************************
-**
-** Function BTM_SecDeleteDevice
-**
-** Description Free resources associated with the device.
-**
-** Parameters: bd_addr - BD address of the peer
-**
-** Returns true if removed OK, false if not found or ACL link is active
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecDeleteDevice
+ *
+ * Description Free resources associated with the device.
+ *
+ * Parameters: bd_addr - BD address of the peer
+ *
+ * Returns true if removed OK, false if not found or ACL link is active
+ *
+ ******************************************************************************/
bool BTM_SecDeleteDevice (BD_ADDR bd_addr)
{
if (BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE) ||
@@ -187,13 +187,13 @@
}
/*******************************************************************************
-**
-** Function BTM_SecClearSecurityFlags
-**
-** Description Reset the security flags (mark as not-paired) for a given
-** remove device.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecClearSecurityFlags
+ *
+ * Description Reset the security flags (mark as not-paired) for a given
+ * remove device.
+ *
+ ******************************************************************************/
extern void BTM_SecClearSecurityFlags (BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev(bd_addr);
@@ -206,15 +206,15 @@
}
/*******************************************************************************
-**
-** Function BTM_SecReadDevName
-**
-** Description Looks for the device name in the security database for the
-** specified BD address.
-**
-** Returns Pointer to the name or NULL
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecReadDevName
+ *
+ * Description Looks for the device name in the security database for the
+ * specified BD address.
+ *
+ * Returns Pointer to the name or NULL
+ *
+ ******************************************************************************/
char *BTM_SecReadDevName (BD_ADDR bd_addr)
{
char *p_name = NULL;
@@ -239,15 +239,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_alloc_dev
-**
-** Description Look for the record in the device database for the record
-** with specified address
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_alloc_dev
+ *
+ * Description Look for the record in the device database for the record
+ * with specified address
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
tBTM_SEC_DEV_REC *btm_sec_alloc_dev (BD_ADDR bd_addr)
{
tBTM_INQ_INFO *p_inq_info;
@@ -281,12 +281,12 @@
/*******************************************************************************
-**
-** Function btm_sec_free_dev
-**
-** Description Mark device record as not used
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_free_dev
+ *
+ * Description Mark device record as not used
+ *
+ ******************************************************************************/
void btm_sec_free_dev (tBTM_SEC_DEV_REC *p_dev_rec)
{
/* Clear out any saved BLE keys */
@@ -295,17 +295,17 @@
}
/*******************************************************************************
-**
-** Function btm_dev_support_switch
-**
-** Description This function is called by the L2CAP to check if remote
-** device supports role switch
-**
-** Parameters: bd_addr - Address of the peer device
-**
-** Returns true if device is known and role switch is supported
-**
-*******************************************************************************/
+ *
+ * Function btm_dev_support_switch
+ *
+ * Description This function is called by the L2CAP to check if remote
+ * device supports role switch
+ *
+ * Parameters: bd_addr - Address of the peer device
+ *
+ * Returns true if device is known and role switch is supported
+ *
+ ******************************************************************************/
bool btm_dev_support_switch (BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -361,15 +361,15 @@
}
/*******************************************************************************
-**
-** Function btm_find_dev_by_handle
-**
-** Description Look for the record in the device database for the record
-** with specified handle
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_find_dev_by_handle
+ *
+ * Description Look for the record in the device database for the record
+ * with specified handle
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
tBTM_SEC_DEV_REC *btm_find_dev_by_handle (uint16_t handle)
{
list_node_t *n = list_foreach(btm_cb.sec_dev_rec, is_handle_equal, &handle);
@@ -396,15 +396,15 @@
}
/*******************************************************************************
-**
-** Function btm_find_dev
-**
-** Description Look for the record in the device database for the record
-** with specified BD address
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_find_dev
+ *
+ * Description Look for the record in the device database for the record
+ * with specified BD address
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
tBTM_SEC_DEV_REC *btm_find_dev(const BD_ADDR bd_addr)
{
if (!bd_addr)
@@ -418,14 +418,14 @@
}
/*******************************************************************************
-**
-** Function btm_consolidate_dev
+ *
+ * Function btm_consolidate_dev
5**
-** Description combine security records if identified as same peer
-**
-** Returns none
-**
-*******************************************************************************/
+ * Description combine security records if identified as same peer
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void btm_consolidate_dev(tBTM_SEC_DEV_REC *p_target_rec)
{
tBTM_SEC_DEV_REC temp_rec = *p_target_rec;
@@ -476,15 +476,15 @@
}
/*******************************************************************************
-**
-** Function btm_find_or_alloc_dev
-**
-** Description Look for the record in the device database for the record
-** with specified BD address
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_find_or_alloc_dev
+ *
+ * Description Look for the record in the device database for the record
+ * with specified BD address
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
tBTM_SEC_DEV_REC *btm_find_or_alloc_dev (BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -500,16 +500,16 @@
}
/*******************************************************************************
-**
-** Function btm_find_oldest_dev_rec
-**
-** Description Locates the oldest device in use. It first looks for
-** the oldest non-paired device. If all devices are paired it
-** returns the oldest paired device.
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_find_oldest_dev_rec
+ *
+ * Description Locates the oldest device in use. It first looks for
+ * the oldest non-paired device. If all devices are paired it
+ * returns the oldest paired device.
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
static tBTM_SEC_DEV_REC* btm_find_oldest_dev_rec (void)
{
tBTM_SEC_DEV_REC *p_oldest = NULL;
@@ -545,17 +545,17 @@
}
/*******************************************************************************
-**
-** Function btm_sec_allocate_dev_rec
-**
-** Description Attempts to allocate a new device record. If we have
-** exceeded the maximum number of allowable records to
-** allocate, the oldest record will be deleted to make room
-** for the new record.
-**
-** Returns Pointer to the newly allocated record
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_allocate_dev_rec
+ *
+ * Description Attempts to allocate a new device record. If we have
+ * exceeded the maximum number of allowable records to
+ * allocate, the oldest record will be deleted to make room
+ * for the new record.
+ *
+ * Returns Pointer to the newly allocated record
+ *
+ ******************************************************************************/
tBTM_SEC_DEV_REC* btm_sec_allocate_dev_rec(void)
{
tBTM_SEC_DEV_REC *p_dev_rec = NULL;
@@ -579,15 +579,15 @@
}
/*******************************************************************************
-**
-** Function btm_get_bond_type_dev
-**
-** Description Get the bond type for a device in the device database
-** with specified BD address
-**
-** Returns The device bond type if known, otherwise BOND_TYPE_UNKNOWN
-**
-*******************************************************************************/
+ *
+ * Function btm_get_bond_type_dev
+ *
+ * Description Get the bond type for a device in the device database
+ * with specified BD address
+ *
+ * Returns The device bond type if known, otherwise BOND_TYPE_UNKNOWN
+ *
+ ******************************************************************************/
tBTM_BOND_TYPE btm_get_bond_type_dev(BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev(bd_addr);
@@ -599,15 +599,15 @@
}
/*******************************************************************************
-**
-** Function btm_set_bond_type_dev
-**
-** Description Set the bond type for a device in the device database
-** with specified BD address
-**
-** Returns true on success, otherwise false
-**
-*******************************************************************************/
+ *
+ * Function btm_set_bond_type_dev
+ *
+ * Description Set the bond type for a device in the device database
+ * with specified BD address
+ *
+ * Returns true on success, otherwise false
+ *
+ ******************************************************************************/
bool btm_set_bond_type_dev(BD_ADDR bd_addr, tBTM_BOND_TYPE bond_type)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev(bd_addr);
diff --git a/stack/btm/btm_devctl.cc b/stack/btm/btm_devctl.cc
index b77d005..75d84b0 100644
--- a/stack/btm/btm_devctl.cc
+++ b/stack/btm/btm_devctl.cc
@@ -46,9 +46,9 @@
extern fixed_queue_t *btu_general_alarm_queue;
extern thread_t *bt_workqueue_thread;
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L D A T A D E F I N I T I O N S */
-/********************************************************************************/
+/******************************************************************************/
#ifndef BTM_DEV_RESET_TIMEOUT
#define BTM_DEV_RESET_TIMEOUT 4
@@ -59,21 +59,21 @@
#define BTM_INFO_TIMEOUT 5 /* 5 seconds for info response */
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void btm_decode_ext_features_page (uint8_t page_number, const BD_FEATURES p_features);
/*******************************************************************************
-**
-** Function btm_dev_init
-**
-** Description This function is on the BTM startup
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_dev_init
+ *
+ * Description This function is on the BTM startup
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_dev_init (void)
{
/* Initialize nonzero defaults */
@@ -103,16 +103,16 @@
/*******************************************************************************
-**
-** Function btm_db_reset
-**
-** Description This function is called by BTM_DeviceReset and clears out any
-** pending callbacks for inquiries, discoveries, other pending
-** functions that may be in progress.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_db_reset
+ *
+ * Description This function is called by BTM_DeviceReset and clears out any
+ * pending callbacks for inquiries, discoveries, other pending
+ * functions that may be in progress.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_db_reset (void)
{
tBTM_CMPL_CB *p_cb;
@@ -215,28 +215,28 @@
}
/*******************************************************************************
-**
-** Function BTM_IsDeviceUp
-**
-** Description This function is called to check if the device is up.
-**
-** Returns true if device is up, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_IsDeviceUp
+ *
+ * Description This function is called to check if the device is up.
+ *
+ * Returns true if device is up, else false
+ *
+ ******************************************************************************/
bool BTM_IsDeviceUp (void)
{
return controller_get_interface()->get_is_ready();
}
/*******************************************************************************
-**
-** Function btm_read_local_name_timeout
-**
-** Description Callback when reading the local name times out.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_local_name_timeout
+ *
+ * Description Callback when reading the local name times out.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_local_name_timeout(UNUSED_ATTR void *data)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_rln_cmpl_cb;
@@ -246,14 +246,14 @@
}
/*******************************************************************************
-**
-** Function btm_decode_ext_features_page
-**
-** Description This function is decodes a features page.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_decode_ext_features_page
+ *
+ * Description This function is decodes a features page.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_decode_ext_features_page (uint8_t page_number, const uint8_t *p_features)
{
BTM_TRACE_DEBUG ("btm_decode_ext_features_page page: %d", page_number);
@@ -421,14 +421,14 @@
}
/*******************************************************************************
-**
-** Function BTM_SetLocalDeviceName
-**
-** Description This function is called to set the local device name.
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetLocalDeviceName
+ *
+ * Description This function is called to set the local device name.
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetLocalDeviceName (char *p_name)
{
uint8_t *p;
@@ -450,18 +450,18 @@
/*******************************************************************************
-**
-** Function BTM_ReadLocalDeviceName
-**
-** Description This function is called to read the local device 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
-** is returned and p_name is set to NULL
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLocalDeviceName
+ *
+ * Description This function is called to read the local device 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
+ * is returned and p_name is set to NULL
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadLocalDeviceName (char **p_name)
{
*p_name = btm_cb.cfg.bd_name;
@@ -470,15 +470,15 @@
/*******************************************************************************
-**
-** Function BTM_ReadLocalDeviceNameFromController
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLocalDeviceNameFromController
+ *
+ * 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
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadLocalDeviceNameFromController (tBTM_CMPL_CB *p_rln_cmpl_cback)
{
/* Check if rln already in progress */
@@ -498,15 +498,15 @@
}
/*******************************************************************************
-**
-** Function btm_read_local_name_complete
-**
-** Description This function is called when local name read complete.
-** message is received from the HCI.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_local_name_complete
+ *
+ * Description This function is called when local name read complete.
+ * message is received from the HCI.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_local_name_complete (uint8_t *p,
UNUSED_ATTR uint16_t evt_len)
{
@@ -530,14 +530,14 @@
}
/*******************************************************************************
-**
-** Function BTM_SetDeviceClass
-**
-** Description This function is called to set the local device class
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetDeviceClass
+ *
+ * Description This function is called to set the local device class
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetDeviceClass (DEV_CLASS dev_class)
{
if(!memcmp (btm_cb.devcb.dev_class, dev_class, DEV_CLASS_LEN))
@@ -555,14 +555,14 @@
/*******************************************************************************
-**
-** Function BTM_ReadDeviceClass
-**
-** Description This function is called to read the local device class
-**
-** Returns pointer to the device class
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadDeviceClass
+ *
+ * Description This function is called to read the local device class
+ *
+ * Returns pointer to the device class
+ *
+ ******************************************************************************/
uint8_t *BTM_ReadDeviceClass (void)
{
return ((uint8_t *)btm_cb.devcb.dev_class);
@@ -570,14 +570,14 @@
/*******************************************************************************
-**
-** Function BTM_ReadLocalFeatures
-**
-** Description This function is called to read the local features
-**
-** Returns pointer to the local features string
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLocalFeatures
+ *
+ * Description This function is called to read the local features
+ *
+ * Returns pointer to the local features string
+ *
+ ******************************************************************************/
// TODO(zachoverflow): get rid of this function
uint8_t *BTM_ReadLocalFeatures (void)
{
@@ -586,19 +586,19 @@
}
/*******************************************************************************
-**
-** Function BTM_RegisterForDeviceStatusNotif
-**
-** Description This function is called to register for device status
-** change notifications.
-**
-** If one registration is already there calling function should
-** save the pointer to the function that is return and
-** call it when processing of the event is complete
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_RegisterForDeviceStatusNotif
+ *
+ * Description This function is called to register for device status
+ * change notifications.
+ *
+ * If one registration is already there calling function should
+ * save the pointer to the function that is return and
+ * call it when processing of the event is complete
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_DEV_STATUS_CB *BTM_RegisterForDeviceStatusNotif (tBTM_DEV_STATUS_CB *p_cb)
{
tBTM_DEV_STATUS_CB *p_prev = btm_cb.devcb.p_dev_status_cb;
@@ -608,15 +608,15 @@
}
/*******************************************************************************
-**
-** Function BTM_VendorSpecificCommand
-**
-** Description Send a vendor specific HCI command to the controller.
-**
-** Notes
-** Opcode will be OR'd with HCI_GRP_VENDOR_SPECIFIC.
-**
-*******************************************************************************/
+ *
+ * Function BTM_VendorSpecificCommand
+ *
+ * Description Send a vendor specific HCI command to the controller.
+ *
+ * Notes
+ * Opcode will be OR'd with HCI_GRP_VENDOR_SPECIFIC.
+ *
+ ******************************************************************************/
void BTM_VendorSpecificCommand(uint16_t opcode, uint8_t param_len,
uint8_t *p_param_buf, tBTM_VSC_CMPL_CB *p_cb)
{
@@ -633,15 +633,15 @@
/*******************************************************************************
-**
-** Function btm_vsc_complete
-**
-** Description This function is called when local HCI Vendor Specific
-** Command complete message is received from the HCI.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_vsc_complete
+ *
+ * Description This function is called when local HCI Vendor Specific
+ * Command complete message is received from the HCI.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_vsc_complete (uint8_t *p, uint16_t opcode, uint16_t evt_len,
tBTM_CMPL_CB *p_vsc_cplt_cback)
{
@@ -659,20 +659,20 @@
}
/*******************************************************************************
-**
-** Function BTM_RegisterForVSEvents
-**
-** Description This function is called to register/deregister for vendor
-** specific HCI events.
-**
-** If is_register=true, then the function will be registered;
-** if is_register=false, then the function will be deregistered.
-**
-** Returns BTM_SUCCESS if successful,
-** BTM_BUSY if maximum number of callbacks have already been
-** registered.
-**
-*******************************************************************************/
+ *
+ * Function BTM_RegisterForVSEvents
+ *
+ * Description This function is called to register/deregister for vendor
+ * specific HCI events.
+ *
+ * If is_register=true, then the function will be registered;
+ * if is_register=false, then the function will be deregistered.
+ *
+ * Returns BTM_SUCCESS if successful,
+ * BTM_BUSY if maximum number of callbacks have already been
+ * registered.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_RegisterForVSEvents (tBTM_VS_EVT_CB *p_cb, bool is_register)
{
tBTM_STATUS retval = BTM_SUCCESS;
@@ -719,17 +719,17 @@
}
/*******************************************************************************
-**
-** Function btm_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.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_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.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_vendor_specific_evt (uint8_t *p, uint8_t evt_len)
{
uint8_t i;
@@ -745,12 +745,12 @@
/*******************************************************************************
-**
-** Function BTM_WritePageTimeout
-**
-** Description Send HCI Write Page Timeout.
-**
-*******************************************************************************/
+ *
+ * Function BTM_WritePageTimeout
+ *
+ * Description Send HCI Write Page Timeout.
+ *
+ ******************************************************************************/
void BTM_WritePageTimeout(uint16_t timeout)
{
BTM_TRACE_EVENT ("BTM: BTM_WritePageTimeout: Timeout: %d.", timeout);
@@ -760,13 +760,13 @@
}
/*******************************************************************************
-**
-** Function BTM_WriteVoiceSettings
-**
-** Description Send HCI Write Voice Settings command.
-** See hcidefs.h for settings bitmask values.
-**
-*******************************************************************************/
+ *
+ * Function BTM_WriteVoiceSettings
+ *
+ * Description Send HCI Write Voice Settings command.
+ * See hcidefs.h for settings bitmask values.
+ *
+ ******************************************************************************/
void BTM_WriteVoiceSettings(uint16_t settings)
{
BTM_TRACE_EVENT ("BTM: BTM_WriteVoiceSettings: Settings: 0x%04x.", settings);
@@ -776,20 +776,20 @@
}
/*******************************************************************************
-**
-** Function BTM_EnableTestMode
-**
-** Description Send HCI the enable device under test command.
-**
-** Note: Controller can only be taken out of this mode by
-** resetting the controller.
-**
-** Returns
-** BTM_SUCCESS Command sent.
-** BTM_NO_RESOURCES If out of resources to send the command.
-**
-**
-*******************************************************************************/
+ *
+ * Function BTM_EnableTestMode
+ *
+ * Description Send HCI the enable device under test command.
+ *
+ * Note: Controller can only be taken out of this mode by
+ * resetting the controller.
+ *
+ * Returns
+ * BTM_SUCCESS Command sent.
+ * BTM_NO_RESOURCES If out of resources to send the command.
+ *
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_EnableTestMode(void)
{
uint8_t cond;
@@ -829,18 +829,18 @@
}
/*******************************************************************************
-**
-** Function BTM_DeleteStoredLinkKey
-**
-** Description This function is called to delete link key for the specified
-** device addresses from the NVRAM storage attached to the Bluetooth
-** controller.
-**
-** Parameters: bd_addr - Addresses of the devices
-** p_cb - Call back function to be called to return
-** the results
-**
-*******************************************************************************/
+ *
+ * Function BTM_DeleteStoredLinkKey
+ *
+ * Description This function is called to delete link key for the specified
+ * device addresses from the NVRAM storage attached to the Bluetooth
+ * controller.
+ *
+ * Parameters: bd_addr - Addresses of the devices
+ * p_cb - Call back function to be called to return
+ * the results
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_DeleteStoredLinkKey(BD_ADDR bd_addr, tBTM_CMPL_CB *p_cb)
{
BD_ADDR local_bd_addr;
@@ -869,15 +869,15 @@
}
/*******************************************************************************
-**
-** Function btm_delete_stored_link_key_complete
-**
-** Description This function is called when the command complete message
-** is received from the HCI for the delete stored link key command.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_delete_stored_link_key_complete
+ *
+ * Description This function is called when the command complete message
+ * is received from the HCI for the delete stored link key command.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_delete_stored_link_key_complete (uint8_t *p)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_stored_link_key_cmpl_cb;
@@ -901,16 +901,16 @@
}
/*******************************************************************************
-**
-** Function btm_report_device_status
-**
-** Description This function is called when there is a change in the device
-** status. This function will report the new device status to
-** the application
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_report_device_status
+ *
+ * Description This function is called when there is a change in the device
+ * status. This function will report the new device status to
+ * the application
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_report_device_status (tBTM_DEV_STATUS status)
{
tBTM_DEV_STATUS_CB *p_cb = btm_cb.devcb.p_dev_status_cb;
diff --git a/stack/btm/btm_inq.cc b/stack/btm/btm_inq.cc
index e8999bd..b0676ef 100644
--- a/stack/btm/btm_inq.cc
+++ b/stack/btm/btm_inq.cc
@@ -52,9 +52,9 @@
extern fixed_queue_t *btu_general_alarm_queue;
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L D A T A D E F I N I T I O N S */
-/********************************************************************************/
+/******************************************************************************/
static const LAP general_inq_lap = {0x9e,0x8b,0x33};
static const LAP limited_inq_lap = {0x9e,0x8b,0x00};
@@ -131,9 +131,9 @@
UUID_SERVCLASS_HDP_SINK
};
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void btm_initiate_inquiry (tBTM_INQUIRY_VAR_ST *p_inq);
static tBTM_STATUS btm_set_inq_event_filter (uint8_t filter_cond_type, tBTM_INQ_FILT_COND *p_filt_cond);
static void btm_clr_inq_result_flt (void);
@@ -145,21 +145,21 @@
static uint16_t btm_convert_uuid_to_uuid16( uint8_t *p_uuid, uint8_t uuid_size );
/*******************************************************************************
-**
-** Function BTM_SetDiscoverability
-**
-** Description This function is called to set the device into or out of
-** discoverable mode. Discoverable mode means inquiry
-** scans are enabled. If a value of '0' is entered for window or
-** interval, the default values are used.
-**
-** Returns BTM_SUCCESS if successful
-** BTM_BUSY if a setting of the filter is already in progress
-** BTM_NO_RESOURCES if couldn't get a memory pool buffer
-** BTM_ILLEGAL_VALUE if a bad parameter was detected
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetDiscoverability
+ *
+ * Description This function is called to set the device into or out of
+ * discoverable mode. Discoverable mode means inquiry
+ * scans are enabled. If a value of '0' is entered for window or
+ * interval, the default values are used.
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_BUSY if a setting of the filter is already in progress
+ * BTM_NO_RESOURCES if couldn't get a memory pool buffer
+ * BTM_ILLEGAL_VALUE if a bad parameter was detected
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetDiscoverability (uint16_t inq_mode, uint16_t window, uint16_t interval)
{
uint8_t scan_mode = 0;
@@ -273,17 +273,17 @@
}
/*******************************************************************************
-**
-** Function BTM_SetInquiryScanType
-**
-** Description This function is called to set the iquiry scan-type to
-** standard or interlaced.
-**
-** Returns BTM_SUCCESS if successful
-** BTM_MODE_UNSUPPORTED if not a 1.2 device
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetInquiryScanType
+ *
+ * Description This function is called to set the iquiry scan-type to
+ * standard or interlaced.
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_MODE_UNSUPPORTED if not a 1.2 device
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetInquiryScanType (uint16_t scan_type)
{
@@ -309,17 +309,17 @@
}
/*******************************************************************************
-**
-** Function BTM_SetPageScanType
-**
-** Description This function is called to set the page scan-type to
-** standard or interlaced.
-**
-** Returns BTM_SUCCESS if successful
-** BTM_MODE_UNSUPPORTED if not a 1.2 device
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPageScanType
+ *
+ * Description This function is called to set the page scan-type to
+ * standard or interlaced.
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_MODE_UNSUPPORTED if not a 1.2 device
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetPageScanType (uint16_t scan_type)
{
BTM_TRACE_API ("BTM_SetPageScanType");
@@ -345,20 +345,20 @@
/*******************************************************************************
-**
-** Function BTM_SetInquiryMode
-**
-** Description This function is called to set standard or with RSSI
-** mode of the inquiry for local device.
-**
-** Output Params: mode - standard, with RSSI, extended
-**
-** Returns BTM_SUCCESS if successful
-** BTM_NO_RESOURCES if couldn't get a memory pool buffer
-** BTM_ILLEGAL_VALUE if a bad parameter was detected
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetInquiryMode
+ *
+ * Description This function is called to set standard or with RSSI
+ * mode of the inquiry for local device.
+ *
+ * Output Params: mode - standard, with RSSI, extended
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_NO_RESOURCES if couldn't get a memory pool buffer
+ * BTM_ILLEGAL_VALUE if a bad parameter was detected
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetInquiryMode (uint8_t mode)
{
const controller_t *controller = controller_get_interface();
@@ -389,19 +389,19 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadDiscoverability
-**
-** Description This function is called to read the current discoverability
-** mode of the device.
-**
-** Output Params: p_window - current inquiry scan duration
-** p_interval - current inquiry scan interval
-**
-** Returns BTM_NON_DISCOVERABLE, BTM_LIMITED_DISCOVERABLE, or
-** BTM_GENERAL_DISCOVERABLE
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadDiscoverability
+ *
+ * Description This function is called to read the current discoverability
+ * mode of the device.
+ *
+ * Output Params: p_window - current inquiry scan duration
+ * p_interval - current inquiry scan interval
+ *
+ * Returns BTM_NON_DISCOVERABLE, BTM_LIMITED_DISCOVERABLE, or
+ * BTM_GENERAL_DISCOVERABLE
+ *
+ ******************************************************************************/
uint16_t BTM_ReadDiscoverability (uint16_t *p_window, uint16_t *p_interval)
{
BTM_TRACE_API ("BTM_ReadDiscoverability");
@@ -416,34 +416,34 @@
/*******************************************************************************
-**
-** Function BTM_SetPeriodicInquiryMode
-**
-** Description This function is called to set the device periodic inquiry mode.
-** If the duration is zero, the periodic inquiry mode is cancelled.
-**
-** Note: We currently do not allow concurrent inquiry and periodic inquiry.
-**
-** Parameters: p_inqparms - pointer to the inquiry information
-** mode - GENERAL or LIMITED inquiry
-** duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
-** max_resps - maximum amount of devices to search for before ending the inquiry
-** filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
-** BTM_FILTER_COND_BD_ADDR
-** filter_cond - value for the filter (based on filter_cond_type)
-**
-** max_delay - maximum amount of time between successive inquiries
-** min_delay - minimum amount of time between successive inquiries
-** p_results_cb - callback returning pointer to results (tBTM_INQ_RESULTS)
-**
-** Returns BTM_CMD_STARTED if successfully started
-** BTM_ILLEGAL_VALUE if a bad parameter is detected
-** BTM_NO_RESOURCES if could not allocate a message buffer
-** BTM_SUCCESS - if cancelling the periodic inquiry
-** BTM_BUSY - if an inquiry is already active
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPeriodicInquiryMode
+ *
+ * Description This function is called to set the device periodic inquiry mode.
+ * If the duration is zero, the periodic inquiry mode is cancelled.
+ *
+ * Note: We currently do not allow concurrent inquiry and periodic inquiry.
+ *
+ * Parameters: p_inqparms - pointer to the inquiry information
+ * mode - GENERAL or LIMITED inquiry
+ * duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
+ * max_resps - maximum amount of devices to search for before ending the inquiry
+ * filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
+ * BTM_FILTER_COND_BD_ADDR
+ * filter_cond - value for the filter (based on filter_cond_type)
+ *
+ * max_delay - maximum amount of time between successive inquiries
+ * min_delay - minimum amount of time between successive inquiries
+ * p_results_cb - callback returning pointer to results (tBTM_INQ_RESULTS)
+ *
+ * Returns BTM_CMD_STARTED if successfully started
+ * BTM_ILLEGAL_VALUE if a bad parameter is detected
+ * BTM_NO_RESOURCES if could not allocate a message buffer
+ * BTM_SUCCESS - if cancelling the periodic inquiry
+ * BTM_BUSY - if an inquiry is already active
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetPeriodicInquiryMode (tBTM_INQ_PARMS *p_inqparms, uint16_t max_delay,
uint16_t min_delay, tBTM_INQ_RESULTS_CB *p_results_cb)
{
@@ -520,17 +520,17 @@
/*******************************************************************************
-**
-** Function BTM_CancelPeriodicInquiry
-**
-** Description This function cancels a periodic inquiry
-**
-** Returns
-** BTM_NO_RESOURCES if could not allocate a message buffer
-** BTM_SUCCESS - if cancelling the periodic inquiry
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_CancelPeriodicInquiry
+ *
+ * Description This function cancels a periodic inquiry
+ *
+ * Returns
+ * BTM_NO_RESOURCES if could not allocate a message buffer
+ * BTM_SUCCESS - if cancelling the periodic inquiry
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_CancelPeriodicInquiry(void)
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -563,18 +563,18 @@
/*******************************************************************************
-**
-** Function BTM_SetConnectability
-**
-** Description This function is called to set the device into or out of
-** connectable mode. Discoverable mode means page scans enabled.
-**
-** Returns BTM_SUCCESS if successful
-** BTM_ILLEGAL_VALUE if a bad parameter is detected
-** BTM_NO_RESOURCES if could not allocate a message buffer
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetConnectability
+ *
+ * Description This function is called to set the device into or out of
+ * connectable mode. Discoverable mode means page scans enabled.
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_ILLEGAL_VALUE if a bad parameter is detected
+ * BTM_NO_RESOURCES if could not allocate a message buffer
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetConnectability (uint16_t page_mode, uint16_t window, uint16_t interval)
{
uint8_t scan_mode = 0;
@@ -648,17 +648,17 @@
/*******************************************************************************
-**
-** Function BTM_ReadConnectability
-**
-** Description This function is called to read the current discoverability
-** mode of the device.
-** Output Params p_window - current page scan duration
-** p_interval - current time between page scans
-**
-** Returns BTM_NON_CONNECTABLE or BTM_CONNECTABLE
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadConnectability
+ *
+ * Description This function is called to read the current discoverability
+ * mode of the device.
+ * Output Params p_window - current page scan duration
+ * p_interval - current time between page scans
+ *
+ * Returns BTM_NON_CONNECTABLE or BTM_CONNECTABLE
+ *
+ ******************************************************************************/
uint16_t BTM_ReadConnectability (uint16_t *p_window, uint16_t *p_interval)
{
BTM_TRACE_API ("BTM_ReadConnectability");
@@ -674,17 +674,17 @@
/*******************************************************************************
-**
-** Function BTM_IsInquiryActive
-**
-** Description This function returns a bit mask of the current inquiry state
-**
-** Returns BTM_INQUIRY_INACTIVE if inactive (0)
-** BTM_LIMITED_INQUIRY_ACTIVE if a limted inquiry is active
-** BTM_GENERAL_INQUIRY_ACTIVE if a general inquiry is active
-** BTM_PERIODIC_INQUIRY_ACTIVE if a periodic inquiry is active
-**
-*******************************************************************************/
+ *
+ * Function BTM_IsInquiryActive
+ *
+ * Description This function returns a bit mask of the current inquiry state
+ *
+ * Returns BTM_INQUIRY_INACTIVE if inactive (0)
+ * BTM_LIMITED_INQUIRY_ACTIVE if a limted inquiry is active
+ * BTM_GENERAL_INQUIRY_ACTIVE if a general inquiry is active
+ * BTM_PERIODIC_INQUIRY_ACTIVE if a periodic inquiry is active
+ *
+ ******************************************************************************/
uint16_t BTM_IsInquiryActive (void)
{
BTM_TRACE_API ("BTM_IsInquiryActive");
@@ -695,16 +695,16 @@
/*******************************************************************************
-**
-** Function BTM_CancelInquiry
-**
-** Description This function cancels an inquiry if active
-**
-** Returns BTM_SUCCESS if successful
-** BTM_NO_RESOURCES if could not allocate a message buffer
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_CancelInquiry
+ *
+ * Description This function cancels an inquiry if active
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_NO_RESOURCES if could not allocate a message buffer
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_CancelInquiry(void)
{
tBTM_STATUS status = BTM_SUCCESS;
@@ -767,34 +767,34 @@
/*******************************************************************************
-**
-** Function BTM_StartInquiry
-**
-** Description This function is called to start an inquiry.
-**
-** Parameters: p_inqparms - pointer to the inquiry information
-** mode - GENERAL or LIMITED inquiry, BR/LE bit mask seperately
-** duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
-** max_resps - maximum amount of devices to search for before ending the inquiry
-** filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
-** BTM_FILTER_COND_BD_ADDR
-** filter_cond - value for the filter (based on filter_cond_type)
-**
-** p_results_cb - Pointer to the callback routine which gets called
-** upon receipt of an inquiry result. If this field is
-** NULL, the application is not notified.
-**
-** p_cmpl_cb - Pointer to the callback routine which gets called
-** upon completion. If this field is NULL, the
-** application is not notified when completed.
-** Returns tBTM_STATUS
-** BTM_CMD_STARTED if successfully initiated
-** BTM_BUSY if already in progress
-** BTM_ILLEGAL_VALUE if parameter(s) are out of range
-** BTM_NO_RESOURCES if could not allocate resources to start the command
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_StartInquiry
+ *
+ * Description This function is called to start an inquiry.
+ *
+ * Parameters: p_inqparms - pointer to the inquiry information
+ * mode - GENERAL or LIMITED inquiry, BR/LE bit mask seperately
+ * duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
+ * max_resps - maximum amount of devices to search for before ending the inquiry
+ * filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
+ * BTM_FILTER_COND_BD_ADDR
+ * filter_cond - value for the filter (based on filter_cond_type)
+ *
+ * p_results_cb - Pointer to the callback routine which gets called
+ * upon receipt of an inquiry result. If this field is
+ * NULL, the application is not notified.
+ *
+ * p_cmpl_cb - Pointer to the callback routine which gets called
+ * upon completion. If this field is NULL, the
+ * application is not notified when completed.
+ * Returns tBTM_STATUS
+ * BTM_CMD_STARTED if successfully initiated
+ * BTM_BUSY if already in progress
+ * BTM_ILLEGAL_VALUE if parameter(s) are out of range
+ * BTM_NO_RESOURCES if could not allocate resources to start the command
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_StartInquiry (tBTM_INQ_PARMS *p_inqparms, tBTM_INQ_RESULTS_CB *p_results_cb,
tBTM_CMPL_CB *p_cmpl_cb)
{
@@ -993,27 +993,27 @@
/*******************************************************************************
-**
-** Function BTM_ReadRemoteDeviceName
-**
-** Description This function initiates a remote device HCI command to the
-** controller and calls the callback when the process has completed.
-**
-** Input Params: remote_bda - device address of name to retrieve
-** p_cb - callback function called when BTM_CMD_STARTED
-** is returned.
-** A pointer to tBTM_REMOTE_DEV_NAME is passed to the
-** callback.
-**
-** Returns
-** BTM_CMD_STARTED is returned if the request was successfully sent
-** to HCI.
-** BTM_BUSY if already in progress
-** BTM_UNKNOWN_ADDR if device address is bad
-** BTM_NO_RESOURCES if could not allocate resources to start the command
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRemoteDeviceName
+ *
+ * Description This function initiates a remote device HCI command to the
+ * controller and calls the callback when the process has completed.
+ *
+ * Input Params: remote_bda - device address of name to retrieve
+ * p_cb - callback function called when BTM_CMD_STARTED
+ * is returned.
+ * A pointer to tBTM_REMOTE_DEV_NAME is passed to the
+ * callback.
+ *
+ * Returns
+ * BTM_CMD_STARTED is returned if the request was successfully sent
+ * to HCI.
+ * BTM_BUSY if already in progress
+ * BTM_UNKNOWN_ADDR if device address is bad
+ * BTM_NO_RESOURCES if could not allocate resources to start the command
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadRemoteDeviceName (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb
,tBT_TRANSPORT transport)
{
@@ -1047,21 +1047,21 @@
}
/*******************************************************************************
-**
-** Function BTM_CancelRemoteDeviceName
-**
-** Description This function initiates the cancel request for the specified
-** remote device.
-**
-** Input Params: None
-**
-** Returns
-** BTM_CMD_STARTED is returned if the request was successfully sent
-** to HCI.
-** BTM_NO_RESOURCES if could not allocate resources to start the command
-** BTM_WRONG_MODE if there is not an active remote name request.
-**
-*******************************************************************************/
+ *
+ * Function BTM_CancelRemoteDeviceName
+ *
+ * Description This function initiates the cancel request for the specified
+ * remote device.
+ *
+ * Input Params: None
+ *
+ * Returns
+ * BTM_CMD_STARTED is returned if the request was successfully sent
+ * to HCI.
+ * BTM_NO_RESOURCES if could not allocate resources to start the command
+ * BTM_WRONG_MODE if there is not an active remote name request.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_CancelRemoteDeviceName (void)
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -1087,16 +1087,16 @@
}
/*******************************************************************************
-**
-** Function BTM_InqDbRead
-**
-** Description This function looks through the inquiry database for a match
-** based on Bluetooth Device Address. This is the application's
-** interface to get the inquiry details of a specific BD address.
-**
-** Returns pointer to entry, or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function BTM_InqDbRead
+ *
+ * Description This function looks through the inquiry database for a match
+ * based on Bluetooth Device Address. This is the application's
+ * interface to get the inquiry details of a specific BD address.
+ *
+ * Returns pointer to entry, or NULL if not found
+ *
+ ******************************************************************************/
tBTM_INQ_INFO *BTM_InqDbRead (const BD_ADDR p_bda)
{
BTM_TRACE_API ("BTM_InqDbRead: bd addr [%02x%02x%02x%02x%02x%02x]",
@@ -1111,17 +1111,17 @@
/*******************************************************************************
-**
-** Function BTM_InqDbFirst
-**
-** Description This function looks through the inquiry database for the first
-** used entry, and returns that. This is used in conjunction with
-** BTM_InqDbNext by applications as a way to walk through the
-** inquiry database.
-**
-** Returns pointer to first in-use entry, or NULL if DB is empty
-**
-*******************************************************************************/
+ *
+ * Function BTM_InqDbFirst
+ *
+ * Description This function looks through the inquiry database for the first
+ * used entry, and returns that. This is used in conjunction with
+ * BTM_InqDbNext by applications as a way to walk through the
+ * inquiry database.
+ *
+ * Returns pointer to first in-use entry, or NULL if DB is empty
+ *
+ ******************************************************************************/
tBTM_INQ_INFO *BTM_InqDbFirst (void)
{
uint16_t xx;
@@ -1139,16 +1139,16 @@
/*******************************************************************************
-**
-** Function BTM_InqDbNext
-**
-** Description This function looks through the inquiry database for the next
-** used entry, and returns that. If the input parameter is NULL,
-** the first entry is returned.
-**
-** Returns pointer to next in-use entry, or NULL if no more found.
-**
-*******************************************************************************/
+ *
+ * Function BTM_InqDbNext
+ *
+ * Description This function looks through the inquiry database for the next
+ * used entry, and returns that. If the input parameter is NULL,
+ * the first entry is returned.
+ *
+ * Returns pointer to next in-use entry, or NULL if no more found.
+ *
+ ******************************************************************************/
tBTM_INQ_INFO *BTM_InqDbNext (tBTM_INQ_INFO *p_cur)
{
tINQ_DB_ENT *p_ent;
@@ -1174,19 +1174,19 @@
/*******************************************************************************
-**
-** Function BTM_ClearInqDb
-**
-** Description This function is called to clear out a device or all devices
-** from the inquiry database.
-**
-** Parameter p_bda - (input) BD_ADDR -> Address of device to clear
-** (NULL clears all entries)
-**
-** Returns BTM_BUSY if an inquiry, get remote name, or event filter
-** is active, otherwise BTM_SUCCESS
-**
-*******************************************************************************/
+ *
+ * Function BTM_ClearInqDb
+ *
+ * Description This function is called to clear out a device or all devices
+ * from the inquiry database.
+ *
+ * Parameter p_bda - (input) BD_ADDR -> Address of device to clear
+ * (NULL clears all entries)
+ *
+ * Returns BTM_BUSY if an inquiry, get remote name, or event filter
+ * is active, otherwise BTM_SUCCESS
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ClearInqDb (BD_ADDR p_bda)
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -1202,16 +1202,16 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadInquiryRspTxPower
-**
-** Description This command will read the inquiry Transmit Power level used
-** 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
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadInquiryRspTxPower
+ *
+ * Description This command will read the inquiry Transmit Power level used
+ * 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
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadInquiryRspTxPower (tBTM_CMPL_CB *p_cb)
{
if (btm_cb.devcb.p_inq_tx_power_cmpl_cb)
@@ -1227,23 +1227,23 @@
return (BTM_CMD_STARTED);
}
-/*********************************************************************************
-**********************************************************************************
-** **
-** BTM Internal Inquiry Functions **
-** **
-**********************************************************************************
-*********************************************************************************/
/*******************************************************************************
-**
-** Function btm_inq_db_reset
-**
-** Description This function is called at at reset to clear the inquiry
-** database & pending callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *******************************************************************************
+ * **
+ * BTM Internal Inquiry Functions **
+ * **
+ *******************************************************************************
+ ******************************************************************************/
+/*******************************************************************************
+ *
+ * Function btm_inq_db_reset
+ *
+ * Description This function is called at at reset to clear the inquiry
+ * database & pending callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_inq_db_reset (void)
{
tBTM_REMOTE_DEV_NAME rem_name;
@@ -1316,16 +1316,16 @@
}
-/*********************************************************************************
-**
-** Function btm_inq_db_init
-**
-** Description This function is called at startup to initialize the inquiry
-** database.
-**
-** Returns void
-**
-*******************************************************************************/
+/*******************************************************************************
+ *
+ * Function btm_inq_db_init
+ *
+ * Description This function is called at startup to initialize the inquiry
+ * database.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_inq_db_init (void)
{
alarm_free(btm_cb.btm_inq_vars.remote_name_timer);
@@ -1334,15 +1334,15 @@
btm_cb.btm_inq_vars.no_inc_ssp = BTM_NO_SSP_ON_INQUIRY;
}
-/*********************************************************************************
-**
-** Function btm_inq_stop_on_ssp
-**
-** Description This function is called on incoming SSP
-**
-** Returns void
-**
-*******************************************************************************/
+/*******************************************************************************
+ *
+ * Function btm_inq_stop_on_ssp
+ *
+ * Description This function is called on incoming SSP
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_inq_stop_on_ssp(void)
{
uint8_t normal_active = (BTM_GENERAL_INQUIRY_ACTIVE|BTM_LIMITED_INQUIRY_ACTIVE);
@@ -1370,33 +1370,33 @@
}
}
-/*********************************************************************************
-**
-** Function btm_inq_clear_ssp
-**
-** Description This function is called when pairing_state becomes idle
-**
-** Returns void
-**
-*******************************************************************************/
+/*******************************************************************************
+ *
+ * Function btm_inq_clear_ssp
+ *
+ * Description This function is called when pairing_state becomes idle
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_inq_clear_ssp(void)
{
btm_cb.btm_inq_vars.inq_active &= ~BTM_SSP_INQUIRY_ACTIVE;
}
-/*********************************************************************************
-**
-** Function btm_clr_inq_db
-**
-** Description This function is called to clear out a device or all devices
-** from the inquiry database.
-**
-** Parameter p_bda - (input) BD_ADDR -> Address of device to clear
-** (NULL clears all entries)
-**
-** Returns void
-**
-*******************************************************************************/
+/*******************************************************************************
+ *
+ * Function btm_clr_inq_db
+ *
+ * Description This function is called to clear out a device or all devices
+ * from the inquiry database.
+ *
+ * Parameter p_bda - (input) BD_ADDR -> Address of device to clear
+ * (NULL clears all entries)
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_clr_inq_db (BD_ADDR p_bda)
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -1427,15 +1427,15 @@
/*******************************************************************************
-**
-** Function btm_clr_inq_result_flt
-**
-** Description This function looks through the bdaddr database for a match
-** based on Bluetooth Device Address
-**
-** Returns true if found, else false (new entry)
-**
-*******************************************************************************/
+ *
+ * Function btm_clr_inq_result_flt
+ *
+ * Description This function looks through the bdaddr database for a match
+ * based on Bluetooth Device Address
+ *
+ * Returns true if found, else false (new entry)
+ *
+ ******************************************************************************/
static void btm_clr_inq_result_flt (void)
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -1446,15 +1446,15 @@
}
/*******************************************************************************
-**
-** Function btm_inq_find_bdaddr
-**
-** Description This function looks through the bdaddr database for a match
-** based on Bluetooth Device Address
-**
-** Returns true if found, else false (new entry)
-**
-*******************************************************************************/
+ *
+ * Function btm_inq_find_bdaddr
+ *
+ * Description This function looks through the bdaddr database for a match
+ * based on Bluetooth Device Address
+ *
+ * Returns true if found, else false (new entry)
+ *
+ ******************************************************************************/
bool btm_inq_find_bdaddr (BD_ADDR p_bda)
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -1484,15 +1484,15 @@
}
/*******************************************************************************
-**
-** Function btm_inq_db_find
-**
-** Description This function looks through the inquiry database for a match
-** based on Bluetooth Device Address
-**
-** Returns pointer to entry, or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function btm_inq_db_find
+ *
+ * Description This function looks through the inquiry database for a match
+ * based on Bluetooth Device Address
+ *
+ * Returns pointer to entry, or NULL if not found
+ *
+ ******************************************************************************/
tINQ_DB_ENT *btm_inq_db_find (const BD_ADDR p_bda)
{
uint16_t xx;
@@ -1510,15 +1510,15 @@
/*******************************************************************************
-**
-** Function btm_inq_db_new
-**
-** Description This function looks through the inquiry database for an unused
-** entry. If no entry is free, it allocates the oldest entry.
-**
-** Returns pointer to entry
-**
-*******************************************************************************/
+ *
+ * Function btm_inq_db_new
+ *
+ * Description This function looks through the inquiry database for an unused
+ * entry. If no entry is free, it allocates the oldest entry.
+ *
+ * Returns pointer to entry
+ *
+ ******************************************************************************/
tINQ_DB_ENT *btm_inq_db_new (BD_ADDR p_bda)
{
uint16_t xx;
@@ -1555,28 +1555,28 @@
/*******************************************************************************
-**
-** Function btm_set_inq_event_filter
-**
-** Description This function is called to set the inquiry event filter.
-** It is called by either internally, or by the external API function
-** (BTM_SetInqEventFilter). It is used internally as part of the
-** inquiry processing.
-**
-** 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
-** BTM_CLR_INQUIRY_FILTER
-**
-** p_filt_cond - this is either a BD_ADDR or DEV_CLASS depending on the
-** filter_cond_type (See section 4.7.3 of Core Spec 1.0b).
-**
-** Returns BTM_CMD_STARTED if successfully initiated
-** BTM_NO_RESOURCES if couldn't get a memory pool buffer
-** BTM_ILLEGAL_VALUE if a bad parameter was detected
-**
-*******************************************************************************/
+ *
+ * Function btm_set_inq_event_filter
+ *
+ * Description This function is called to set the inquiry event filter.
+ * It is called by either internally, or by the external API function
+ * (BTM_SetInqEventFilter). It is used internally as part of the
+ * inquiry processing.
+ *
+ * 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
+ * BTM_CLR_INQUIRY_FILTER
+ *
+ * p_filt_cond - this is either a BD_ADDR or DEV_CLASS depending on the
+ * filter_cond_type (See section 4.7.3 of Core Spec 1.0b).
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated
+ * BTM_NO_RESOURCES if couldn't get a memory pool buffer
+ * BTM_ILLEGAL_VALUE if a bad parameter was detected
+ *
+ ******************************************************************************/
static tBTM_STATUS btm_set_inq_event_filter (uint8_t filter_cond_type,
tBTM_INQ_FILT_COND *p_filt_cond)
{
@@ -1628,16 +1628,16 @@
/*******************************************************************************
-**
-** Function btm_event_filter_complete
-**
-** Description This function is called when a set event filter has completed.
-** Note: This routine currently only handles inquiry filters.
-** Connection filters are ignored for now.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_event_filter_complete
+ *
+ * Description This function is called when a set event filter has completed.
+ * Note: This routine currently only handles inquiry filters.
+ * Connection filters are ignored for now.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_event_filter_complete (uint8_t *p)
{
uint8_t hci_status;
@@ -1723,23 +1723,23 @@
/*******************************************************************************
-**
-** Function btm_initiate_inquiry
-**
-** Description This function is called to start an inquiry or periodic inquiry
-** upon completion of the setting and/or clearing of the inquiry filter.
-**
-** Inputs: p_inq (btm_cb.btm_inq_vars) - pointer to saved inquiry information
-** mode - GENERAL or LIMITED inquiry
-** duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
-** max_resps - maximum amount of devices to search for before ending the inquiry
-** filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
-** BTM_FILTER_COND_BD_ADDR
-** filter_cond - value for the filter (based on filter_cond_type)
-**
-** Returns If an error occurs the initiator's callback is called with the error status.
-**
-*******************************************************************************/
+ *
+ * Function btm_initiate_inquiry
+ *
+ * Description This function is called to start an inquiry or periodic inquiry
+ * upon completion of the setting and/or clearing of the inquiry filter.
+ *
+ * Inputs: p_inq (btm_cb.btm_inq_vars) - pointer to saved inquiry information
+ * mode - GENERAL or LIMITED inquiry
+ * duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
+ * max_resps - maximum amount of devices to search for before ending the inquiry
+ * filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
+ * BTM_FILTER_COND_BD_ADDR
+ * filter_cond - value for the filter (based on filter_cond_type)
+ *
+ * Returns If an error occurs the initiator's callback is called with the error status.
+ *
+ ******************************************************************************/
static void btm_initiate_inquiry (tBTM_INQUIRY_VAR_ST *p_inq)
{
const LAP *lap;
@@ -1782,20 +1782,20 @@
}
/*******************************************************************************
-**
-** Function btm_process_inq_results
-**
-** Description This function is called when inquiry results are received from
-** the device. It updates the inquiry database. If the inquiry
-** database is full, the oldest entry is discarded.
-**
-** Parameters inq_res_mode - BTM_INQ_RESULT_STANDARD
-** BTM_INQ_RESULT_WITH_RSSI
-** BTM_INQ_RESULT_EXTENDED
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_process_inq_results
+ *
+ * Description This function is called when inquiry results are received from
+ * the device. It updates the inquiry database. If the inquiry
+ * database is full, the oldest entry is discarded.
+ *
+ * Parameters inq_res_mode - BTM_INQ_RESULT_STANDARD
+ * BTM_INQ_RESULT_WITH_RSSI
+ * BTM_INQ_RESULT_EXTENDED
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_process_inq_results (uint8_t *p, uint8_t inq_res_mode)
{
uint8_t num_resp, xx;
@@ -1990,15 +1990,15 @@
}
/*******************************************************************************
-**
-** Function btm_sort_inq_result
-**
-** Description This function is called when inquiry complete is received
-** from the device to sort inquiry results based on rssi.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sort_inq_result
+ *
+ * Description This function is called when inquiry complete is received
+ * from the device to sort inquiry results based on rssi.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sort_inq_result(void)
{
uint8_t xx, yy, num_resp;
@@ -2025,18 +2025,18 @@
}
/*******************************************************************************
-**
-** Function btm_process_inq_complete
-**
-** Description This function is called when inquiry complete is received
-** from the device. Call the callback if not in periodic inquiry
-** mode AND it is not NULL (The caller wants the event).
-**
-** The callback pass back the status and the number of responses
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_process_inq_complete
+ *
+ * Description This function is called when inquiry complete is received
+ * from the device. Call the callback if not in periodic inquiry
+ * mode AND it is not NULL (The caller wants the event).
+ *
+ * The callback pass back the status and the number of responses
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_process_inq_complete (uint8_t status, uint8_t mode)
{
tBTM_CMPL_CB *p_inq_cb = btm_cb.btm_inq_vars.p_inq_cmpl_cb;
@@ -2135,42 +2135,42 @@
}
/*******************************************************************************
-**
-** Function btm_process_cancel_complete
-**
-** Description This function is called when inquiry cancel complete is received
-** from the device.This function will also call the btm_process_inq_complete
-** This function is needed to differentiate a cancel_cmpl_evt from the
-** inq_cmpl_evt
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_process_cancel_complete
+ *
+ * Description This function is called when inquiry cancel complete is received
+ * from the device.This function will also call the btm_process_inq_complete
+ * This function is needed to differentiate a cancel_cmpl_evt from the
+ * inq_cmpl_evt
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_process_cancel_complete(uint8_t status, uint8_t mode)
{
btm_acl_update_busy_level (BTM_BLI_INQ_CANCEL_EVT);
btm_process_inq_complete(status, mode);
}
/*******************************************************************************
-**
-** Function btm_initiate_rem_name
-**
-** Description This function looks initiates a remote name request. It is called
-** either by GAP or by the API call BTM_ReadRemoteDeviceName.
-**
-** Input Params: p_cur - pointer to an inquiry result structure (NULL if nonexistent)
-** p_cb - callback function called when BTM_CMD_STARTED
-** is returned.
-** A pointer to tBTM_REMOTE_DEV_NAME is passed to the
-** callback.
-**
-** Returns
-** BTM_CMD_STARTED is returned if the request was sent to HCI.
-** BTM_BUSY if already in progress
-** BTM_NO_RESOURCES if could not allocate resources to start the command
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function btm_initiate_rem_name
+ *
+ * Description This function looks initiates a remote name request. It is called
+ * either by GAP or by the API call BTM_ReadRemoteDeviceName.
+ *
+ * Input Params: p_cur - pointer to an inquiry result structure (NULL if nonexistent)
+ * p_cb - callback function called when BTM_CMD_STARTED
+ * is returned.
+ * A pointer to tBTM_REMOTE_DEV_NAME is passed to the
+ * callback.
+ *
+ * Returns
+ * BTM_CMD_STARTED is returned if the request was sent to HCI.
+ * BTM_BUSY if already in progress
+ * BTM_NO_RESOURCES if could not allocate resources to start the command
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur,
uint8_t origin, period_ms_t timeout_ms,
tBTM_CMPL_CB *p_cb)
@@ -2231,16 +2231,16 @@
}
/*******************************************************************************
-**
-** Function btm_process_remote_name
-**
-** Description This function is called when a remote name is received from
-** the device. If remote names are cached, it updates the inquiry
-** database.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_process_remote_name
+ *
+ * Description This function is called when a remote name is received from
+ * the device. If remote names are cached, it updates the inquiry
+ * database.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, uint16_t evt_len, uint8_t hci_status)
{
tBTM_REMOTE_DEV_NAME rem_name;
@@ -2322,16 +2322,16 @@
}
/*******************************************************************************
-**
-** Function btm_inq_rmt_name_failed
-**
-** Description This function is if timeout expires while getting remote
-** name. This is done for devices that incorrectly do not
-** report operation failure
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_inq_rmt_name_failed
+ *
+ * Description This function is if timeout expires while getting remote
+ * name. This is done for devices that incorrectly do not
+ * report operation failure
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_inq_rmt_name_failed (void)
{
BTM_TRACE_ERROR ("btm_inq_rmt_name_failed() remname_active=%d", btm_cb.btm_inq_vars.remname_active);
@@ -2345,14 +2345,14 @@
}
/*******************************************************************************
-**
-** Function btm_read_inq_tx_power_timeout
-**
-** Description Callback when reading the inquiry tx power times out.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_inq_tx_power_timeout
+ *
+ * Description Callback when reading the inquiry tx power times out.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_inq_tx_power_timeout(UNUSED_ATTR void *data)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_inq_tx_power_cmpl_cb;
@@ -2362,14 +2362,14 @@
}
/*******************************************************************************
-**
-** Function btm_read_inq_tx_power_complete
-**
-** Description read inquiry tx power level complete callback function.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_inq_tx_power_complete
+ *
+ * Description read inquiry tx power level complete callback function.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_inq_tx_power_complete(uint8_t *p)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_inq_tx_power_cmpl_cb;
@@ -2400,18 +2400,18 @@
}
/*******************************************************************************
-**
-** Function BTM_WriteEIR
-**
-** Description This function is called to write EIR data to controller.
-**
-** Parameters p_buff - allocated HCI command buffer including extended
-** inquriry response
-**
-** Returns BTM_SUCCESS - if successful
-** BTM_MODE_UNSUPPORTED - if local device cannot support it
-**
-*******************************************************************************/
+ *
+ * Function BTM_WriteEIR
+ *
+ * Description This function is called to write EIR data to controller.
+ *
+ * Parameters p_buff - allocated HCI command buffer including extended
+ * inquriry response
+ *
+ * Returns BTM_SUCCESS - if successful
+ * BTM_MODE_UNSUPPORTED - if local device cannot support it
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_WriteEIR( BT_HDR *p_buff )
{
if (controller_get_interface()->supports_extended_inquiry_response())
@@ -2428,18 +2428,18 @@
}
/*******************************************************************************
-**
-** Function BTM_CheckEirData
-**
-** Description This function is called to get EIR data from significant part.
-**
-** Parameters p_eir - pointer of EIR significant part
-** type - finding EIR data type
-** p_length - return the length of EIR data not including type
-**
-** Returns pointer of EIR data
-**
-*******************************************************************************/
+ *
+ * Function BTM_CheckEirData
+ *
+ * Description This function is called to get EIR data from significant part.
+ *
+ * Parameters p_eir - pointer of EIR significant part
+ * type - finding EIR data type
+ * p_length - return the length of EIR data not including type
+ *
+ * Returns pointer of EIR data
+ *
+ ******************************************************************************/
uint8_t *BTM_CheckEirData( uint8_t *p_eir, uint8_t type, uint8_t *p_length )
{
uint8_t *p = p_eir;
@@ -2466,17 +2466,17 @@
}
/*******************************************************************************
-**
-** Function btm_convert_uuid_to_eir_service
-**
-** Description This function is called to get the bit position of UUID.
-**
-** Parameters uuid16 - UUID 16-bit
-**
-** Returns BTM EIR service ID if found
-** BTM_EIR_MAX_SERVICES - if not found
-**
-*******************************************************************************/
+ *
+ * Function btm_convert_uuid_to_eir_service
+ *
+ * Description This function is called to get the bit position of UUID.
+ *
+ * Parameters uuid16 - UUID 16-bit
+ *
+ * Returns BTM EIR service ID if found
+ * BTM_EIR_MAX_SERVICES - if not found
+ *
+ ******************************************************************************/
static uint8_t btm_convert_uuid_to_eir_service( uint16_t uuid16 )
{
uint8_t xx;
@@ -2492,18 +2492,18 @@
}
/*******************************************************************************
-**
-** Function BTM_HasEirService
-**
-** Description This function is called to know if UUID in bit map of UUID.
-**
-** Parameters p_eir_uuid - bit map of UUID list
-** uuid16 - UUID 16-bit
-**
-** Returns true - if found
-** false - if not found
-**
-*******************************************************************************/
+ *
+ * Function BTM_HasEirService
+ *
+ * Description This function is called to know if UUID in bit map of UUID.
+ *
+ * Parameters p_eir_uuid - bit map of UUID list
+ * uuid16 - UUID 16-bit
+ *
+ * Returns true - if found
+ * false - if not found
+ *
+ ******************************************************************************/
bool BTM_HasEirService( uint32_t *p_eir_uuid, uint16_t uuid16 )
{
uint8_t service_id;
@@ -2516,19 +2516,19 @@
}
/*******************************************************************************
-**
-** Function BTM_HasInquiryEirService
-**
-** Description This function is called to know if UUID in bit map of UUID list.
-**
-** Parameters p_results - inquiry results
-** uuid16 - UUID 16-bit
-**
-** Returns BTM_EIR_FOUND - if found
-** BTM_EIR_NOT_FOUND - if not found and it is complete list
-** BTM_EIR_UNKNOWN - if not found and it is not complete list
-**
-*******************************************************************************/
+ *
+ * Function BTM_HasInquiryEirService
+ *
+ * Description This function is called to know if UUID in bit map of UUID list.
+ *
+ * Parameters p_results - inquiry results
+ * uuid16 - UUID 16-bit
+ *
+ * Returns BTM_EIR_FOUND - if found
+ * BTM_EIR_NOT_FOUND - if not found and it is complete list
+ * BTM_EIR_UNKNOWN - if not found and it is not complete list
+ *
+ ******************************************************************************/
tBTM_EIR_SEARCH_RESULT BTM_HasInquiryEirService( tBTM_INQ_RESULTS *p_results, uint16_t uuid16 )
{
if( BTM_HasEirService( p_results->eir_uuid, uuid16 ))
@@ -2544,17 +2544,17 @@
}
/*******************************************************************************
-**
-** Function BTM_AddEirService
-**
-** Description This function is called to add a service in bit map of UUID list.
-**
-** Parameters p_eir_uuid - bit mask of UUID list for EIR
-** uuid16 - UUID 16-bit
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function BTM_AddEirService
+ *
+ * Description This function is called to add a service in bit map of UUID list.
+ *
+ * Parameters p_eir_uuid - bit mask of UUID list for EIR
+ * uuid16 - UUID 16-bit
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void BTM_AddEirService( uint32_t *p_eir_uuid, uint16_t uuid16 )
{
uint8_t service_id;
@@ -2565,17 +2565,17 @@
}
/*******************************************************************************
-**
-** Function BTM_RemoveEirService
-**
-** Description This function is called to remove a service in bit map of UUID list.
-**
-** Parameters p_eir_uuid - bit mask of UUID list for EIR
-** uuid16 - UUID 16-bit
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function BTM_RemoveEirService
+ *
+ * Description This function is called to remove a service in bit map of UUID list.
+ *
+ * Parameters p_eir_uuid - bit mask of UUID list for EIR
+ * uuid16 - UUID 16-bit
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void BTM_RemoveEirService( uint32_t *p_eir_uuid, uint16_t uuid16 )
{
uint8_t service_id;
@@ -2586,20 +2586,20 @@
}
/*******************************************************************************
-**
-** Function BTM_GetEirSupportedServices
-**
-** Description This function is called to get UUID list from bit map of UUID list.
-**
-** Parameters p_eir_uuid - bit mask of UUID list for EIR
-** p - reference of current pointer of EIR
-** max_num_uuid16 - max number of UUID can be written in EIR
-** num_uuid16 - number of UUID have been written in EIR
-**
-** Returns BTM_EIR_MORE_16BITS_UUID_TYPE, if it has more than max
-** BTM_EIR_COMPLETE_16BITS_UUID_TYPE, otherwise
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetEirSupportedServices
+ *
+ * Description This function is called to get UUID list from bit map of UUID list.
+ *
+ * Parameters p_eir_uuid - bit mask of UUID list for EIR
+ * p - reference of current pointer of EIR
+ * max_num_uuid16 - max number of UUID can be written in EIR
+ * num_uuid16 - number of UUID have been written in EIR
+ *
+ * Returns BTM_EIR_MORE_16BITS_UUID_TYPE, if it has more than max
+ * BTM_EIR_COMPLETE_16BITS_UUID_TYPE, otherwise
+ *
+ ******************************************************************************/
uint8_t BTM_GetEirSupportedServices( uint32_t *p_eir_uuid, uint8_t **p,
uint8_t max_num_uuid16, uint8_t *p_num_uuid16)
{
@@ -2627,26 +2627,26 @@
}
/*******************************************************************************
-**
-** Function BTM_GetEirUuidList
-**
-** Description This function parses EIR and returns UUID list.
-**
-** Parameters p_eir - EIR
-** uuid_size - LEN_UUID_16, LEN_UUID_32, LEN_UUID_128
-** p_num_uuid - return number of UUID in found list
-** p_uuid_list - return UUID list
-** max_num_uuid - maximum number of UUID to be returned
-**
-** Returns 0 - if not found
-** BTM_EIR_COMPLETE_16BITS_UUID_TYPE
-** BTM_EIR_MORE_16BITS_UUID_TYPE
-** BTM_EIR_COMPLETE_32BITS_UUID_TYPE
-** BTM_EIR_MORE_32BITS_UUID_TYPE
-** BTM_EIR_COMPLETE_128BITS_UUID_TYPE
-** BTM_EIR_MORE_128BITS_UUID_TYPE
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetEirUuidList
+ *
+ * Description This function parses EIR and returns UUID list.
+ *
+ * Parameters p_eir - EIR
+ * uuid_size - LEN_UUID_16, LEN_UUID_32, LEN_UUID_128
+ * p_num_uuid - return number of UUID in found list
+ * p_uuid_list - return UUID list
+ * max_num_uuid - maximum number of UUID to be returned
+ *
+ * Returns 0 - if not found
+ * BTM_EIR_COMPLETE_16BITS_UUID_TYPE
+ * BTM_EIR_MORE_16BITS_UUID_TYPE
+ * BTM_EIR_COMPLETE_32BITS_UUID_TYPE
+ * BTM_EIR_MORE_32BITS_UUID_TYPE
+ * BTM_EIR_COMPLETE_128BITS_UUID_TYPE
+ * BTM_EIR_MORE_128BITS_UUID_TYPE
+ *
+ ******************************************************************************/
uint8_t BTM_GetEirUuidList( uint8_t *p_eir, uint8_t uuid_size, uint8_t *p_num_uuid,
uint8_t *p_uuid_list, uint8_t max_num_uuid)
{
@@ -2705,20 +2705,20 @@
/*******************************************************************************
-**
-** Function btm_eir_get_uuid_list
-**
-** Description This function searches UUID list in EIR.
-**
-** Parameters p_eir - address of EIR
-** uuid_size - size of UUID to find
-** p_num_uuid - number of UUIDs found
-** 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
-**
-*******************************************************************************/
+ *
+ * Function btm_eir_get_uuid_list
+ *
+ * Description This function searches UUID list in EIR.
+ *
+ * Parameters p_eir - address of EIR
+ * uuid_size - size of UUID to find
+ * p_num_uuid - number of UUIDs found
+ * 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
+ *
+ ******************************************************************************/
static uint8_t *btm_eir_get_uuid_list( uint8_t *p_eir, uint8_t uuid_size,
uint8_t *p_num_uuid, uint8_t *p_uuid_list_type )
{
@@ -2762,18 +2762,18 @@
}
/*******************************************************************************
-**
-** Function btm_convert_uuid_to_uuid16
-**
-** Description This function converts UUID to UUID 16-bit.
-**
-** Parameters p_uuid - address of UUID
-** uuid_size - size of UUID
-**
-** Returns 0 - if UUID cannot be converted to UUID 16-bit
-** UUID 16-bit - otherwise
-**
-*******************************************************************************/
+ *
+ * Function btm_convert_uuid_to_uuid16
+ *
+ * Description This function converts UUID to UUID 16-bit.
+ *
+ * Parameters p_uuid - address of UUID
+ * uuid_size - size of UUID
+ *
+ * Returns 0 - if UUID cannot be converted to UUID 16-bit
+ * UUID 16-bit - otherwise
+ *
+ ******************************************************************************/
static uint16_t btm_convert_uuid_to_uuid16( uint8_t *p_uuid, uint8_t uuid_size )
{
static const uint8_t base_uuid[LEN_UUID_128] = {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,
@@ -2822,17 +2822,17 @@
}
/*******************************************************************************
-**
-** Function btm_set_eir_uuid
-**
-** Description This function is called to store received UUID into inquiry result.
-**
-** Parameters p_eir - pointer of EIR significant part
-** p_results - pointer of inquiry result
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function btm_set_eir_uuid
+ *
+ * Description This function is called to store received UUID into inquiry result.
+ *
+ * Parameters p_eir - pointer of EIR significant part
+ * p_results - pointer of inquiry result
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void btm_set_eir_uuid( uint8_t *p_eir, tBTM_INQ_RESULTS *p_results )
{
uint8_t *p_uuid_data;
diff --git a/stack/btm/btm_int.h b/stack/btm/btm_int.h
index 7ab5e5e..16a81d0 100644
--- a/stack/btm/btm_int.h
+++ b/stack/btm/btm_int.h
@@ -46,12 +46,12 @@
extern tBTM_CB btm_cb;
/* Internal functions provided by btm_main.cc
-********************************************
+ *******************************************
*/
extern void btm_init (void);
/* Internal functions provided by btm_inq.cc
-*******************************************
+ ******************************************
*/
extern tBTM_STATUS btm_initiate_rem_name(BD_ADDR remote_bda,
tBTM_INQ_INFO *p_cur,
@@ -78,7 +78,7 @@
extern bool btm_lookup_eir(BD_ADDR_PTR p_rem_addr);
/* Internal functions provided by btm_acl.cc
-********************************************
+ *******************************************
*/
extern void btm_acl_init (void);
extern void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
@@ -142,7 +142,7 @@
/* Internal functions provided by btm_sco.cc
-********************************************
+ *******************************************
*/
extern void btm_sco_init (void);
extern void btm_sco_connected (uint8_t hci_status, BD_ADDR bda, uint16_t hci_handle,
@@ -163,7 +163,7 @@
extern void btm_sco_flush_sco_data(uint16_t sco_inx);
/* Internal functions provided by btm_devctl.cc
-**********************************************
+ *********************************************
*/
extern void btm_dev_init(void);
extern void btm_read_local_name_timeout(void *data);
@@ -187,7 +187,7 @@
/* Internal functions provided by btm_dev.cc
-**********************************************
+ *********************************************
*/
extern bool btm_dev_support_switch (BD_ADDR bd_addr);
@@ -202,7 +202,7 @@
tBTM_BOND_TYPE bond_type);
/* Internal functions provided by btm_sec.cc
-**********************************************
+ *********************************************
*/
extern bool btm_dev_support_switch (BD_ADDR bd_addr);
extern tBTM_STATUS btm_sec_l2cap_access_req (BD_ADDR bd_addr, uint16_t psm,
diff --git a/stack/btm/btm_int_types.h b/stack/btm/btm_int_types.h
index 691c6d7..1346322 100644
--- a/stack/btm/btm_int_types.h
+++ b/stack/btm/btm_int_types.h
@@ -287,9 +287,9 @@
typedef uint8_t *BTM_BD_NAME_PTR; /* Pointer to Device name */
/* Security callback is called by this unit when security
-** procedures are completed. Parameters are
-** BD Address of remote
-** Result of the operation
+ * procedures are completed. Parameters are
+ * BD Address of remote
+ * Result of the operation
*/
typedef tBTM_SEC_CBACK tBTM_SEC_CALLBACK;
@@ -391,8 +391,8 @@
#endif /* BTM_SCO_INCLUDED */
/*
-** Define structure for Security Service Record.
-** A record exists for each service registered with the Security Manager
+ * Define structure for Security Service Record.
+ * A record exists for each service registered with the Security Manager
*/
#define BTM_SEC_OUT_FLAGS (BTM_SEC_OUT_AUTHENTICATE | BTM_SEC_OUT_ENCRYPT | BTM_SEC_OUT_AUTHORIZE)
#define BTM_SEC_IN_FLAGS (BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT | BTM_SEC_IN_AUTHORIZE)
@@ -475,8 +475,8 @@
typedef uint8_t tBTM_BOND_TYPE;
/*
-** Define structure for Security Device Record.
-** A record exists for each device authenticated with this device
+ * Define structure for Security Device Record.
+ * A record exists for each device authenticated with this device
*/
typedef struct
{
@@ -591,7 +591,7 @@
#define BTM_SEC_LE_MASK (BTM_SEC_LE_AUTHENTICATED|BTM_SEC_LE_ENCRYPTED|BTM_SEC_LE_LINK_KEY_KNOWN|BTM_SEC_LE_LINK_KEY_AUTHED)
/*
-** Define device configuration structure
+ * Define device configuration structure
*/
typedef struct
{
diff --git a/stack/btm/btm_main.cc b/stack/btm/btm_main.cc
index 7430e2a..c0e7d6a 100644
--- a/stack/btm/btm_main.cc
+++ b/stack/btm/btm_main.cc
@@ -33,17 +33,17 @@
tBTM_CB btm_cb;
/*******************************************************************************
-**
-** Function btm_init
-**
-** Description This function is called at BTM startup to allocate the
-** control block (if using dynamic memory), and initializes the
-** tracing level. It then initializes the various components of
-** btm.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_init
+ *
+ * Description This function is called at BTM startup to allocate the
+ * control block (if using dynamic memory), and initializes the
+ * tracing level. It then initializes the various components of
+ * btm.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_init (void)
{
/* All fields are cleared; nonzero fields are reinitialized in appropriate function */
diff --git a/stack/btm/btm_pm.cc b/stack/btm/btm_pm.cc
index 2cde8e9..8896a0f 100644
--- a/stack/btm/btm_pm.cc
+++ b/stack/btm/btm_pm.cc
@@ -122,16 +122,16 @@
/* P U B L I C F U N C T I O N S */
/*****************************************************************************/
/*******************************************************************************
-**
-** Function BTM_PmRegister
-**
-** Description register or deregister with power manager
-**
-** Returns BTM_SUCCESS if successful,
-** BTM_NO_RESOURCES if no room to hold registration
-** BTM_ILLEGAL_VALUE
-**
-*******************************************************************************/
+ *
+ * Function BTM_PmRegister
+ *
+ * Description register or deregister with power manager
+ *
+ * Returns BTM_SUCCESS if successful,
+ * BTM_NO_RESOURCES if no room to hold registration
+ * BTM_ILLEGAL_VALUE
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_PmRegister (uint8_t mask, uint8_t *p_pm_id, tBTM_PM_STATUS_CBACK *p_cb)
{
int xx;
@@ -167,16 +167,16 @@
}
/*******************************************************************************
-**
-** Function BTM_SetPowerMode
-**
-** Description store the mode in control block or
-** alter ACL connection behavior.
-**
-** Returns BTM_SUCCESS if successful,
-** BTM_UNKNOWN_ADDR if bd addr is not active or bad
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPowerMode
+ *
+ * Description store the mode in control block or
+ * alter ACL connection behavior.
+ *
+ * Returns BTM_SUCCESS if successful,
+ * BTM_UNKNOWN_ADDR if bd addr is not active or bad
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetPowerMode (uint8_t pm_id, BD_ADDR remote_bda, tBTM_PM_PWR_MD *p_mode)
{
uint8_t *p_features;
@@ -263,25 +263,25 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadPowerMode
-**
-** Description This returns the current mode for a specific
-** ACL connection.
-**
-** Input Param remote_bda - device address of desired ACL connection
-**
-** Output Param p_mode - address where the current mode is copied into.
-** BTM_ACL_MODE_NORMAL
-** BTM_ACL_MODE_HOLD
-** BTM_ACL_MODE_SNIFF
-** BTM_ACL_MODE_PARK
-** (valid only if return code is BTM_SUCCESS)
-**
-** Returns BTM_SUCCESS if successful,
-** BTM_UNKNOWN_ADDR if bd addr is not active or bad
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadPowerMode
+ *
+ * Description This returns the current mode for a specific
+ * ACL connection.
+ *
+ * Input Param remote_bda - device address of desired ACL connection
+ *
+ * Output Param p_mode - address where the current mode is copied into.
+ * BTM_ACL_MODE_NORMAL
+ * BTM_ACL_MODE_HOLD
+ * BTM_ACL_MODE_SNIFF
+ * BTM_ACL_MODE_PARK
+ * (valid only if return code is BTM_SUCCESS)
+ *
+ * Returns BTM_SUCCESS if successful,
+ * BTM_UNKNOWN_ADDR if bd addr is not active or bad
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadPowerMode (BD_ADDR remote_bda, tBTM_PM_MODE *p_mode)
{
int acl_ind;
@@ -295,26 +295,26 @@
}
/*******************************************************************************
-**
-** Function btm_read_power_mode_state
-**
-** Description This returns the current pm state for a specific
-** ACL connection.
-**
-** Input Param remote_bda - device address of desired ACL connection
-**
-** Output Param pmState - address where the current pm state is copied into.
-** BTM_PM_ST_ACTIVE
-** BTM_PM_ST_HOLD
-** BTM_PM_ST_SNIFF
-** BTM_PM_ST_PARK
-** BTM_PM_ST_PENDING
-** (valid only if return code is BTM_SUCCESS)
-**
-** Returns BTM_SUCCESS if successful,
-** BTM_UNKNOWN_ADDR if bd addr is not active or bad
-**
-*******************************************************************************/
+ *
+ * Function btm_read_power_mode_state
+ *
+ * Description This returns the current pm state for a specific
+ * ACL connection.
+ *
+ * Input Param remote_bda - device address of desired ACL connection
+ *
+ * Output Param pmState - address where the current pm state is copied into.
+ * BTM_PM_ST_ACTIVE
+ * BTM_PM_ST_HOLD
+ * BTM_PM_ST_SNIFF
+ * BTM_PM_ST_PARK
+ * BTM_PM_ST_PENDING
+ * (valid only if return code is BTM_SUCCESS)
+ *
+ * Returns BTM_SUCCESS if successful,
+ * BTM_UNKNOWN_ADDR if bd addr is not active or bad
+ *
+ ******************************************************************************/
tBTM_STATUS btm_read_power_mode_state (BD_ADDR remote_bda, tBTM_PM_STATE *pmState)
{
int acl_ind = btm_pm_find_acl_ind(remote_bda);
@@ -327,23 +327,23 @@
}
/*******************************************************************************
-**
-** Function BTM_SetSsrParams
-**
-** Description This sends the given SSR parameters for the given ACL
-** connection if it is in ACTIVE mode.
-**
-** Input Param remote_bda - device address of desired ACL connection
-** max_lat - maximum latency (in 0.625ms)(0-0xFFFE)
-** min_rmt_to - minimum remote timeout
-** min_loc_to - minimum local timeout
-**
-**
-** Returns BTM_SUCCESS if the HCI command is issued successful,
-** BTM_UNKNOWN_ADDR if bd addr is not active or bad
-** BTM_CMD_STORED if the command is stored
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetSsrParams
+ *
+ * Description This sends the given SSR parameters for the given ACL
+ * connection if it is in ACTIVE mode.
+ *
+ * Input Param remote_bda - device address of desired ACL connection
+ * max_lat - maximum latency (in 0.625ms)(0-0xFFFE)
+ * min_rmt_to - minimum remote timeout
+ * min_loc_to - minimum local timeout
+ *
+ *
+ * Returns BTM_SUCCESS if the HCI command is issued successful,
+ * BTM_UNKNOWN_ADDR if bd addr is not active or bad
+ * BTM_CMD_STORED if the command is stored
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetSsrParams (BD_ADDR remote_bda, uint16_t max_lat,
uint16_t min_rmt_to, uint16_t min_loc_to)
{
@@ -373,14 +373,14 @@
}
/*******************************************************************************
-**
-** Function btm_pm_reset
-**
-** Description as a part of the BTM reset process.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_reset
+ *
+ * Description as a part of the BTM reset process.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_pm_reset(void)
{
int xx;
@@ -407,15 +407,15 @@
}
/*******************************************************************************
-**
-** Function btm_pm_sm_alloc
-**
-** Description This function initializes the control block of an ACL link.
-** It is called when an ACL connection is created.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_sm_alloc
+ *
+ * Description This function initializes the control block of an ACL link.
+ * It is called when an ACL connection is created.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_pm_sm_alloc(uint8_t ind)
{
tBTM_PM_MCB *p_db = &btm_cb.pm_mode_db[ind]; /* per ACL link */
@@ -427,15 +427,15 @@
}
/*******************************************************************************
-**
-** Function btm_pm_find_acl_ind
-**
-** Description This function initializes the control block of an ACL link.
-** It is called when an ACL connection is created.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_find_acl_ind
+ *
+ * Description This function initializes the control block of an ACL link.
+ * It is called when an ACL connection is created.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static int btm_pm_find_acl_ind(BD_ADDR remote_bda)
{
tACL_CONN *p = &btm_cb.acl_db[0];
@@ -456,12 +456,12 @@
}
/*******************************************************************************
-**
-** Function btm_pm_compare_modes
-** Description get the "more active" mode of the 2
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_compare_modes
+ * Description get the "more active" mode of the 2
+ * Returns void
+ *
+ ******************************************************************************/
static tBTM_PM_PWR_MD * btm_pm_compare_modes(tBTM_PM_PWR_MD *p_md1, tBTM_PM_PWR_MD *p_md2, tBTM_PM_PWR_MD *p_res)
{
uint8_t res;
@@ -529,13 +529,13 @@
}
/*******************************************************************************
-**
-** Function btm_pm_get_set_mode
-** Description get the resulting mode from the registered parties, then compare it
-** with the requested mode, if the command is from an unregistered party.
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_get_set_mode
+ * Description get the resulting mode from the registered parties, then compare it
+ * with the requested mode, if the command is from an unregistered party.
+ * Returns void
+ *
+ ******************************************************************************/
static tBTM_PM_MODE btm_pm_get_set_mode(uint8_t pm_id, tBTM_PM_MCB *p_cb, tBTM_PM_PWR_MD *p_mode, tBTM_PM_PWR_MD *p_res)
{
int xx, loop_max;
@@ -594,12 +594,12 @@
}
/*******************************************************************************
-**
-** Function btm_pm_snd_md_req
-** Description get the resulting mode and send the resuest to host controller
-** Returns tBTM_STATUS
-**, bool *p_chg_ind
-*******************************************************************************/
+ *
+ * Function btm_pm_snd_md_req
+ * Description get the resulting mode and send the resuest to host controller
+ * Returns tBTM_STATUS
+ *, bool *p_chg_ind
+ ******************************************************************************/
static tBTM_STATUS btm_pm_snd_md_req(uint8_t pm_id, int link_ind, tBTM_PM_PWR_MD *p_mode)
{
tBTM_PM_PWR_MD md_res;
@@ -707,16 +707,16 @@
}
/*******************************************************************************
-**
-** Function btm_pm_check_stored
-**
-** Description This function is called when an HCI command status event occurs
-** to check if there's any PM command issued while waiting for
-** HCI command status.
-**
-** Returns none.
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_check_stored
+ *
+ * Description This function is called when an HCI command status event occurs
+ * to check if there's any PM command issued while waiting for
+ * HCI command status.
+ *
+ * Returns none.
+ *
+ ******************************************************************************/
static void btm_pm_check_stored(void)
{
int xx;
@@ -733,17 +733,17 @@
}
/*******************************************************************************
-**
-** Function btm_pm_proc_cmd_status
-**
-** Description This function is called when an HCI command status event occurs
-** for power manager related commands.
-**
-** Input Parms status - status of the event (HCI_SUCCESS if no errors)
-**
-** Returns none.
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_proc_cmd_status
+ *
+ * Description This function is called when an HCI command status event occurs
+ * for power manager related commands.
+ *
+ * Input Parms status - status of the event (HCI_SUCCESS if no errors)
+ *
+ * Returns none.
+ *
+ ******************************************************************************/
void btm_pm_proc_cmd_status(uint8_t status)
{
tBTM_PM_MCB *p_cb;
@@ -785,19 +785,19 @@
}
/*******************************************************************************
-**
-** Function btm_process_mode_change
-**
-** Description This function is called when an HCI mode change event occurs.
-**
-** Input Parms hci_status - status of the event (HCI_SUCCESS if no errors)
-** hci_handle - connection handle associated with the change
-** mode - HCI_MODE_ACTIVE, HCI_MODE_HOLD, HCI_MODE_SNIFF, or HCI_MODE_PARK
-** interval - number of baseband slots (meaning depends on mode)
-**
-** Returns none.
-**
-*******************************************************************************/
+ *
+ * Function btm_process_mode_change
+ *
+ * Description This function is called when an HCI mode change event occurs.
+ *
+ * Input Parms hci_status - status of the event (HCI_SUCCESS if no errors)
+ * hci_handle - connection handle associated with the change
+ * mode - HCI_MODE_ACTIVE, HCI_MODE_HOLD, HCI_MODE_SNIFF, or HCI_MODE_PARK
+ * interval - number of baseband slots (meaning depends on mode)
+ *
+ * Returns none.
+ *
+ ******************************************************************************/
void btm_pm_proc_mode_change (uint8_t hci_status, uint16_t hci_handle, uint8_t mode, uint16_t interval)
{
tACL_CONN *p;
@@ -883,14 +883,14 @@
}
/*******************************************************************************
-**
-** Function btm_pm_proc_ssr_evt
-**
-** Description This function is called when an HCI sniff subrating event occurs.
-**
-** Returns none.
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_proc_ssr_evt
+ *
+ * Description This function is called when an HCI sniff subrating event occurs.
+ *
+ * Returns none.
+ *
+ ******************************************************************************/
#if (BTM_SSR_INCLUDED == TRUE)
void btm_pm_proc_ssr_evt (uint8_t *p,
UNUSED_ATTR uint16_t evt_len)
@@ -937,14 +937,14 @@
#endif // BTM_SSR_INCLUDED
/*******************************************************************************
-**
-** Function btm_pm_device_in_active_or_sniff_mode
-**
-** Description This function is called to check if in active or sniff mode
-**
-** Returns true, if in active or sniff mode
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_device_in_active_or_sniff_mode
+ *
+ * Description This function is called to check if in active or sniff mode
+ *
+ * Returns true, if in active or sniff mode
+ *
+ ******************************************************************************/
bool btm_pm_device_in_active_or_sniff_mode(void)
{
/* The active state is the highest state-includes connected device and sniff mode*/
@@ -967,14 +967,14 @@
}
/*******************************************************************************
-**
-** Function btm_pm_device_in_scan_state
-**
-** Description This function is called to check if in paging, inquiry or connecting mode
-**
-** Returns true, if in paging, inquiry or connecting mode
-**
-*******************************************************************************/
+ *
+ * Function btm_pm_device_in_scan_state
+ *
+ * Description This function is called to check if in paging, inquiry or connecting mode
+ *
+ * Returns true, if in paging, inquiry or connecting mode
+ *
+ ******************************************************************************/
bool btm_pm_device_in_scan_state(void)
{
/* Scan state-paging, inquiry, and trying to connect */
@@ -998,14 +998,14 @@
}
/*******************************************************************************
-**
-** Function BTM_PM_ReadControllerState
-**
-** Description This function is called to obtain the controller state
-**
-** Returns Controller State-BTM_CONTRL_ACTIVE, BTM_CONTRL_SCAN, and BTM_CONTRL_IDLE
-**
-*******************************************************************************/
+ *
+ * Function BTM_PM_ReadControllerState
+ *
+ * Description This function is called to obtain the controller state
+ *
+ * Returns Controller State-BTM_CONTRL_ACTIVE, BTM_CONTRL_SCAN, and BTM_CONTRL_IDLE
+ *
+ ******************************************************************************/
tBTM_CONTRL_STATE BTM_PM_ReadControllerState(void)
{
if (true == btm_pm_device_in_active_or_sniff_mode())
diff --git a/stack/btm/btm_sco.cc b/stack/btm/btm_sco.cc
index 10330ce..ee0e026 100644
--- a/stack/btm/btm_sco.cc
+++ b/stack/btm/btm_sco.cc
@@ -40,9 +40,9 @@
#if (BTM_SCO_INCLUDED == TRUE)
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L D A T A D E F I N I T I O N S */
-/********************************************************************************/
+/******************************************************************************/
#define SCO_ST_UNUSED 0
#define SCO_ST_LISTENING 1
@@ -54,9 +54,9 @@
#define SCO_ST_PEND_ROLECHANGE 7
#define SCO_ST_PEND_MODECHANGE 8
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static const tBTM_ESCO_PARAMS btm_esco_defaults =
{
@@ -74,14 +74,14 @@
};
/*******************************************************************************
-**
-** Function btm_sco_flush_sco_data
-**
-** Description This function is called to flush the SCO data for this channel.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_flush_sco_data
+ *
+ * Description This function is called to flush the SCO data for this channel.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
#if (BTM_SCO_HCI_INCLUDED == TRUE && BTM_MAX_SCO_LINKS>0)
void btm_sco_flush_sco_data(uint16_t sco_inx)
{
@@ -102,14 +102,14 @@
}
#endif
/*******************************************************************************
-**
-** Function btm_sco_init
-**
-** Description This function is called at BTM startup to initialize
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_init
+ *
+ * Description This function is called at BTM startup to initialize
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sco_init (void)
{
#if (BTM_SCO_HCI_INCLUDED == TRUE)
@@ -125,21 +125,21 @@
}
/*******************************************************************************
-**
-** Function btm_esco_conn_rsp
-**
-** Description This function is called upon receipt of an (e)SCO connection
-** request event (BTM_ESCO_CONN_REQ_EVT) to accept or reject
-** the request. Parameters used to negotiate eSCO links.
-** If p_parms is NULL, then default values are used.
-** If the link type of the incoming request is SCO, then only
-** 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
-**
-*******************************************************************************/
+ *
+ * Function btm_esco_conn_rsp
+ *
+ * Description This function is called upon receipt of an (e)SCO connection
+ * request event (BTM_ESCO_CONN_REQ_EVT) to accept or reject
+ * the request. Parameters used to negotiate eSCO links.
+ * If p_parms is NULL, then default values are used.
+ * If the link type of the incoming request is SCO, then only
+ * 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
+ *
+ ******************************************************************************/
static void btm_esco_conn_rsp (uint16_t sco_inx, uint8_t hci_status, BD_ADDR bda,
tBTM_ESCO_PARAMS *p_parms)
{
@@ -218,15 +218,15 @@
#if (BTM_SCO_HCI_INCLUDED == TRUE)
/*******************************************************************************
-**
-** Function btm_sco_check_send_pkts
-**
-** Description This function is called to check if it can send packets
-** to the Host Controller.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_check_send_pkts
+ *
+ * Description This function is called to check if it can send packets
+ * to the Host Controller.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sco_check_send_pkts (uint16_t sco_inx)
{
tSCO_CB *p_cb = &btm_cb.sco_cb;
@@ -247,14 +247,14 @@
#endif /* BTM_SCO_HCI_INCLUDED == TRUE */
/*******************************************************************************
-**
-** Function btm_route_sco_data
-**
-** Description Route received SCO data.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_route_sco_data
+ *
+ * Description Route received SCO data.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_route_sco_data(BT_HDR *p_msg)
{
#if (BTM_SCO_HCI_INCLUDED == TRUE)
@@ -292,26 +292,26 @@
}
/*******************************************************************************
-**
-** 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
-** 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.
-**
-** 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_NO_RESOURCES: no resources.
-** BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is not
-** routed via HCI.
-**
-**
-*******************************************************************************/
+ *
+ * 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
+ * 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.
+ *
+ * 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_NO_RESOURCES: no resources.
+ * BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is not
+ * routed via HCI.
+ *
+ *
+ ******************************************************************************/
#if (BTM_SCO_HCI_INCLUDED == TRUE && BTM_MAX_SCO_LINKS > 0)
tBTM_STATUS BTM_WriteScoData (uint16_t sco_inx, BT_HDR *p_buf)
{
@@ -375,14 +375,14 @@
#if (BTM_MAX_SCO_LINKS>0)
/*******************************************************************************
-**
-** Function btm_send_connect_request
-**
-** Description This function is called to respond to SCO connect indications
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_send_connect_request
+ *
+ * Description This function is called to respond to SCO connect indications
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static tBTM_STATUS btm_send_connect_request(uint16_t acl_handle,
tBTM_ESCO_PARAMS *p_setup)
{
@@ -471,30 +471,30 @@
#endif
/*******************************************************************************
-**
-** Function btm_set_sco_ind_cback
-**
-** Description This function is called to register for TCS SCO connect
-** indications.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_set_sco_ind_cback
+ *
+ * Description This function is called to register for TCS SCO connect
+ * indications.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_set_sco_ind_cback( tBTM_SCO_IND_CBACK *sco_ind_cb )
{
btm_cb.sco_cb.app_sco_ind_cb = sco_ind_cb;
}
/*******************************************************************************
-**
-** Function btm_accept_sco_link
-**
-** Description This function is called to respond to TCS SCO connect
-** indications
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_accept_sco_link
+ *
+ * Description This function is called to respond to TCS SCO connect
+ * indications
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_accept_sco_link(uint16_t sco_inx, tBTM_ESCO_PARAMS *p_setup,
tBTM_SCO_CB *p_conn_cb, tBTM_SCO_CB *p_disc_cb)
{
@@ -522,14 +522,14 @@
}
/*******************************************************************************
-**
-** Function btm_reject_sco_link
-**
-** Description This function is called to respond to SCO connect indications
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_reject_sco_link
+ *
+ * Description This function is called to respond to SCO connect indications
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_reject_sco_link( uint16_t sco_inx )
{
btm_esco_conn_rsp(sco_inx, HCI_ERR_HOST_REJECT_RESOURCES,
@@ -537,25 +537,25 @@
}
/*******************************************************************************
-**
-** Function BTM_CreateSco
-**
-** Description This function is called to create an SCO connection. If the
-** "is_orig" flag is true, the connection will be originated,
-** otherwise BTM will wait for the other side to connect.
-**
-** NOTE: If BTM_IGNORE_SCO_PKT_TYPE is passed in the pkt_types
-** parameter the default packet types is used.
-**
-** Returns BTM_UNKNOWN_ADDR if the ACL connection is not up
-** BTM_BUSY if another SCO being set up to
-** the same BD address
-** BTM_NO_RESOURCES if the max SCO limit has been reached
-** BTM_CMD_STARTED if the connection establishment is started.
-** In this case, "*p_sco_inx" is filled in
-** with the sco index used for the connection.
-**
-*******************************************************************************/
+ *
+ * Function BTM_CreateSco
+ *
+ * Description This function is called to create an SCO connection. If the
+ * "is_orig" flag is true, the connection will be originated,
+ * otherwise BTM will wait for the other side to connect.
+ *
+ * NOTE: If BTM_IGNORE_SCO_PKT_TYPE is passed in the pkt_types
+ * parameter the default packet types is used.
+ *
+ * Returns BTM_UNKNOWN_ADDR if the ACL connection is not up
+ * BTM_BUSY if another SCO being set up to
+ * the same BD address
+ * BTM_NO_RESOURCES if the max SCO limit has been reached
+ * BTM_CMD_STARTED if the connection establishment is started.
+ * In this case, "*p_sco_inx" is filled in
+ * with the sco index used for the connection.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_CreateSco (BD_ADDR remote_bda, bool is_orig, uint16_t pkt_types,
uint16_t *p_sco_inx, tBTM_SCO_CB *p_conn_cb,
tBTM_SCO_CB *p_disc_cb)
@@ -715,15 +715,15 @@
#if (BTM_SCO_WAKE_PARKED_LINK == TRUE)
/*******************************************************************************
-**
-** Function btm_sco_chk_pend_unpark
-**
-** Description This function is called by BTIF when there is a mode change
-** event to see if there are SCO commands waiting for the unpark.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_chk_pend_unpark
+ *
+ * Description This function is called by BTIF when there is a mode change
+ * event to see if there are SCO commands waiting for the unpark.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sco_chk_pend_unpark (uint8_t hci_status, uint16_t hci_handle)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -749,15 +749,15 @@
#endif // BTM_SCO_WAKE_PARKED_LINK
/*******************************************************************************
-**
-** Function btm_sco_chk_pend_rolechange
-**
-** Description This function is called by BTIF when there is a role change
-** event to see if there are SCO commands waiting for the role change.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_chk_pend_rolechange
+ *
+ * Description This function is called by BTIF when there is a role change
+ * event to see if there are SCO commands waiting for the role change.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sco_chk_pend_rolechange (uint16_t hci_handle)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -781,15 +781,15 @@
}
/*******************************************************************************
-**
-** Function btm_sco_disc_chk_pend_for_modechange
-**
-** Description This function is called by btm when there is a mode change
-** event to see if there are SCO disconnect commands waiting for the mode change.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_disc_chk_pend_for_modechange
+ *
+ * Description This function is called by btm when there is a mode change
+ * event to see if there are SCO disconnect commands waiting for the mode change.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sco_disc_chk_pend_for_modechange (uint16_t hci_handle)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -812,15 +812,15 @@
}
/*******************************************************************************
-**
-** Function btm_sco_conn_req
-**
-** Description This function is called by BTIF when an SCO connection
-** request is received from a remote.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_conn_req
+ *
+ * Description This function is called by BTIF when an SCO connection
+ * request is received from a remote.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sco_conn_req (BD_ADDR bda, DEV_CLASS dev_class, uint8_t link_type)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -910,15 +910,15 @@
}
/*******************************************************************************
-**
-** Function btm_sco_connected
-**
-** Description This function is called by BTIF when an (e)SCO connection
-** is connected.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_connected
+ *
+ * Description This function is called by BTIF when an (e)SCO connection
+ * is connected.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sco_connected (uint8_t hci_status, BD_ADDR bda, uint16_t hci_handle,
tBTM_ESCO_DATA *p_esco_data)
{
@@ -1008,16 +1008,16 @@
/*******************************************************************************
-**
-** Function btm_find_scb_by_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
-** no match.
-**
-*******************************************************************************/
+ *
+ * Function btm_find_scb_by_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
+ * no match.
+ *
+ ******************************************************************************/
uint16_t btm_find_scb_by_handle (uint16_t handle)
{
int xx;
@@ -1036,14 +1036,14 @@
}
/*******************************************************************************
-**
-** Function BTM_RemoveSco
-**
-** Description This function is called to remove a specific SCO connection.
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_RemoveSco
+ *
+ * Description This function is called to remove a specific SCO connection.
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_RemoveSco (uint16_t sco_inx)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1087,14 +1087,14 @@
}
/*******************************************************************************
-**
-** Function btm_remove_sco_links
-**
-** Description This function is called to remove all sco links for an ACL link.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_remove_sco_links
+ *
+ * Description This function is called to remove all sco links for an ACL link.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_remove_sco_links (BD_ADDR bda)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1112,15 +1112,15 @@
}
/*******************************************************************************
-**
-** Function btm_sco_removed
-**
-** Description This function is called by BTIF when an SCO connection
-** is removed.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_removed
+ *
+ * Description This function is called by BTIF when an SCO connection
+ * is removed.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sco_removed (uint16_t hci_handle, uint8_t reason)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1152,18 +1152,18 @@
/*******************************************************************************
-**
-** Function btm_sco_acl_removed
-**
-** Description This function is called when an ACL connection is
-** removed. If the BD address is NULL, it is assumed that
-** the local device is down, and all SCO links are removed.
-** If a specific BD address is passed, only SCO connections
-** to that BD address are removed.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sco_acl_removed
+ *
+ * Description This function is called when an ACL connection is
+ * removed. If the BD address is NULL, it is assumed that
+ * the local device is down, and all SCO links are removed.
+ * If a specific BD address is passed, only SCO connections
+ * to that BD address are removed.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sco_acl_removed (BD_ADDR bda)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1189,29 +1189,29 @@
/*******************************************************************************
-**
-** Function BTM_SetScoPacketTypes
-**
-** Description This function is called to set the packet types used for
-** a specific SCO connection,
-**
-** Parameters pkt_types - One or more of the following
-** BTM_SCO_PKT_TYPES_MASK_HV1
-** BTM_SCO_PKT_TYPES_MASK_HV2
-** BTM_SCO_PKT_TYPES_MASK_HV3
-** BTM_SCO_PKT_TYPES_MASK_EV3
-** BTM_SCO_PKT_TYPES_MASK_EV4
-** BTM_SCO_PKT_TYPES_MASK_EV5
-** BTM_SCO_PKT_TYPES_MASK_NO_2_EV3
-** BTM_SCO_PKT_TYPES_MASK_NO_3_EV3
-** BTM_SCO_PKT_TYPES_MASK_NO_2_EV5
-** BTM_SCO_PKT_TYPES_MASK_NO_3_EV5
-**
-** BTM_SCO_LINK_ALL_MASK - enables all supported types
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetScoPacketTypes
+ *
+ * Description This function is called to set the packet types used for
+ * a specific SCO connection,
+ *
+ * Parameters pkt_types - One or more of the following
+ * BTM_SCO_PKT_TYPES_MASK_HV1
+ * BTM_SCO_PKT_TYPES_MASK_HV2
+ * BTM_SCO_PKT_TYPES_MASK_HV3
+ * BTM_SCO_PKT_TYPES_MASK_EV3
+ * BTM_SCO_PKT_TYPES_MASK_EV4
+ * BTM_SCO_PKT_TYPES_MASK_EV5
+ * BTM_SCO_PKT_TYPES_MASK_NO_2_EV3
+ * BTM_SCO_PKT_TYPES_MASK_NO_3_EV3
+ * BTM_SCO_PKT_TYPES_MASK_NO_2_EV5
+ * BTM_SCO_PKT_TYPES_MASK_NO_3_EV5
+ *
+ * BTM_SCO_LINK_ALL_MASK - enables all supported types
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetScoPacketTypes (uint16_t sco_inx, uint16_t pkt_types)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1237,26 +1237,26 @@
/*******************************************************************************
-**
-** Function BTM_ReadScoPacketTypes
-**
-** Description This function is read the packet types used for a specific
-** SCO connection.
-**
-** Returns Packet types supported for the connection
-** One or more of the following (bitmask):
-** BTM_SCO_PKT_TYPES_MASK_HV1
-** BTM_SCO_PKT_TYPES_MASK_HV2
-** BTM_SCO_PKT_TYPES_MASK_HV3
-** BTM_SCO_PKT_TYPES_MASK_EV3
-** BTM_SCO_PKT_TYPES_MASK_EV4
-** BTM_SCO_PKT_TYPES_MASK_EV5
-** BTM_SCO_PKT_TYPES_MASK_NO_2_EV3
-** BTM_SCO_PKT_TYPES_MASK_NO_3_EV3
-** BTM_SCO_PKT_TYPES_MASK_NO_2_EV5
-** BTM_SCO_PKT_TYPES_MASK_NO_3_EV5
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadScoPacketTypes
+ *
+ * Description This function is read the packet types used for a specific
+ * SCO connection.
+ *
+ * Returns Packet types supported for the connection
+ * One or more of the following (bitmask):
+ * BTM_SCO_PKT_TYPES_MASK_HV1
+ * BTM_SCO_PKT_TYPES_MASK_HV2
+ * BTM_SCO_PKT_TYPES_MASK_HV3
+ * BTM_SCO_PKT_TYPES_MASK_EV3
+ * BTM_SCO_PKT_TYPES_MASK_EV4
+ * BTM_SCO_PKT_TYPES_MASK_EV5
+ * BTM_SCO_PKT_TYPES_MASK_NO_2_EV3
+ * BTM_SCO_PKT_TYPES_MASK_NO_3_EV3
+ * BTM_SCO_PKT_TYPES_MASK_NO_2_EV5
+ * BTM_SCO_PKT_TYPES_MASK_NO_3_EV5
+ *
+ ******************************************************************************/
uint16_t BTM_ReadScoPacketTypes (uint16_t sco_inx)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1273,16 +1273,16 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadScoDiscReason
-**
-** Description This function is returns the reason why an (e)SCO connection
-** has been removed. It contains the value until read, or until
-** another (e)SCO connection has disconnected.
-**
-** Returns HCI reason or BTM_INVALID_SCO_DISC_REASON if not set.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadScoDiscReason
+ *
+ * Description This function is returns the reason why an (e)SCO connection
+ * has been removed. It contains the value until read, or until
+ * another (e)SCO connection has disconnected.
+ *
+ * Returns HCI reason or BTM_INVALID_SCO_DISC_REASON if not set.
+ *
+ ******************************************************************************/
uint16_t BTM_ReadScoDiscReason (void)
{
uint16_t res = btm_cb.sco_cb.sco_disc_reason;
@@ -1291,41 +1291,41 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadDeviceScoPacketTypes
-**
-** Description This function is read the SCO packet types that
-** the device supports.
-**
-** Returns Packet types supported by the device.
-** One or more of the following (bitmask):
-** BTM_SCO_PKT_TYPES_MASK_HV1
-** BTM_SCO_PKT_TYPES_MASK_HV2
-** BTM_SCO_PKT_TYPES_MASK_HV3
-** BTM_SCO_PKT_TYPES_MASK_EV3
-** BTM_SCO_PKT_TYPES_MASK_EV4
-** BTM_SCO_PKT_TYPES_MASK_EV5
-** BTM_SCO_PKT_TYPES_MASK_NO_2_EV3
-** BTM_SCO_PKT_TYPES_MASK_NO_3_EV3
-** BTM_SCO_PKT_TYPES_MASK_NO_2_EV5
-** BTM_SCO_PKT_TYPES_MASK_NO_3_EV5
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadDeviceScoPacketTypes
+ *
+ * Description This function is read the SCO packet types that
+ * the device supports.
+ *
+ * Returns Packet types supported by the device.
+ * One or more of the following (bitmask):
+ * BTM_SCO_PKT_TYPES_MASK_HV1
+ * BTM_SCO_PKT_TYPES_MASK_HV2
+ * BTM_SCO_PKT_TYPES_MASK_HV3
+ * BTM_SCO_PKT_TYPES_MASK_EV3
+ * BTM_SCO_PKT_TYPES_MASK_EV4
+ * BTM_SCO_PKT_TYPES_MASK_EV5
+ * BTM_SCO_PKT_TYPES_MASK_NO_2_EV3
+ * BTM_SCO_PKT_TYPES_MASK_NO_3_EV3
+ * BTM_SCO_PKT_TYPES_MASK_NO_2_EV5
+ * BTM_SCO_PKT_TYPES_MASK_NO_3_EV5
+ *
+ ******************************************************************************/
uint16_t BTM_ReadDeviceScoPacketTypes (void)
{
return (btm_cb.btm_sco_pkt_types_supported);
}
/*******************************************************************************
-**
-** Function BTM_ReadScoHandle
-**
-** Description This function is used to read the HCI handle used for a specific
-** SCO connection,
-**
-** Returns handle for the connection, or 0xFFFF if invalid SCO index.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadScoHandle
+ *
+ * Description This function is used to read the HCI handle used for a specific
+ * SCO connection,
+ *
+ * Returns handle for the connection, or 0xFFFF if invalid SCO index.
+ *
+ ******************************************************************************/
uint16_t BTM_ReadScoHandle (uint16_t sco_inx)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1342,15 +1342,15 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadScoBdAddr
-**
-** Description This function is read the remote BD Address for a specific
-** SCO connection,
-**
-** Returns pointer to BD address or NULL if not known
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadScoBdAddr
+ *
+ * Description This function is read the remote BD Address for a specific
+ * SCO connection,
+ *
+ * Returns pointer to BD address or NULL if not known
+ *
+ ******************************************************************************/
uint8_t *BTM_ReadScoBdAddr (uint16_t sco_inx)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1367,20 +1367,20 @@
}
/*******************************************************************************
-**
-** Function BTM_SetEScoMode
-**
-** Description This function sets up the negotiated parameters for SCO or
-** eSCO, and sets as the default mode used for outgoing calls to
-** BTM_CreateSco. It does not change any currently active (e)SCO links.
-** Note: Incoming (e)SCO connections will always use packet types
-** supported by the controller. If eSCO is not desired the
-** feature should be disabled in the controller's feature mask.
-**
-** Returns BTM_SUCCESS if the successful.
-** BTM_BUSY if there are one or more active (e)SCO links.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetEScoMode
+ *
+ * Description This function sets up the negotiated parameters for SCO or
+ * eSCO, and sets as the default mode used for outgoing calls to
+ * BTM_CreateSco. It does not change any currently active (e)SCO links.
+ * Note: Incoming (e)SCO connections will always use packet types
+ * supported by the controller. If eSCO is not desired the
+ * feature should be disabled in the controller's feature mask.
+ *
+ * Returns BTM_SUCCESS if the successful.
+ * BTM_BUSY if there are one or more active (e)SCO links.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetEScoMode (tBTM_SCO_TYPE sco_mode, tBTM_ESCO_PARAMS *p_parms)
{
tSCO_CB *p_esco = &btm_cb.sco_cb;
@@ -1427,20 +1427,20 @@
/*******************************************************************************
-**
-** Function BTM_RegForEScoEvts
-**
-** Description This function registers a SCO event callback with the
-** specified instance. It should be used to received
-** connection indication events and change of link parameter
-** 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
-** later or does not support eSCO.
-**
-*******************************************************************************/
+ *
+ * Function BTM_RegForEScoEvts
+ *
+ * Description This function registers a SCO event callback with the
+ * specified instance. It should be used to received
+ * connection indication events and change of link parameter
+ * 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
+ * later or does not support eSCO.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_RegForEScoEvts (uint16_t sco_inx, tBTM_ESCO_CBACK *p_esco_cback)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1463,21 +1463,21 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadEScoLinkParms
-**
-** Description This function returns the current eSCO link parameters for
-** the specified handle. This can be called anytime a connection
-** is active, but is typically called after receiving the SCO
-** opened callback.
-**
-** Note: If called over a 1.1 controller, only the packet types
-** field has meaning.
-**
-** Returns BTM_SUCCESS if returned data is valid connection.
-** BTM_WRONG_MODE if no connection with a peer device or bad sco_inx.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadEScoLinkParms
+ *
+ * Description This function returns the current eSCO link parameters for
+ * the specified handle. This can be called anytime a connection
+ * is active, but is typically called after receiving the SCO
+ * opened callback.
+ *
+ * Note: If called over a 1.1 controller, only the packet types
+ * field has meaning.
+ *
+ * Returns BTM_SUCCESS if returned data is valid connection.
+ * BTM_WRONG_MODE if no connection with a peer device or bad sco_inx.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ReadEScoLinkParms (uint16_t sco_inx, tBTM_ESCO_DATA *p_parms)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1513,24 +1513,24 @@
}
/*******************************************************************************
-**
-** Function BTM_ChangeEScoLinkParms
-**
-** Description This function requests renegotiation of the parameters on
-** the current eSCO Link. If any of the changes are accepted
-** by the controllers, the BTM_ESCO_CHG_EVT event is sent in
-** the tBTM_ESCO_CBACK function with the current settings of
-** the link. The callback is registered through the call to
-** BTM_SetEScoMode.
-**
-** Note: If called over a SCO link (including 1.1 controller),
-** a change packet type request is sent out instead.
-**
-** Returns BTM_CMD_STARTED if command is successfully initiated.
-** BTM_NO_RESOURCES - not enough resources to initiate command.
-** BTM_WRONG_MODE if no connection with a peer device or bad sco_inx.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ChangeEScoLinkParms
+ *
+ * Description This function requests renegotiation of the parameters on
+ * the current eSCO Link. If any of the changes are accepted
+ * by the controllers, the BTM_ESCO_CHG_EVT event is sent in
+ * the tBTM_ESCO_CBACK function with the current settings of
+ * the link. The callback is registered through the call to
+ * BTM_SetEScoMode.
+ *
+ * Note: If called over a SCO link (including 1.1 controller),
+ * a change packet type request is sent out instead.
+ *
+ * Returns BTM_CMD_STARTED if command is successfully initiated.
+ * BTM_NO_RESOURCES - not enough resources to initiate command.
+ * BTM_WRONG_MODE if no connection with a peer device or bad sco_inx.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_ChangeEScoLinkParms (uint16_t sco_inx, tBTM_CHG_ESCO_PARAMS *p_parms)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1590,23 +1590,23 @@
}
/*******************************************************************************
-**
-** Function BTM_EScoConnRsp
-**
-** Description This function is called upon receipt of an (e)SCO connection
-** request event (BTM_ESCO_CONN_REQ_EVT) to accept or reject
-** the request. Parameters used to negotiate eSCO links.
-** If p_parms is NULL, then values set through BTM_SetEScoMode
-** are used.
-** If the link type of the incoming request is SCO, then only
-** 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
-**
-*******************************************************************************/
+ *
+ * Function BTM_EScoConnRsp
+ *
+ * Description This function is called upon receipt of an (e)SCO connection
+ * request event (BTM_ESCO_CONN_REQ_EVT) to accept or reject
+ * the request. Parameters used to negotiate eSCO links.
+ * If p_parms is NULL, then values set through BTM_SetEScoMode
+ * are used.
+ * If the link type of the incoming request is SCO, then only
+ * 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
+ *
+ ******************************************************************************/
void BTM_EScoConnRsp (uint16_t sco_inx, uint8_t hci_status, tBTM_ESCO_PARAMS *p_parms)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1621,15 +1621,15 @@
}
/*******************************************************************************
-**
-** Function btm_read_def_esco_mode
-**
-** Description This function copies the current default esco settings into
-** the return buffer.
-**
-** Returns tBTM_SCO_TYPE
-**
-*******************************************************************************/
+ *
+ * Function btm_read_def_esco_mode
+ *
+ * Description This function copies the current default esco settings into
+ * the return buffer.
+ *
+ * Returns tBTM_SCO_TYPE
+ *
+ ******************************************************************************/
tBTM_SCO_TYPE btm_read_def_esco_mode (tBTM_ESCO_PARAMS *p_parms)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1641,15 +1641,15 @@
}
/*******************************************************************************
-**
-** Function btm_esco_proc_conn_chg
-**
-** Description This function is called by BTIF when an SCO connection
-** is changed.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_esco_proc_conn_chg
+ *
+ * Description This function is called by BTIF when an SCO connection
+ * is changed.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_esco_proc_conn_chg (uint8_t status, uint16_t handle, uint8_t tx_interval,
uint8_t retrans_window, uint16_t rx_pkt_len,
uint16_t tx_pkt_len)
@@ -1687,15 +1687,15 @@
}
/*******************************************************************************
-**
-** Function btm_is_sco_active
-**
-** Description This function is called to see if a SCO handle is already in
-** use.
-**
-** Returns bool
-**
-*******************************************************************************/
+ *
+ * Function btm_is_sco_active
+ *
+ * Description This function is called to see if a SCO handle is already in
+ * use.
+ *
+ * Returns bool
+ *
+ ******************************************************************************/
bool btm_is_sco_active (uint16_t handle)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1712,14 +1712,14 @@
}
/*******************************************************************************
-**
-** Function BTM_GetNumScoLinks
-**
-** Description This function returns the number of active sco links.
-**
-** Returns uint8_t
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetNumScoLinks
+ *
+ * Description This function returns the number of active sco links.
+ *
+ * Returns uint8_t
+ *
+ ******************************************************************************/
uint8_t BTM_GetNumScoLinks (void)
{
#if (BTM_MAX_SCO_LINKS>0)
@@ -1747,14 +1747,14 @@
/*******************************************************************************
-**
-** Function btm_is_sco_active_by_bdaddr
-**
-** Description This function is called to see if a SCO active to a bd address.
-**
-** Returns bool
-**
-*******************************************************************************/
+ *
+ * Function btm_is_sco_active_by_bdaddr
+ *
+ * Description This function is called to see if a SCO active to a bd address.
+ *
+ * Returns bool
+ *
+ ******************************************************************************/
bool btm_is_sco_active_by_bdaddr (BD_ADDR remote_bda)
{
#if (BTM_MAX_SCO_LINKS>0)
diff --git a/stack/btm/btm_sec.cc b/stack/btm/btm_sec.cc
index b46d4ed..c43bf39 100644
--- a/stack/btm/btm_sec.cc
+++ b/stack/btm/btm_sec.cc
@@ -50,9 +50,9 @@
bool (APPL_AUTH_WRITE_EXCEPTION)(BD_ADDR bd_addr);
#endif
-/********************************************************************************
-** L O C A L F U N C T I O N P R O T O T Y P E S *
-*********************************************************************************/
+/*******************************************************************************
+ * L O C A L F U N C T I O N P R O T O T Y P E S *
+ ******************************************************************************/
tBTM_SEC_SERV_REC *btm_sec_find_first_serv (bool is_originator, uint16_t psm);
static tBTM_SEC_SERV_REC *btm_sec_find_next_serv (tBTM_SEC_SERV_REC *p_cur);
static tBTM_SEC_SERV_REC *btm_sec_find_mx_serv (uint8_t is_originator, uint16_t psm,
@@ -121,14 +121,14 @@
/* BTM_IO_CAP_NONE 3 NoInputNoOutput */
/*******************************************************************************
-**
-** Function btm_dev_authenticated
-**
-** Description check device is authenticated
-**
-** Returns bool true or false
-**
-*******************************************************************************/
+ *
+ * Function btm_dev_authenticated
+ *
+ * Description check device is authenticated
+ *
+ * Returns bool true or false
+ *
+ ******************************************************************************/
static bool btm_dev_authenticated (tBTM_SEC_DEV_REC *p_dev_rec)
{
if(p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED)
@@ -139,14 +139,14 @@
}
/*******************************************************************************
-**
-** Function btm_dev_encrypted
-**
-** Description check device is encrypted
-**
-** Returns bool true or false
-**
-*******************************************************************************/
+ *
+ * Function btm_dev_encrypted
+ *
+ * Description check device is encrypted
+ *
+ * Returns bool true or false
+ *
+ ******************************************************************************/
static bool btm_dev_encrypted (tBTM_SEC_DEV_REC *p_dev_rec)
{
if(p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED)
@@ -157,14 +157,14 @@
}
/*******************************************************************************
-**
-** Function btm_dev_authorized
-**
-** Description check device is authorized
-**
-** Returns bool true or false
-**
-*******************************************************************************/
+ *
+ * Function btm_dev_authorized
+ *
+ * Description check device is authorized
+ *
+ * Returns bool true or false
+ *
+ ******************************************************************************/
static bool btm_dev_authorized (tBTM_SEC_DEV_REC *p_dev_rec)
{
if(p_dev_rec->sec_flags & BTM_SEC_AUTHORIZED)
@@ -175,14 +175,14 @@
}
/*******************************************************************************
-**
-** Function btm_dev_16_digit_authenticated
-**
-** Description check device is authenticated by using 16 digit pin or MITM
-**
-** Returns bool true or false
-**
-*******************************************************************************/
+ *
+ * Function btm_dev_16_digit_authenticated
+ *
+ * Description check device is authenticated by using 16 digit pin or MITM
+ *
+ * Returns bool true or false
+ *
+ ******************************************************************************/
static bool btm_dev_16_digit_authenticated(tBTM_SEC_DEV_REC *p_dev_rec)
{
// BTM_SEC_16_DIGIT_PIN_AUTHED is set if MITM or 16 digit pin is used
@@ -194,14 +194,14 @@
}
/*******************************************************************************
-**
-** Function btm_serv_trusted
-**
-** Description check service is trusted
-**
-** Returns bool true or false
-**
-*******************************************************************************/
+ *
+ * Function btm_serv_trusted
+ *
+ * Description check service is trusted
+ *
+ * Returns bool true or false
+ *
+ ******************************************************************************/
static bool btm_serv_trusted(tBTM_SEC_DEV_REC *p_dev_rec, tBTM_SEC_SERV_REC *p_serv_rec)
{
if(BTM_SEC_IS_SERVICE_TRUSTED(p_dev_rec->trusted_mask, p_serv_rec->service_id))
@@ -212,16 +212,16 @@
}
/*******************************************************************************
-**
-** Function BTM_SecRegister
-**
-** Description Application manager calls this function to register for
-** security services. There can be one and only one application
-** saving link keys. BTM allows only first registration.
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecRegister
+ *
+ * Description Application manager calls this function to register for
+ * security services. There can be one and only one application
+ * saving link keys. BTM allows only first registration.
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
bool BTM_SecRegister(tBTM_APPL_INFO *p_cb_info)
{
BT_OCTET16 temp_value = {0};
@@ -251,16 +251,16 @@
}
/*******************************************************************************
-**
-** Function BTM_SecRegisterLinkKeyNotificationCallback
-**
-** Description Application manager calls this function to register for
-** link key notification. When there is nobody registered
-** we should avoid changing link key
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecRegisterLinkKeyNotificationCallback
+ *
+ * Description Application manager calls this function to register for
+ * link key notification. When there is nobody registered
+ * we should avoid changing link key
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
bool BTM_SecRegisterLinkKeyNotificationCallback (tBTM_LINK_KEY_CALLBACK *p_callback)
{
btm_cb.api.p_link_key_callback = p_callback;
@@ -268,15 +268,15 @@
}
/*******************************************************************************
-**
-** Function BTM_SecAddRmtNameNotifyCallback
-**
-** Description Any profile can register to be notified when name of the
-** remote device is resolved.
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecAddRmtNameNotifyCallback
+ *
+ * Description Any profile can register to be notified when name of the
+ * remote device is resolved.
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
bool BTM_SecAddRmtNameNotifyCallback (tBTM_RMT_NAME_CALLBACK *p_callback)
{
int i;
@@ -294,15 +294,15 @@
}
/*******************************************************************************
-**
-** Function BTM_SecDeleteRmtNameNotifyCallback
-**
-** Description Any profile can deregister notification when a new Link Key
-** is generated per connection.
-**
-** Returns true if OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecDeleteRmtNameNotifyCallback
+ *
+ * Description Any profile can deregister notification when a new Link Key
+ * is generated per connection.
+ *
+ * Returns true if OK, else false
+ *
+ ******************************************************************************/
bool BTM_SecDeleteRmtNameNotifyCallback (tBTM_RMT_NAME_CALLBACK *p_callback)
{
int i;
@@ -320,14 +320,14 @@
}
/*******************************************************************************
-**
-** Function BTM_GetSecurityFlags
-**
-** Description Get security flags for the device
-**
-** Returns bool true or false is device found
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetSecurityFlags
+ *
+ * Description Get security flags for the device
+ *
+ * Returns bool true or false is device found
+ *
+ ******************************************************************************/
bool BTM_GetSecurityFlags (BD_ADDR bd_addr, uint8_t * p_sec_flags)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -343,14 +343,14 @@
}
/*******************************************************************************
-**
-** Function BTM_GetSecurityFlagsByTransport
-**
-** Description Get security flags for the device on a particular transport
-**
-** Returns bool true or false is device found
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetSecurityFlagsByTransport
+ *
+ * Description Get security flags for the device on a particular transport
+ *
+ * Returns bool true or false is device found
+ *
+ ******************************************************************************/
bool BTM_GetSecurityFlagsByTransport (BD_ADDR bd_addr, uint8_t * p_sec_flags,
tBT_TRANSPORT transport)
{
@@ -371,14 +371,14 @@
}
/*******************************************************************************
-**
-** Function BTM_SetPinType
-**
-** Description Set PIN type for the device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPinType
+ *
+ * Description Set PIN type for the device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_SetPinType (uint8_t pin_type, PIN_CODE pin_code, uint8_t pin_code_len)
{
BTM_TRACE_API ("BTM_SetPinType: pin type %d [variable-0, fixed-1], code %s, length %d",
@@ -397,19 +397,19 @@
}
/*******************************************************************************
-**
-** Function BTM_SetPairableMode
-**
-** Description Enable or disable pairing
-**
-** Parameters allow_pairing - (true or false) whether or not the device
-** allows pairing.
-** connect_only_paired - (true or false) whether or not to
-** only allow paired devices to connect.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPairableMode
+ *
+ * Description Enable or disable pairing
+ *
+ * Parameters allow_pairing - (true or false) whether or not the device
+ * allows pairing.
+ * connect_only_paired - (true or false) whether or not to
+ * only allow paired devices to connect.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_SetPairableMode (bool allow_pairing, bool connect_only_paired)
{
BTM_TRACE_API ("BTM_SetPairableMode() allow_pairing: %u connect_only_paired: %u", allow_pairing, connect_only_paired);
@@ -419,20 +419,20 @@
}
/*******************************************************************************
-**
-** Function BTM_SetSecureConnectionsOnly
-**
-** Description Enable or disable default treatment for Mode 4 Level 0 services
-**
-** Parameter secure_connections_only_mode - (true or false) whether or not the device
-** true means that the device should treat Mode 4 Level 0 services as
-** services of other levels. (Secure_connections_only_mode)
-** false means that the device should provide default treatment for
-** Mode 4 Level 0 services.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetSecureConnectionsOnly
+ *
+ * Description Enable or disable default treatment for Mode 4 Level 0 services
+ *
+ * Parameter secure_connections_only_mode - (true or false) whether or not the device
+ * true means that the device should treat Mode 4 Level 0 services as
+ * services of other levels. (Secure_connections_only_mode)
+ * false means that the device should provide default treatment for
+ * Mode 4 Level 0 services.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_SetSecureConnectionsOnly (bool secure_connections_only_mode)
{
BTM_TRACE_API("%s: Mode : %u", __func__,
@@ -444,24 +444,24 @@
#define BTM_NO_AVAIL_SEC_SERVICES ((uint16_t) 0xffff)
/*******************************************************************************
-**
-** Function BTM_SetSecurityLevel
-**
-** 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
-** 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
-** psm - L2CAP PSM
-** mx_proto_id - protocol ID of multiplexing proto below
-** mx_chan_id - channel ID of multiplexing proto below
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetSecurityLevel
+ *
+ * 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
+ * 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
+ * psm - L2CAP PSM
+ * mx_proto_id - protocol ID of multiplexing proto below
+ * mx_chan_id - channel ID of multiplexing proto below
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
bool BTM_SetSecurityLevel (bool is_originator, const char *p_name, uint8_t service_id,
uint16_t sec_level, uint16_t psm, uint32_t mx_proto_id,
uint32_t mx_chan_id)
@@ -483,24 +483,24 @@
}
/*******************************************************************************
-**
-** Function btm_sec_set_security_level
-**
-** 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
-** 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
-** psm - L2CAP PSM
-** mx_proto_id - protocol ID of multiplexing proto below
-** mx_chan_id - channel ID of multiplexing proto below
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_set_security_level
+ *
+ * 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
+ * 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
+ * psm - L2CAP PSM
+ * mx_proto_id - protocol ID of multiplexing proto below
+ * mx_chan_id - channel ID of multiplexing proto below
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
static bool btm_sec_set_security_level (CONNECTION_TYPE conn_type, const char *p_name,
uint8_t service_id, uint16_t sec_level, uint16_t psm,
uint32_t mx_proto_id, uint32_t mx_chan_id)
@@ -713,23 +713,23 @@
}
/*******************************************************************************
-**
-** Function BTM_SecClrService
-**
-** Description Removes specified service record(s) from the security database.
-** All service records with the specified name are removed.
-** Typically used only by devices with limited RAM so that it can
-** reuse an old security service record.
-**
-** Note: Unpredictable results may occur if a service is cleared
-** that is still in use by an application/profile.
-**
-** Parameters Service ID - Id of the service to remove. ('0' removes all service
-** records (except SDP).
-**
-** Returns Number of records that were freed.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecClrService
+ *
+ * Description Removes specified service record(s) from the security database.
+ * All service records with the specified name are removed.
+ * Typically used only by devices with limited RAM so that it can
+ * reuse an old security service record.
+ *
+ * Note: Unpredictable results may occur if a service is cleared
+ * that is still in use by an application/profile.
+ *
+ * Parameters Service ID - Id of the service to remove. ('0' removes all service
+ * records (except SDP).
+ *
+ * Returns Number of records that were freed.
+ *
+ ******************************************************************************/
uint8_t BTM_SecClrService (uint8_t service_id)
{
tBTM_SEC_SERV_REC *p_srec = &btm_cb.sec_serv_rec[0];
@@ -755,21 +755,21 @@
}
/*******************************************************************************
-**
-** Function btm_sec_clr_service_by_psm
-**
-** Description Removes specified service record from the security database.
-** All service records with the specified psm are removed.
-** Typically used by L2CAP to free up the service record used
-** by dynamic PSM clients when the channel is closed.
-** The given psm must be a virtual psm.
-**
-** Parameters Service ID - Id of the service to remove. ('0' removes all service
-** records (except SDP).
-**
-** Returns Number of records that were freed.
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_clr_service_by_psm
+ *
+ * Description Removes specified service record from the security database.
+ * All service records with the specified psm are removed.
+ * Typically used by L2CAP to free up the service record used
+ * by dynamic PSM clients when the channel is closed.
+ * The given psm must be a virtual psm.
+ *
+ * Parameters Service ID - Id of the service to remove. ('0' removes all service
+ * records (except SDP).
+ *
+ * Returns Number of records that were freed.
+ *
+ ******************************************************************************/
uint8_t btm_sec_clr_service_by_psm (uint16_t psm)
{
tBTM_SEC_SERV_REC *p_srec = &btm_cb.sec_serv_rec[0];
@@ -792,17 +792,17 @@
}
/*******************************************************************************
-**
-** Function btm_sec_clr_temp_auth_service
-**
-** Description Removes specified device record's temporary authorization
-** flag from the security database.
-**
-** Parameters Device address to be cleared
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_clr_temp_auth_service
+ *
+ * Description Removes specified device record's temporary authorization
+ * flag from the security database.
+ *
+ * Parameters Device address to be cleared
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void btm_sec_clr_temp_auth_service (BD_ADDR bda)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -825,19 +825,19 @@
}
/*******************************************************************************
-**
-** Function BTM_PINCodeReply
-**
-** Description This function is called after Security Manager submitted
-** PIN code request to the UI.
-**
-** Parameters: bd_addr - Address of the device for which PIN was requested
-** res - result of the operation BTM_SUCCESS if success
-** pin_len - length in bytes of the PIN Code
-** p_pin - pointer to array with the PIN Code
-** trusted_mask - bitwise OR of trusted services (array of uint32_t)
-**
-*******************************************************************************/
+ *
+ * Function BTM_PINCodeReply
+ *
+ * Description This function is called after Security Manager submitted
+ * PIN code request to the UI.
+ *
+ * Parameters: bd_addr - Address of the device for which PIN was requested
+ * res - result of the operation BTM_SUCCESS if success
+ * pin_len - length in bytes of the PIN Code
+ * p_pin - pointer to array with the PIN Code
+ * trusted_mask - bitwise OR of trusted services (array of uint32_t)
+ *
+ ******************************************************************************/
void BTM_PINCodeReply (BD_ADDR bd_addr, uint8_t res, uint8_t pin_len, uint8_t *p_pin, uint32_t trusted_mask[])
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -946,18 +946,18 @@
}
/*******************************************************************************
-**
-** Function btm_sec_bond_by_transport
-**
-** Description this is the bond function that will start either SSP or SMP.
-**
-** Parameters: bd_addr - Address of the device to bond
-** pin_len - length in bytes of the PIN Code
-** p_pin - pointer to array with the PIN Code
-** trusted_mask - bitwise OR of trusted services (array of uint32_t)
-**
-** Note: After 2.1 parameters are not used and preserved here not to change API
-*******************************************************************************/
+ *
+ * Function btm_sec_bond_by_transport
+ *
+ * Description this is the bond function that will start either SSP or SMP.
+ *
+ * Parameters: bd_addr - Address of the device to bond
+ * pin_len - length in bytes of the PIN Code
+ * p_pin - pointer to array with the PIN Code
+ * trusted_mask - bitwise OR of trusted services (array of uint32_t)
+ *
+ * Note: After 2.1 parameters are not used and preserved here not to change API
+ ******************************************************************************/
tBTM_STATUS btm_sec_bond_by_transport (BD_ADDR bd_addr, tBT_TRANSPORT transport,
uint8_t pin_len, uint8_t *p_pin, uint32_t trusted_mask[])
{
@@ -1128,21 +1128,21 @@
}
/*******************************************************************************
-**
-** Function BTM_SecBondByTransport
-**
-** Description This function is called to perform bonding with peer device.
-** If the connection is already up, but not secure, pairing
-** is attempted. If already paired BTM_SUCCESS is returned.
-**
-** Parameters: bd_addr - Address of the device to bond
-** transport - doing SSP over BR/EDR or SMP over LE
-** pin_len - length in bytes of the PIN Code
-** p_pin - pointer to array with the PIN Code
-** trusted_mask - bitwise OR of trusted services (array of uint32_t)
-**
-** Note: After 2.1 parameters are not used and preserved here not to change API
-*******************************************************************************/
+ *
+ * Function BTM_SecBondByTransport
+ *
+ * Description This function is called to perform bonding with peer device.
+ * If the connection is already up, but not secure, pairing
+ * is attempted. If already paired BTM_SUCCESS is returned.
+ *
+ * Parameters: bd_addr - Address of the device to bond
+ * transport - doing SSP over BR/EDR or SMP over LE
+ * pin_len - length in bytes of the PIN Code
+ * p_pin - pointer to array with the PIN Code
+ * trusted_mask - bitwise OR of trusted services (array of uint32_t)
+ *
+ * Note: After 2.1 parameters are not used and preserved here not to change API
+ ******************************************************************************/
tBTM_STATUS BTM_SecBondByTransport (BD_ADDR bd_addr, tBT_TRANSPORT transport,
uint8_t pin_len, uint8_t *p_pin, uint32_t trusted_mask[])
{
@@ -1160,20 +1160,20 @@
}
/*******************************************************************************
-**
-** Function BTM_SecBond
-**
-** Description This function is called to perform bonding with peer device.
-** If the connection is already up, but not secure, pairing
-** is attempted. If already paired BTM_SUCCESS is returned.
-**
-** Parameters: bd_addr - Address of the device to bond
-** pin_len - length in bytes of the PIN Code
-** p_pin - pointer to array with the PIN Code
-** trusted_mask - bitwise OR of trusted services (array of uint32_t)
-**
-** Note: After 2.1 parameters are not used and preserved here not to change API
-*******************************************************************************/
+ *
+ * Function BTM_SecBond
+ *
+ * Description This function is called to perform bonding with peer device.
+ * If the connection is already up, but not secure, pairing
+ * is attempted. If already paired BTM_SUCCESS is returned.
+ *
+ * Parameters: bd_addr - Address of the device to bond
+ * pin_len - length in bytes of the PIN Code
+ * p_pin - pointer to array with the PIN Code
+ * trusted_mask - bitwise OR of trusted services (array of uint32_t)
+ *
+ * Note: After 2.1 parameters are not used and preserved here not to change API
+ ******************************************************************************/
tBTM_STATUS BTM_SecBond (BD_ADDR bd_addr, uint8_t pin_len, uint8_t *p_pin, uint32_t trusted_mask[])
{
tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
@@ -1182,16 +1182,16 @@
return btm_sec_bond_by_transport(bd_addr, transport, pin_len, p_pin, trusted_mask);
}
/*******************************************************************************
-**
-** Function BTM_SecBondCancel
-**
-** Description This function is called to cancel ongoing bonding process
-** with peer device.
-**
-** Parameters: bd_addr - Address of the peer device
-** transport - false for BR/EDR link; true for LE link
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecBondCancel
+ *
+ * Description This function is called to cancel ongoing bonding process
+ * with peer device.
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * transport - false for BR/EDR link; true for LE link
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SecBondCancel (BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -1267,18 +1267,18 @@
}
/*******************************************************************************
-**
-** Function BTM_SecGetDeviceLinkKey
-**
-** Description This function is called to obtain link key for the device
-** it returns BTM_SUCCESS if link key is available, or
-** BTM_UNKNOWN_ADDR if Security Manager does not know about
-** the device or device record does not contain link key info
-**
-** Parameters: bd_addr - Address of the device
-** link_key - Link Key is copied into this array
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecGetDeviceLinkKey
+ *
+ * Description This function is called to obtain link key for the device
+ * it returns BTM_SUCCESS if link key is available, or
+ * BTM_UNKNOWN_ADDR if Security Manager does not know about
+ * the device or device record does not contain link key info
+ *
+ * Parameters: bd_addr - Address of the device
+ * link_key - Link Key is copied into this array
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SecGetDeviceLinkKey (BD_ADDR bd_addr, LINK_KEY link_key)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -1293,19 +1293,19 @@
}
/*******************************************************************************
-**
-** Function BTM_SecGetDeviceLinkKeyType
-**
-** Description This function is called to obtain link key type for the
-** device.
-** it returns BTM_SUCCESS if link key is available, or
-** BTM_UNKNOWN_ADDR if Security Manager does not know about
-** the device or device record does not contain link key info
-**
-** Returns BTM_LKEY_TYPE_IGNORE if link key is unknown, link type
-** otherwise.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecGetDeviceLinkKeyType
+ *
+ * Description This function is called to obtain link key type for the
+ * device.
+ * it returns BTM_SUCCESS if link key is available, or
+ * BTM_UNKNOWN_ADDR if Security Manager does not know about
+ * the device or device record does not contain link key info
+ *
+ * Returns BTM_LKEY_TYPE_IGNORE if link key is unknown, link type
+ * otherwise.
+ *
+ ******************************************************************************/
tBTM_LINK_KEY_TYPE BTM_SecGetDeviceLinkKeyType (BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -1318,32 +1318,32 @@
}
/*******************************************************************************
-**
-** Function BTM_SetEncryption
-**
-** Description This function is called to ensure that 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.
-**
-** Parameters: bd_addr - Address of the peer device
-** transport - Link transport
-** p_callback - Pointer to callback function called if
-** this function returns PENDING after required
-** procedures are completed. Can be set to NULL
-** if status is not desired.
-** p_ref_data - pointer to any data the caller wishes to receive
-** in the callback function upon completion.
-** can be set to NULL if not used.
-** sec_act - LE security action, unused for BR/EDR
-**
-** Returns BTM_SUCCESS - already encrypted
-** BTM_PENDING - command will be returned in the callback
-** BTM_WRONG_MODE- connection not up.
-** BTM_BUSY - security procedures are currently active
-** BTM_MODE_UNSUPPORTED - if security manager not linked in.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetEncryption
+ *
+ * Description This function is called to ensure that 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.
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * transport - Link transport
+ * p_callback - Pointer to callback function called if
+ * this function returns PENDING after required
+ * procedures are completed. Can be set to NULL
+ * if status is not desired.
+ * p_ref_data - pointer to any data the caller wishes to receive
+ * in the callback function upon completion.
+ * can be set to NULL if not used.
+ * sec_act - LE security action, unused for BR/EDR
+ *
+ * Returns BTM_SUCCESS - already encrypted
+ * BTM_PENDING - command will be returned in the callback
+ * BTM_WRONG_MODE- connection not up.
+ * BTM_BUSY - security procedures are currently active
+ * BTM_MODE_UNSUPPORTED - if security manager not linked in.
+ *
+ ******************************************************************************/
tBTM_STATUS BTM_SetEncryption (BD_ADDR bd_addr, tBT_TRANSPORT transport, tBTM_SEC_CBACK *p_callback,
void *p_ref_data, tBTM_BLE_SEC_ACT sec_act)
{
@@ -1432,7 +1432,7 @@
/*******************************************************************************
* disconnect the ACL link, if it's not done yet.
-*******************************************************************************/
+ ******************************************************************************/
static tBTM_STATUS btm_sec_send_hci_disconnect (tBTM_SEC_DEV_REC *p_dev_rec, uint8_t reason, uint16_t conn_handle)
{
uint8_t old_state = p_dev_rec->sec_state;
@@ -1485,16 +1485,16 @@
}
/*******************************************************************************
-**
-** Function BTM_ConfirmReqReply
-**
-** Description This function is called to confirm the numeric value for
-** Simple Pairing in response to BTM_SP_CFM_REQ_EVT
-**
-** Parameters: res - result of the operation BTM_SUCCESS if success
-** bd_addr - Address of the peer device
-**
-*******************************************************************************/
+ *
+ * Function BTM_ConfirmReqReply
+ *
+ * Description This function is called to confirm the numeric value for
+ * Simple Pairing in response to BTM_SP_CFM_REQ_EVT
+ *
+ * Parameters: res - result of the operation BTM_SUCCESS if success
+ * bd_addr - Address of the peer device
+ *
+ ******************************************************************************/
void BTM_ConfirmReqReply(tBTM_STATUS res, BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -1533,18 +1533,18 @@
}
/*******************************************************************************
-**
-** Function BTM_PasskeyReqReply
-**
-** Description This function is called to provide the passkey for
-** Simple Pairing in response to BTM_SP_KEY_REQ_EVT
-**
-** Parameters: res - result of the operation BTM_SUCCESS if success
-** bd_addr - Address of the peer device
-** passkey - numeric value in the range of
-** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
-**
-*******************************************************************************/
+ *
+ * Function BTM_PasskeyReqReply
+ *
+ * Description This function is called to provide the passkey for
+ * Simple Pairing in response to BTM_SP_KEY_REQ_EVT
+ *
+ * Parameters: res - result of the operation BTM_SUCCESS if success
+ * bd_addr - Address of the peer device
+ * passkey - numeric value in the range of
+ * BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
+ *
+ ******************************************************************************/
#if (BTM_LOCAL_IO_CAPS != BTM_IO_CAP_NONE)
void BTM_PasskeyReqReply(tBTM_STATUS res, BD_ADDR bd_addr, uint32_t passkey)
{
@@ -1597,19 +1597,19 @@
#endif
/*******************************************************************************
-**
-** Function BTM_SendKeypressNotif
-**
-** Description This function is used during the passkey entry model
-** by a device with KeyboardOnly IO capabilities
-** (very likely to be a HID Device).
-** It is called by a HID Device to inform the remote device when
-** a key has been entered or erased.
-**
-** Parameters: bd_addr - Address of the peer device
-** type - notification type
-**
-*******************************************************************************/
+ *
+ * Function BTM_SendKeypressNotif
+ *
+ * Description This function is used during the passkey entry model
+ * by a device with KeyboardOnly IO capabilities
+ * (very likely to be a HID Device).
+ * It is called by a HID Device to inform the remote device when
+ * a key has been entered or erased.
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * type - notification type
+ *
+ ******************************************************************************/
#if (BTM_LOCAL_IO_CAPS != BTM_IO_CAP_NONE)
void BTM_SendKeypressNotif(BD_ADDR bd_addr, tBTM_SP_KEY_TYPE type)
{
@@ -1620,20 +1620,20 @@
#endif
/*******************************************************************************
-**
-** Function BTM_IoCapRsp
-**
-** Description This function is called in response to BTM_SP_IO_REQ_EVT
-** When the event data io_req.oob_data is set to BTM_OOB_UNKNOWN
-** by the tBTM_SP_CALLBACK implementation, this function is
-** called to provide the actual response
-**
-** Parameters: bd_addr - Address of the peer device
-** io_cap - The IO capability of local device.
-** oob - BTM_OOB_NONE or BTM_OOB_PRESENT.
-** auth_req- MITM protection required or not.
-**
-*******************************************************************************/
+ *
+ * Function BTM_IoCapRsp
+ *
+ * Description This function is called in response to BTM_SP_IO_REQ_EVT
+ * When the event data io_req.oob_data is set to BTM_OOB_UNKNOWN
+ * by the tBTM_SP_CALLBACK implementation, this function is
+ * called to provide the actual response
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * io_cap - The IO capability of local device.
+ * oob - BTM_OOB_NONE or BTM_OOB_PRESENT.
+ * auth_req- MITM protection required or not.
+ *
+ ******************************************************************************/
void BTM_IoCapRsp(BD_ADDR bd_addr, tBTM_IO_CAP io_cap, tBTM_OOB_DATA oob, tBTM_AUTH_REQ auth_req)
{
BTM_TRACE_EVENT ("BTM_IoCapRsp: state: %s oob: %d io_cap: %d",
@@ -1656,30 +1656,30 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadLocalOobData
-**
-** Description This function is called to read the local OOB data from
-** LM
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLocalOobData
+ *
+ * Description This function is called to read the local OOB data from
+ * LM
+ *
+ ******************************************************************************/
void BTM_ReadLocalOobData(void)
{
btsnd_hcic_read_local_oob_data();
}
/*******************************************************************************
-**
-** Function BTM_RemoteOobDataReply
-**
-** Description This function is called to provide the remote OOB data for
-** Simple Pairing in response to BTM_SP_RMT_OOB_EVT
-**
-** Parameters: bd_addr - Address of the peer device
-** c - simple pairing Hash C.
-** r - simple pairing Randomizer C.
-**
-*******************************************************************************/
+ *
+ * Function BTM_RemoteOobDataReply
+ *
+ * Description This function is called to provide the remote OOB data for
+ * Simple Pairing in response to BTM_SP_RMT_OOB_EVT
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * c - simple pairing Hash C.
+ * r - simple pairing Randomizer C.
+ *
+ ******************************************************************************/
void BTM_RemoteOobDataReply(tBTM_STATUS res, BD_ADDR bd_addr, BT_OCTET16 c, BT_OCTET16 r)
{
BTM_TRACE_EVENT ("%s() - State: %s res: %d", __func__,
@@ -1703,23 +1703,23 @@
}
/*******************************************************************************
-**
-** Function BTM_BuildOobData
-**
-** Description This function is called to build the OOB data payload to
-** be sent over OOB (non-Bluetooth) link
-**
-** Parameters: p_data - the location for OOB data
-** max_len - p_data size.
-** c - simple pairing Hash C.
-** r - simple pairing Randomizer C.
-** name_len- 0, local device name would not be included.
-** otherwise, the local device name is included for
-** up to this specified length
-**
-** Returns Number of bytes in p_data.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BuildOobData
+ *
+ * Description This function is called to build the OOB data payload to
+ * be sent over OOB (non-Bluetooth) link
+ *
+ * Parameters: p_data - the location for OOB data
+ * max_len - p_data size.
+ * c - simple pairing Hash C.
+ * r - simple pairing Randomizer C.
+ * name_len- 0, local device name would not be included.
+ * otherwise, the local device name is included for
+ * up to this specified length
+ *
+ * Returns Number of bytes in p_data.
+ *
+ ******************************************************************************/
uint16_t BTM_BuildOobData(uint8_t *p_data, uint16_t max_len, BT_OCTET16 c,
BT_OCTET16 r, uint8_t name_len)
{
@@ -1794,19 +1794,19 @@
}
/*******************************************************************************
-**
-** Function BTM_BothEndsSupportSecureConnections
-**
-** Description This function is called to check if both the local device and the peer device
-** specified by bd_addr support BR/EDR Secure Connections.
-**
-** Parameters: bd_addr - address of the peer
-**
-** Returns true if BR/EDR Secure Connections are supported by both local
-** and the remote device.
-** else false.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BothEndsSupportSecureConnections
+ *
+ * Description This function is called to check if both the local device and the peer device
+ * specified by bd_addr support BR/EDR Secure Connections.
+ *
+ * Parameters: bd_addr - address of the peer
+ *
+ * Returns true if BR/EDR Secure Connections are supported by both local
+ * and the remote device.
+ * else false.
+ *
+ ******************************************************************************/
bool BTM_BothEndsSupportSecureConnections(BD_ADDR bd_addr)
{
return ((controller_get_interface()->supports_secure_connections()) &&
@@ -1814,18 +1814,18 @@
}
/*******************************************************************************
-**
-** Function BTM_PeerSupportsSecureConnections
-**
-** Description This function is called to check if the peer supports
-** BR/EDR Secure Connections.
-**
-** Parameters: bd_addr - address of the peer
-**
-** Returns true if BR/EDR Secure Connections are supported by the peer,
-** else false.
-**
-*******************************************************************************/
+ *
+ * Function BTM_PeerSupportsSecureConnections
+ *
+ * Description This function is called to check if the peer supports
+ * BR/EDR Secure Connections.
+ *
+ * Parameters: bd_addr - address of the peer
+ *
+ * Returns true if BR/EDR Secure Connections are supported by the peer,
+ * else false.
+ *
+ ******************************************************************************/
bool BTM_PeerSupportsSecureConnections(BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -1843,20 +1843,20 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadOobData
-**
-** 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
-** eir_tag - The associated EIR tag to read the data.
-** *p_len(output) - the length of the data with the given tag.
-**
-** Returns the beginning of the data with the given tag.
-** NULL, if the tag is not found.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadOobData
+ *
+ * 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
+ * eir_tag - The associated EIR tag to read the data.
+ * *p_len(output) - the length of the data with the given tag.
+ *
+ * Returns the beginning of the data with the given tag.
+ * NULL, if the tag is not found.
+ *
+ ******************************************************************************/
uint8_t * BTM_ReadOobData(uint8_t *p_data, uint8_t eir_tag, uint8_t *p_len)
{
uint8_t *p = p_data;
@@ -1912,19 +1912,19 @@
}
/*******************************************************************************
-**
-** Function BTM_SetOutService
-**
-** Description This function is called to set the service for
-** outgoing connections.
-**
-** If the profile/application calls BTM_SetSecurityLevel
-** before initiating a connection, this function does not
-** need to be called.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetOutService
+ *
+ * Description This function is called to set the service for
+ * outgoing connections.
+ *
+ * If the profile/application calls BTM_SetSecurityLevel
+ * before initiating a connection, this function does not
+ * need to be called.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void BTM_SetOutService(BD_ADDR bd_addr, uint8_t service_id, uint32_t mx_chan_id)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -1950,18 +1950,18 @@
}
/************************************************************************
-** I N T E R N A L F U N C T I O N S
-*************************************************************************/
+ * I N T E R N A L F U N C T I O N S
+ ************************************************************************/
/*******************************************************************************
-**
-** Function btm_sec_is_upgrade_possible
-**
-** Description This function returns true if the existing link key
-** can be upgraded or if the link key does not exist.
-**
-** Returns bool
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_is_upgrade_possible
+ *
+ * Description This function returns true if the existing link key
+ * can be upgraded or if the link key does not exist.
+ *
+ * Returns bool
+ *
+ ******************************************************************************/
static bool btm_sec_is_upgrade_possible(tBTM_SEC_DEV_REC *p_dev_rec, bool is_originator)
{
uint16_t mtm_check = is_originator ? BTM_SEC_OUT_MITM : BTM_SEC_IN_MITM;
@@ -2005,15 +2005,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_check_upgrade
-**
-** Description This function is called to check if the existing link key
-** needs to be upgraded.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_check_upgrade
+ *
+ * Description This function is called to check if the existing link key
+ * needs to be upgraded.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_sec_check_upgrade(tBTM_SEC_DEV_REC *p_dev_rec, bool is_originator)
{
@@ -2050,23 +2050,23 @@
}
/*******************************************************************************
-**
-** Function btm_sec_l2cap_access_req
-**
-** Description This function is called by the L2CAP to grant permission to
-** establish L2CAP connection to or from the peer device.
-**
-** Parameters: bd_addr - Address of the peer device
-** psm - L2CAP PSM
-** is_originator - true if protocol above L2CAP originates
-** connection
-** p_callback - Pointer to callback function called if
-** this function returns PENDING after required
-** procedures are complete. MUST NOT BE NULL.
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_l2cap_access_req
+ *
+ * Description This function is called by the L2CAP to grant permission to
+ * establish L2CAP connection to or from the peer device.
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * psm - L2CAP PSM
+ * is_originator - true if protocol above L2CAP originates
+ * connection
+ * p_callback - Pointer to callback function called if
+ * this function returns PENDING after required
+ * procedures are complete. MUST NOT BE NULL.
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
tBTM_STATUS btm_sec_l2cap_access_req (BD_ADDR bd_addr, uint16_t psm, uint16_t handle,
CONNECTION_TYPE conn_type,
tBTM_SEC_CALLBACK *p_callback,
@@ -2434,28 +2434,28 @@
}
/*******************************************************************************
-**
-** Function btm_sec_mx_access_request
-**
-** Description This function is called by all Multiplexing Protocols during
-** establishing connection to or from peer device to grant
-** permission to establish application connection.
-**
-** Parameters: bd_addr - Address of the peer device
-** psm - L2CAP PSM
-** is_originator - true if protocol above L2CAP originates
-** connection
-** mx_proto_id - protocol ID of the multiplexer
-** mx_chan_id - multiplexer channel to reach application
-** p_callback - Pointer to callback function called if
-** this function returns PENDING after required
-** procedures are completed
-** p_ref_data - Pointer to any reference data needed by the
-** the callback function.
-**
-** Returns BTM_CMD_STARTED
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_mx_access_request
+ *
+ * Description This function is called by all Multiplexing Protocols during
+ * establishing connection to or from peer device to grant
+ * permission to establish application connection.
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * psm - L2CAP PSM
+ * is_originator - true if protocol above L2CAP originates
+ * connection
+ * mx_proto_id - protocol ID of the multiplexer
+ * mx_chan_id - multiplexer channel to reach application
+ * p_callback - Pointer to callback function called if
+ * this function returns PENDING after required
+ * procedures are completed
+ * p_ref_data - Pointer to any reference data needed by the
+ * the callback function.
+ *
+ * Returns BTM_CMD_STARTED
+ *
+ ******************************************************************************/
tBTM_STATUS btm_sec_mx_access_request (BD_ADDR bd_addr, uint16_t psm, bool is_originator,
uint32_t mx_proto_id, uint32_t mx_chan_id,
tBTM_SEC_CALLBACK *p_callback, void *p_ref_data)
@@ -2664,15 +2664,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_conn_req
-**
-** Description This function is when the peer device is requesting
-** connection
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_conn_req
+ *
+ * Description This function is when the peer device is requesting
+ * connection
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_conn_req (uint8_t *bda, uint8_t *dc)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bda);
@@ -2743,15 +2743,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_bond_cancel_complete
-**
-** Description This function is called to report bond cancel complete
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_bond_cancel_complete
+ *
+ * Description This function is called to report bond cancel complete
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_sec_bond_cancel_complete (void)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -2780,16 +2780,16 @@
}
/*******************************************************************************
-**
-** Function btm_create_conn_cancel_complete
-**
-** Description This function is called when the command complete message
-** is received from the HCI for the create connection cancel
-** command.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_create_conn_cancel_complete
+ *
+ * Description This function is called when the command complete message
+ * is received from the HCI for the create connection cancel
+ * command.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_create_conn_cancel_complete (uint8_t *p)
{
uint8_t status;
@@ -2817,15 +2817,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_check_pending_reqs
-**
-** Description This function is called at the end of the security procedure
-** to let L2CAP and RFCOMM know to re-submit any pending requests
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_check_pending_reqs
+ *
+ * Description This function is called at the end of the security procedure
+ * to let L2CAP and RFCOMM know to re-submit any pending requests
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_check_pending_reqs (void)
{
if (btm_cb.pairing_state == BTM_PAIR_STATE_IDLE)
@@ -2872,14 +2872,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_init
-**
-** Description This function is on the SEC startup
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_init
+ *
+ * Description This function is on the SEC startup
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_init (uint8_t sec_mode)
{
btm_cb.security_mode = sec_mode;
@@ -2888,15 +2888,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_device_down
-**
-** Description This function should be called when device is disabled or
-** turned off
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_device_down
+ *
+ * Description This function should be called when device is disabled or
+ * turned off
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_device_down (void)
{
BTM_TRACE_EVENT ("%s() State: %s", __func__, btm_pair_state_descr(btm_cb.pairing_state));
@@ -2904,14 +2904,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_dev_reset
-**
-** Description This function should be called after device reset
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_dev_reset
+ *
+ * Description This function should be called after device reset
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_dev_reset (void)
{
if (controller_get_interface()->supports_simple_pairing())
@@ -2931,17 +2931,17 @@
}
/*******************************************************************************
-**
-** Function btm_sec_abort_access_req
-**
-** Description This function is called by the L2CAP or RFCOMM to abort
-** the pending operation.
-**
-** Parameters: bd_addr - Address of the peer device
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_abort_access_req
+ *
+ * Description This function is called by the L2CAP or RFCOMM to abort
+ * the pending operation.
+ *
+ * Parameters: bd_addr - Address of the peer device
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_abort_access_req (BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -2958,15 +2958,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_dd_create_conn
-**
-** Description This function is called to create the ACL connection for
-** the dedicated boding process
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_dd_create_conn
+ *
+ * Description This function is called to create the ACL connection for
+ * the dedicated boding process
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static tBTM_STATUS btm_sec_dd_create_conn (tBTM_SEC_DEV_REC *p_dev_rec)
{
tL2C_LCB *p_lcb = l2cu_find_lcb_by_bd_addr(p_dev_rec->bd_addr, BT_TRANSPORT_BR_EDR);
@@ -3023,15 +3023,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_rmt_name_request_complete
+ *
+ * Function btm_sec_rmt_name_request_complete
*
-** Description This function is called when remote name was obtained from
-** the peer device
-**
-** Returns void
-**
-*******************************************************************************/
+ * Description This function is called when remote name was obtained from
+ * the peer device
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_rmt_name_request_complete (uint8_t *p_bd_addr, uint8_t *p_bd_name, uint8_t status)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -3267,15 +3267,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_rmt_host_support_feat_evt
-**
-** Description This function is called when the
-** HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT is received
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_rmt_host_support_feat_evt
+ *
+ * Description This function is called when the
+ * HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT is received
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_rmt_host_support_feat_evt (uint8_t *p)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -3300,16 +3300,16 @@
}
/*******************************************************************************
-**
-** Function btm_io_capabilities_req
-**
-** Description This function is called when LM request for the IO
-** capability of the local device and
-** if the OOB data is present for the device in the event
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_io_capabilities_req
+ *
+ * Description This function is called when LM request for the IO
+ * capability of the local device and
+ * if the OOB data is present for the device in the event
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_io_capabilities_req (uint8_t *p)
{
tBTM_SP_IO_REQ evt_data;
@@ -3507,15 +3507,15 @@
}
/*******************************************************************************
-**
-** Function btm_io_capabilities_rsp
-**
-** Description This function is called when the IO capability of the
-** specified device is received
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_io_capabilities_rsp
+ *
+ * Description This function is called when the IO capability of the
+ * specified device is received
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_io_capabilities_rsp (uint8_t *p)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -3571,17 +3571,17 @@
}
/*******************************************************************************
-**
-** Function btm_proc_sp_req_evt
-**
-** Description This function is called to process/report
-** HCI_USER_CONFIRMATION_REQUEST_EVT
-** or HCI_USER_PASSKEY_REQUEST_EVT
-** or HCI_USER_PASSKEY_NOTIFY_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_proc_sp_req_evt
+ *
+ * Description This function is called to process/report
+ * HCI_USER_CONFIRMATION_REQUEST_EVT
+ * or HCI_USER_PASSKEY_REQUEST_EVT
+ * or HCI_USER_PASSKEY_NOTIFY_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_proc_sp_req_evt (tBTM_SP_EVT event, uint8_t *p)
{
tBTM_STATUS status = BTM_ERR_PROCESSING;
@@ -3712,15 +3712,15 @@
}
/*******************************************************************************
-**
-** Function btm_keypress_notif_evt
-**
-** Description This function is called when a key press notification is
-** received
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_keypress_notif_evt
+ *
+ * Description This function is called when a key press notification is
+ * received
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_keypress_notif_evt (uint8_t *p)
{
tBTM_SP_KEYPRESS evt_data;
@@ -3739,15 +3739,15 @@
}
/*******************************************************************************
-**
-** Function btm_simple_pair_complete
-**
-** Description This function is called when simple pairing process is
-** complete
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_simple_pair_complete
+ *
+ * Description This function is called when simple pairing process is
+ * complete
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_simple_pair_complete (uint8_t *p)
{
tBTM_SP_COMPLT evt_data;
@@ -3822,15 +3822,15 @@
}
/*******************************************************************************
-**
-** Function btm_rem_oob_req
-**
-** Description This function is called to process/report
-** HCI_REMOTE_OOB_DATA_REQUEST_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_rem_oob_req
+ *
+ * Description This function is called to process/report
+ * HCI_REMOTE_OOB_DATA_REQUEST_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_rem_oob_req (uint8_t *p)
{
uint8_t *p_bda;
@@ -3867,15 +3867,15 @@
}
/*******************************************************************************
-**
-** Function btm_read_local_oob_complete
-**
-** Description This function is called when read local oob data is
-** completed by the LM
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_read_local_oob_complete
+ *
+ * Description This function is called when read local oob data is
+ * completed by the LM
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_read_local_oob_complete (uint8_t *p)
{
tBTM_SP_LOC_OOB evt_data;
@@ -3896,15 +3896,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_auth_collision
-**
-** Description This function is called when authentication or encryption
-** needs to be retried at a later time.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_auth_collision
+ *
+ * Description This function is called when authentication or encryption
+ * needs to be retried at a later time.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_sec_auth_collision (uint16_t handle)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -3939,15 +3939,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_auth_complete
-**
-** Description This function is when authentication of the connection is
-** completed by the LM
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_auth_complete
+ *
+ * Description This function is when authentication of the connection is
+ * completed by the LM
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_auth_complete (uint16_t handle, uint8_t status)
{
uint8_t old_sm4;
@@ -4143,15 +4143,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_encrypt_change
-**
-** Description This function is when encryption of the connection is
-** completed by the LM
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_encrypt_change
+ *
+ * Description This function is when encryption of the connection is
+ * completed by the LM
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_encrypt_change (uint16_t handle, uint8_t status, uint8_t encr_enable)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev_by_handle (handle);
@@ -4309,15 +4309,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_connect_after_reject_timeout
-**
-** Description Connection for bonding could not start because of the collision
-** Initiate outgoing connection
-**
-** Returns Pointer to the TLE struct
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_connect_after_reject_timeout
+ *
+ * Description Connection for bonding could not start because of the collision
+ * Initiate outgoing connection
+ *
+ * Returns Pointer to the TLE struct
+ *
+ ******************************************************************************/
static void btm_sec_connect_after_reject_timeout(UNUSED_ATTR void *data)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_cb.p_collided_dev_rec;
@@ -4339,15 +4339,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_connected
-**
-** Description This function is when a connection to the peer device is
-** establsihed
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_connected
+ *
+ * Description This function is when a connection to the peer device is
+ * establsihed
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_connected (uint8_t *bda, uint16_t handle, uint8_t status, uint8_t enc_mode)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bda);
@@ -4649,14 +4649,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_disconnect
-**
-** Description This function is called to disconnect HCI link
-**
-** Returns btm status
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_disconnect
+ *
+ * Description This function is called to disconnect HCI link
+ *
+ * Returns btm status
+ *
+ ******************************************************************************/
tBTM_STATUS btm_sec_disconnect (uint16_t handle, uint8_t reason)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev_by_handle (handle);
@@ -4682,15 +4682,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_disconnected
-**
-** Description This function is when a connection to the peer device is
-** dropped
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_disconnected
+ *
+ * Description This function is when a connection to the peer device is
+ * dropped
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_disconnected (uint16_t handle, uint8_t reason)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev_by_handle (handle);
@@ -4790,15 +4790,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_link_key_notification
-**
-** Description This function is called when a new connection link key is
-** generated
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_link_key_notification
+ *
+ * Description This function is called when a new connection link key is
+ * generated
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
void btm_sec_link_key_notification (uint8_t *p_bda, uint8_t *p_link_key, uint8_t key_type)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_or_alloc_dev (p_bda);
@@ -4926,14 +4926,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_link_key_request
-**
-** Description This function is called when controller requests link key
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_link_key_request
+ *
+ * Description This function is called when controller requests link key
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
void btm_sec_link_key_request (uint8_t *p_bda)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_or_alloc_dev (p_bda);
@@ -4965,15 +4965,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_pairing_timeout
-**
-** Description This function is called when host does not provide PIN
-** within requested time
-**
-** Returns Pointer to the TLE struct
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_pairing_timeout
+ *
+ * Description This function is called when host does not provide PIN
+ * within requested time
+ *
+ * Returns Pointer to the TLE struct
+ *
+ ******************************************************************************/
static void btm_sec_pairing_timeout(UNUSED_ATTR void *data)
{
tBTM_CB *p_cb = &btm_cb;
@@ -5090,14 +5090,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_pin_code_request
-**
-** Description This function is called when controller requests PIN code
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_pin_code_request
+ *
+ * Description This function is called when controller requests PIN code
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
void btm_sec_pin_code_request (uint8_t *p_bda)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -5226,14 +5226,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_update_clock_offset
-**
-** Description This function is called to update clock offset
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_update_clock_offset
+ *
+ * Description This function is called to update clock offset
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_update_clock_offset (uint16_t handle, uint16_t clock_offset)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -5253,24 +5253,24 @@
}
/******************************************************************
-** S T A T I C F U N C T I O N S
-*******************************************************************/
+ * S T A T I C F U N C T I O N S
+ ******************************************************************/
/*******************************************************************************
-**
-** Function btm_sec_execute_procedure
-**
-** Description This function is called to start required security
-** procedure. There is a case when multiplexing protocol
-** calls this function on the originating side, connection to
-** the peer will not be established. This function in this
-** case performs only authorization.
-**
-** Returns BTM_SUCCESS - permission is granted
-** BTM_CMD_STARTED - in process
-** BTM_NO_RESOURCES - permission declined
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_execute_procedure
+ *
+ * Description This function is called to start required security
+ * procedure. There is a case when multiplexing protocol
+ * calls this function on the originating side, connection to
+ * the peer will not be established. This function in this
+ * case performs only authorization.
+ *
+ * Returns BTM_SUCCESS - permission is granted
+ * BTM_CMD_STARTED - in process
+ * BTM_NO_RESOURCES - permission declined
+ *
+ ******************************************************************************/
static tBTM_STATUS btm_sec_execute_procedure (tBTM_SEC_DEV_REC *p_dev_rec)
{
BTM_TRACE_EVENT ("btm_sec_execute_procedure: Required:0x%x Flags:0x%x State:%d",
@@ -5401,14 +5401,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_start_get_name
-**
-** Description This function is called to start get name procedure
-**
-** Returns true if started
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_start_get_name
+ *
+ * Description This function is called to start get name procedure
+ *
+ * Returns true if started
+ *
+ ******************************************************************************/
static bool btm_sec_start_get_name (tBTM_SEC_DEV_REC *p_dev_rec)
{
uint8_t tempstate = p_dev_rec->sec_state;
@@ -5428,12 +5428,12 @@
}
/*******************************************************************************
-**
-** Function btm_sec_start_authentication
-**
-** Description This function is called to start authentication
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_start_authentication
+ *
+ * Description This function is called to start authentication
+ *
+ ******************************************************************************/
static void btm_sec_start_authentication(tBTM_SEC_DEV_REC *p_dev_rec)
{
p_dev_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING;
@@ -5441,12 +5441,12 @@
}
/*******************************************************************************
-**
-** Function btm_sec_start_encryption
-**
-** Description This function is called to start encryption
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_start_encryption
+ *
+ * Description This function is called to start encryption
+ *
+ ******************************************************************************/
static void btm_sec_start_encryption(tBTM_SEC_DEV_REC *p_dev_rec)
{
btsnd_hcic_set_conn_encrypt(p_dev_rec->hci_handle, true);
@@ -5454,14 +5454,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_start_authorization
-**
-** Description This function is called to start authorization
-**
-** Returns true if started
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_start_authorization
+ *
+ * Description This function is called to start authorization
+ *
+ * Returns true if started
+ *
+ ******************************************************************************/
static uint8_t btm_sec_start_authorization (tBTM_SEC_DEV_REC *p_dev_rec)
{
uint8_t result;
@@ -5523,14 +5523,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_are_all_trusted
-**
-** Description This function is called check if all services are trusted
-**
-** Returns true if all are trusted, otherwise false
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_are_all_trusted
+ *
+ * Description This function is called check if all services are trusted
+ *
+ * Returns true if all are trusted, otherwise false
+ *
+ ******************************************************************************/
bool btm_sec_are_all_trusted(uint32_t p_mask[])
{
uint32_t trusted_inx;
@@ -5544,15 +5544,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_find_first_serv
-**
-** Description Look for the first record in the service database
-** with specified PSM
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_find_first_serv
+ *
+ * Description Look for the first record in the service database
+ * with specified PSM
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
tBTM_SEC_SERV_REC *btm_sec_find_first_serv (CONNECTION_TYPE conn_type, uint16_t psm)
{
tBTM_SEC_SERV_REC *p_serv_rec = &btm_cb.sec_serv_rec[0];
@@ -5586,15 +5586,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_find_next_serv
-**
-** Description Look for the next record in the service database
-** with specified PSM
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_find_next_serv
+ *
+ * Description Look for the next record in the service database
+ * with specified PSM
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
static tBTM_SEC_SERV_REC *btm_sec_find_next_serv (tBTM_SEC_SERV_REC *p_cur)
{
tBTM_SEC_SERV_REC *p_serv_rec = &btm_cb.sec_serv_rec[0];
@@ -5615,15 +5615,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_find_mx_serv
-**
-** Description Look for the record in the service database with specified
-** PSM and multiplexor channel information
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_find_mx_serv
+ *
+ * Description Look for the record in the service database with specified
+ * PSM and multiplexor channel information
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
static tBTM_SEC_SERV_REC *btm_sec_find_mx_serv (uint8_t is_originator, uint16_t psm,
uint32_t mx_proto_id, uint32_t mx_chan_id)
{
@@ -5657,15 +5657,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_collision_timeout
-**
-** Description Encryption could not start because of the collision
-** try to do it again
-**
-** Returns Pointer to the TLE struct
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_collision_timeout
+ *
+ * Description Encryption could not start because of the collision
+ * try to do it again
+ *
+ * Returns Pointer to the TLE struct
+ *
+ ******************************************************************************/
static void btm_sec_collision_timeout(UNUSED_ATTR void *data)
{
BTM_TRACE_EVENT ("%s()", __func__);
@@ -5681,14 +5681,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_link_key_request
-**
-** Description This function is called when controller requests link key
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_link_key_request
+ *
+ * Description This function is called when controller requests link key
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
static void btm_send_link_key_notif (tBTM_SEC_DEV_REC *p_dev_rec)
{
if (btm_cb.api.p_link_key_callback)
@@ -5698,17 +5698,17 @@
}
/*******************************************************************************
-**
-** Function BTM_ReadTrustedMask
-**
-** Description Get trusted mask for the peer device
-**
-** Parameters: bd_addr - Address of the device
-**
-** Returns NULL, if the device record is not found.
-** otherwise, the trusted mask
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadTrustedMask
+ *
+ * Description Get trusted mask for the peer device
+ *
+ * Parameters: bd_addr - Address of the device
+ *
+ * Returns NULL, if the device record is not found.
+ * otherwise, the trusted mask
+ *
+ ******************************************************************************/
uint32_t * BTM_ReadTrustedMask (BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -5718,16 +5718,16 @@
}
/*******************************************************************************
-**
-** Function btm_restore_mode
-**
-** Description This function returns the security mode to previous setting
-** if it was changed during bonding.
-**
-**
-** Parameters: void
-**
-*******************************************************************************/
+ *
+ * Function btm_restore_mode
+ *
+ * Description This function returns the security mode to previous setting
+ * if it was changed during bonding.
+ *
+ *
+ * Parameters: void
+ *
+ ******************************************************************************/
static void btm_restore_mode(void)
{
if (btm_cb.security_mode_changed)
@@ -5757,15 +5757,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_find_dev_by_sec_state
-**
-** Description Look for the record in the device database for the device
-** which is being authenticated or encrypted
-**
-** Returns Pointer to the record or NULL
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_find_dev_by_sec_state
+ *
+ * Description Look for the record in the device database for the device
+ * which is being authenticated or encrypted
+ *
+ * Returns Pointer to the record or NULL
+ *
+ ******************************************************************************/
tBTM_SEC_DEV_REC *btm_sec_find_dev_by_sec_state (uint8_t state)
{
list_node_t *n = list_foreach(btm_cb.sec_dev_rec, is_sec_state_equal, &state);
@@ -5776,12 +5776,12 @@
}
/*******************************************************************************
-**
-** Function btm_sec_change_pairing_state
-**
-** Description This function is called to change pairing state
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_change_pairing_state
+ *
+ * Description This function is called to change pairing state
+ *
+ ******************************************************************************/
static void btm_sec_change_pairing_state (tBTM_PAIRING_STATE new_state)
{
tBTM_PAIRING_STATE old_state = btm_cb.pairing_state;
@@ -5822,12 +5822,12 @@
}
/*******************************************************************************
-**
-** Function btm_pair_state_descr
-**
-** Description Return state description for tracing
-**
-*******************************************************************************/
+ *
+ * Function btm_pair_state_descr
+ *
+ * Description Return state description for tracing
+ *
+ ******************************************************************************/
static const char *btm_pair_state_descr (tBTM_PAIRING_STATE state)
{
switch (state)
@@ -5849,15 +5849,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_dev_rec_cback_event
-**
-** Description This function calls the callback function with the given
-** result and clear the callback function.
-**
-** Parameters: void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_dev_rec_cback_event
+ *
+ * Description This function calls the callback function with the given
+ * result and clear the callback function.
+ *
+ * Parameters: void
+ *
+ ******************************************************************************/
void btm_sec_dev_rec_cback_event (tBTM_SEC_DEV_REC *p_dev_rec, uint8_t res, bool is_le_transport)
{
tBTM_SEC_CALLBACK *p_callback = p_dev_rec->p_callback;
@@ -5876,12 +5876,12 @@
}
/*******************************************************************************
-**
-** Function btm_sec_queue_mx_request
-**
-** Description Return state description for tracing
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_queue_mx_request
+ *
+ * Description Return state description for tracing
+ *
+ ******************************************************************************/
static bool btm_sec_queue_mx_request (BD_ADDR bd_addr, uint16_t psm, bool is_orig,
uint32_t mx_proto_id, uint32_t mx_chan_id,
tBTM_SEC_CALLBACK *p_callback, void *p_ref_data)
@@ -5959,16 +5959,16 @@
}
/*******************************************************************************
-**
-** Function btm_sec_auth_payload_tout
-**
-** Description Processes the HCI Autheniticated Payload Timeout Event
-** indicating that a packet containing a valid MIC on the
-** connection handle was not received within the programmed
-** timeout value. (Spec Default is 30 secs, but can be
-** changed via the BTM_SecSetAuthPayloadTimeout() function.
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_auth_payload_tout
+ *
+ * Description Processes the HCI Autheniticated Payload Timeout Event
+ * indicating that a packet containing a valid MIC on the
+ * connection handle was not received within the programmed
+ * timeout value. (Spec Default is 30 secs, but can be
+ * changed via the BTM_SecSetAuthPayloadTimeout() function.
+ *
+ ******************************************************************************/
void btm_sec_auth_payload_tout (uint8_t *p, uint16_t hci_evt_len)
{
uint16_t handle;
@@ -5981,13 +5981,13 @@
}
/*******************************************************************************
-**
-** Function btm_sec_queue_encrypt_request
-**
-** Description encqueue encryption request when device has active security
-** process pending.
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_queue_encrypt_request
+ *
+ * Description encqueue encryption request when device has active security
+ * process pending.
+ *
+ ******************************************************************************/
static bool btm_sec_queue_encrypt_request (BD_ADDR bd_addr, tBT_TRANSPORT transport,
tBTM_SEC_CALLBACK *p_callback, void *p_ref_data,
tBTM_BLE_SEC_ACT sec_act)
@@ -6007,15 +6007,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_set_peer_sec_caps
-**
-** Description This function is called to set sm4 and rmt_sec_caps fields
-** based on the available peer device features.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_set_peer_sec_caps
+ *
+ * Description This function is called to set sm4 and rmt_sec_caps fields
+ * based on the available peer device features.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_set_peer_sec_caps(tACL_CONN *p_acl_cb, tBTM_SEC_DEV_REC *p_dev_rec)
{
BD_ADDR rem_bd_addr;
@@ -6052,15 +6052,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_is_serv_level0
-**
-** Description This function is called to check if the service corresponding
-** to PSM is security mode 4 level 0 service.
-**
-** Returns true if the service is security mode 4 level 0 service
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_is_serv_level0
+ *
+ * Description This function is called to check if the service corresponding
+ * to PSM is security mode 4 level 0 service.
+ *
+ * Returns true if the service is security mode 4 level 0 service
+ *
+ ******************************************************************************/
static bool btm_sec_is_serv_level0(uint16_t psm)
{
if (psm == BT_PSM_SDP)
@@ -6072,15 +6072,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_check_pending_enc_req
-**
-** Description This function is called to send pending encryption callback if
-** waiting
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_check_pending_enc_req
+ *
+ * Description This function is called to send pending encryption callback if
+ * waiting
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btm_sec_check_pending_enc_req (tBTM_SEC_DEV_REC *p_dev_rec, tBT_TRANSPORT transport,
uint8_t encr_enable)
{
@@ -6111,15 +6111,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_set_serv_level4_flags
-**
-** Description This function is called to set security mode 4 level 4 flags.
-**
-** Returns service security requirements updated to include secure
-** connections only mode.
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_set_serv_level4_flags
+ *
+ * Description This function is called to set security mode 4 level 4 flags.
+ *
+ * Returns service security requirements updated to include secure
+ * connections only mode.
+ *
+ ******************************************************************************/
static uint16_t btm_sec_set_serv_level4_flags(uint16_t cur_security, bool is_originator)
{
uint16_t sec_level4_flags = is_originator ? BTM_SEC_OUT_LEVEL4_FLAGS : BTM_SEC_IN_LEVEL4_FLAGS;
@@ -6128,16 +6128,16 @@
}
/*******************************************************************************
-**
-** Function btm_sec_clear_ble_keys
-**
-** Description This function is called to clear out the BLE keys.
-** Typically when devices are removed in BTM_SecDeleteDevice,
-** or when a new BT Link key is generated.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_clear_ble_keys
+ *
+ * Description This function is called to clear out the BLE keys.
+ * Typically when devices are removed in BTM_SecDeleteDevice,
+ * or when a new BT Link key is generated.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btm_sec_clear_ble_keys (tBTM_SEC_DEV_REC *p_dev_rec)
{
@@ -6151,14 +6151,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_is_a_bonded_dev
-**
-** Description Is the specified device is a bonded device
-**
-** Returns true - dev is bonded
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_is_a_bonded_dev
+ *
+ * Description Is the specified device is a bonded device
+ *
+ * Returns true - dev is bonded
+ *
+ ******************************************************************************/
bool btm_sec_is_a_bonded_dev (BD_ADDR bda)
{
@@ -6176,14 +6176,14 @@
}
/*******************************************************************************
-**
-** Function btm_sec_is_le_capable_dev
-**
-** Description Is the specified device is dual mode or LE only device
-**
-** Returns true - dev is a dual mode
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_is_le_capable_dev
+ *
+ * Description Is the specified device is dual mode or LE only device
+ *
+ * Returns true - dev is a dual mode
+ *
+ ******************************************************************************/
bool btm_sec_is_le_capable_dev (BD_ADDR bda)
{
tBTM_SEC_DEV_REC *p_dev_rec= btm_find_dev (bda);
@@ -6195,19 +6195,19 @@
}
/*******************************************************************************
-**
-** Function btm_sec_use_smp_br_chnl
-**
-** Description The function checks if SMP BR connection can be used with
-** the peer.
-** Is called when authentication for dedicated bonding is
-** successfully completed.
-**
-** Returns true - if SMP BR connection can be used (the link key is
-** generated from P-256 and the peer supports Security
-** Manager over BR).
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_use_smp_br_chnl
+ *
+ * Description The function checks if SMP BR connection can be used with
+ * the peer.
+ * Is called when authentication for dedicated bonding is
+ * successfully completed.
+ *
+ * Returns true - if SMP BR connection can be used (the link key is
+ * generated from P-256 and the peer supports Security
+ * Manager over BR).
+ *
+ ******************************************************************************/
static bool btm_sec_use_smp_br_chnl(tBTM_SEC_DEV_REC *p_dev_rec)
{
uint32_t ext_feat;
@@ -6230,15 +6230,15 @@
}
/*******************************************************************************
-**
-** Function btm_sec_is_master
-**
-** Description The function checks if the device is BR/EDR master after
-** pairing is completed.
-**
-** Returns true - if the device is master.
-**
-*******************************************************************************/
+ *
+ * Function btm_sec_is_master
+ *
+ * Description The function checks if the device is BR/EDR master after
+ * pairing is completed.
+ *
+ * Returns true - if the device is master.
+ *
+ ******************************************************************************/
static bool btm_sec_is_master(tBTM_SEC_DEV_REC *p_dev_rec)
{
tACL_CONN *p= btm_bda_to_acl(p_dev_rec->bd_addr, BT_TRANSPORT_BR_EDR);
diff --git a/stack/btu/btu_hcif.cc b/stack/btu/btu_hcif.cc
index 7c9e9df..cffe3e1 100644
--- a/stack/btu/btu_hcif.cc
+++ b/stack/btu/btu_hcif.cc
@@ -52,9 +52,9 @@
extern void btm_process_cancel_complete(uint8_t status, uint8_t mode);
extern void btm_ble_test_command_complete(uint8_t *p);
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void btu_hcif_inquiry_comp_evt (uint8_t *p);
static void btu_hcif_inquiry_result_evt (uint8_t *p);
static void btu_hcif_inquiry_rssi_result_evt (uint8_t *p);
@@ -125,15 +125,15 @@
#endif
/*******************************************************************************
-**
-** Function btu_hcif_process_event
-**
-** Description This function is called when an event is received from
-** the Host Controller.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_process_event
+ *
+ * Description This function is called when an event is received from
+ * the Host Controller.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btu_hcif_process_event (UNUSED_ATTR uint8_t controller_id, BT_HDR *p_msg)
{
uint8_t *p = (uint8_t *)(p_msg + 1) + p_msg->offset;
@@ -333,14 +333,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_send_cmd
-**
-** Description This function is called to send commands to the Host Controller.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_send_cmd
+ *
+ * Description This function is called to send commands to the Host Controller.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btu_hcif_send_cmd (UNUSED_ATTR uint8_t controller_id, BT_HDR *p_buf)
{
if (!p_buf)
@@ -469,14 +469,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_inquiry_comp_evt
-**
-** Description Process event HCI_INQUIRY_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_inquiry_comp_evt
+ *
+ * Description Process event HCI_INQUIRY_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_inquiry_comp_evt (uint8_t *p)
{
uint8_t status;
@@ -488,14 +488,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_inquiry_result_evt
-**
-** Description Process event HCI_INQUIRY_RESULT_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_inquiry_result_evt
+ *
+ * Description Process event HCI_INQUIRY_RESULT_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_inquiry_result_evt (uint8_t *p)
{
/* Store results in the cache */
@@ -503,14 +503,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_inquiry_rssi_result_evt
-**
-** Description Process event HCI_INQUIRY_RSSI_RESULT_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_inquiry_rssi_result_evt
+ *
+ * Description Process event HCI_INQUIRY_RSSI_RESULT_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_inquiry_rssi_result_evt (uint8_t *p)
{
/* Store results in the cache */
@@ -518,14 +518,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_extended_inquiry_result_evt
-**
-** Description Process event HCI_EXTENDED_INQUIRY_RESULT_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_extended_inquiry_result_evt
+ *
+ * Description Process event HCI_EXTENDED_INQUIRY_RESULT_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_extended_inquiry_result_evt (uint8_t *p)
{
/* Store results in the cache */
@@ -533,14 +533,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_connection_comp_evt
-**
-** Description Process event HCI_CONNECTION_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_connection_comp_evt
+ *
+ * Description Process event HCI_CONNECTION_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_connection_comp_evt (uint8_t *p)
{
uint8_t status;
@@ -578,14 +578,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_connection_request_evt
-**
-** Description Process event HCI_CONNECTION_REQUEST_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_connection_request_evt
+ *
+ * Description Process event HCI_CONNECTION_REQUEST_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_connection_request_evt (uint8_t *p)
{
BD_ADDR bda;
@@ -611,14 +611,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_disconnection_comp_evt
-**
-** Description Process event HCI_DISCONNECTION_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_disconnection_comp_evt
+ *
+ * Description Process event HCI_DISCONNECTION_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_disconnection_comp_evt (uint8_t *p)
{
uint16_t handle;
@@ -643,14 +643,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_authentication_comp_evt
-**
-** Description Process event HCI_AUTHENTICATION_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_authentication_comp_evt
+ *
+ * Description Process event HCI_AUTHENTICATION_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_authentication_comp_evt (uint8_t *p)
{
uint8_t status;
@@ -663,14 +663,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_rmt_name_request_comp_evt
-**
-** Description Process event HCI_RMT_NAME_REQUEST_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_rmt_name_request_comp_evt
+ *
+ * Description Process event HCI_RMT_NAME_REQUEST_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_rmt_name_request_comp_evt (uint8_t *p, uint16_t evt_len)
{
uint8_t status;
@@ -687,14 +687,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_encryption_change_evt
-**
-** Description Process event HCI_ENCRYPTION_CHANGE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_encryption_change_evt
+ *
+ * Description Process event HCI_ENCRYPTION_CHANGE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_encryption_change_evt (uint8_t *p)
{
uint8_t status;
@@ -710,28 +710,28 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_read_rmt_features_comp_evt
-**
-** Description Process event HCI_READ_RMT_FEATURES_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_read_rmt_features_comp_evt
+ *
+ * Description Process event HCI_READ_RMT_FEATURES_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_read_rmt_features_comp_evt (uint8_t *p)
{
btm_read_remote_features_complete(p);
}
/*******************************************************************************
-**
-** Function btu_hcif_read_rmt_ext_features_comp_evt
-**
-** Description Process event HCI_READ_RMT_EXT_FEATURES_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_read_rmt_ext_features_comp_evt
+ *
+ * Description Process event HCI_READ_RMT_EXT_FEATURES_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_read_rmt_ext_features_comp_evt (uint8_t *p)
{
uint8_t *p_cur = p;
@@ -750,28 +750,28 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_read_rmt_version_comp_evt
-**
-** Description Process event HCI_READ_RMT_VERSION_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_read_rmt_version_comp_evt
+ *
+ * Description Process event HCI_READ_RMT_VERSION_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_read_rmt_version_comp_evt (uint8_t *p)
{
btm_read_remote_version_complete (p);
}
/*******************************************************************************
-**
-** Function btu_hcif_qos_setup_comp_evt
-**
-** Description Process event HCI_QOS_SETUP_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_qos_setup_comp_evt
+ *
+ * Description Process event HCI_QOS_SETUP_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_qos_setup_comp_evt (uint8_t *p)
{
uint8_t status;
@@ -791,14 +791,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_esco_connection_comp_evt
-**
-** Description Process event HCI_ESCO_CONNECTION_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_esco_connection_comp_evt
+ *
+ * Description Process event HCI_ESCO_CONNECTION_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_esco_connection_comp_evt (uint8_t *p)
{
#if (BTM_SCO_INCLUDED == TRUE)
@@ -824,14 +824,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_esco_connection_chg_evt
-**
-** Description Process event HCI_ESCO_CONNECTION_CHANGED_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_esco_connection_chg_evt
+ *
+ * Description Process event HCI_ESCO_CONNECTION_CHANGED_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_esco_connection_chg_evt (uint8_t *p)
{
#if (BTM_SCO_INCLUDED == TRUE)
@@ -856,14 +856,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_hdl_command_complete
-**
-** Description Handle command complete event
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_hdl_command_complete
+ *
+ * Description Handle command complete event
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_hdl_command_complete (uint16_t opcode, uint8_t *p, uint16_t evt_len,
void *p_cplt_cback)
{
@@ -975,14 +975,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_command_complete_evt
-**
-** Description Process event HCI_COMMAND_COMPLETE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_command_complete_evt
+ *
+ * Description Process event HCI_COMMAND_COMPLETE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_command_complete_evt_on_task(BT_HDR *event)
{
command_complete_hack_t *hack = (command_complete_hack_t *)&event->data[0];
@@ -1017,14 +1017,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_hdl_command_status
-**
-** Description Handle a command status event
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_hdl_command_status
+ *
+ * Description Handle a command status event
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_hdl_command_status (uint16_t opcode, uint8_t status, uint8_t *p_cmd,
void *p_vsc_status_cback)
{
@@ -1171,14 +1171,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_command_status_evt
-**
-** Description Process event HCI_COMMAND_STATUS_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_command_status_evt
+ *
+ * Description Process event HCI_COMMAND_STATUS_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_command_status_evt_on_task(BT_HDR *event)
{
command_status_hack_t *hack = (command_status_hack_t *)&event->data[0];
@@ -1214,14 +1214,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_hardware_error_evt
-**
-** Description Process event HCI_HARDWARE_ERROR_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_hardware_error_evt
+ *
+ * Description Process event HCI_HARDWARE_ERROR_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_hardware_error_evt (uint8_t *p)
{
HCI_TRACE_ERROR("Ctlr H/w error event - code:0x%x", *p);
@@ -1235,27 +1235,27 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_flush_occured_evt
-**
-** Description Process event HCI_FLUSH_OCCURED_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_flush_occured_evt
+ *
+ * Description Process event HCI_FLUSH_OCCURED_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_flush_occured_evt (void)
{
}
/*******************************************************************************
-**
-** Function btu_hcif_role_change_evt
-**
-** Description Process event HCI_ROLE_CHANGE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_role_change_evt
+ *
+ * Description Process event HCI_ROLE_CHANGE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_role_change_evt (uint8_t *p)
{
uint8_t status;
@@ -1271,14 +1271,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_num_compl_data_pkts_evt
-**
-** Description Process event HCI_NUM_COMPL_DATA_PKTS_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_num_compl_data_pkts_evt
+ *
+ * Description Process event HCI_NUM_COMPL_DATA_PKTS_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_num_compl_data_pkts_evt (uint8_t *p)
{
/* Process for L2CAP and SCO */
@@ -1289,14 +1289,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_mode_change_evt
-**
-** Description Process event HCI_MODE_CHANGE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_mode_change_evt
+ *
+ * Description Process event HCI_MODE_CHANGE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_mode_change_evt (uint8_t *p)
{
uint8_t status;
@@ -1320,14 +1320,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_ssr_evt
-**
-** Description Process event HCI_SNIFF_SUB_RATE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_ssr_evt
+ *
+ * Description Process event HCI_SNIFF_SUB_RATE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
#if (BTM_SSR_INCLUDED == true)
static void btu_hcif_ssr_evt (uint8_t *p, uint16_t evt_len)
{
@@ -1336,14 +1336,14 @@
#endif
/*******************************************************************************
-**
-** Function btu_hcif_pin_code_request_evt
-**
-** Description Process event HCI_PIN_CODE_REQUEST_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_pin_code_request_evt
+ *
+ * Description Process event HCI_PIN_CODE_REQUEST_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_pin_code_request_evt (uint8_t *p)
{
BD_ADDR bda;
@@ -1358,14 +1358,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_link_key_request_evt
-**
-** Description Process event HCI_LINK_KEY_REQUEST_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_link_key_request_evt
+ *
+ * Description Process event HCI_LINK_KEY_REQUEST_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_link_key_request_evt (uint8_t *p)
{
BD_ADDR bda;
@@ -1375,14 +1375,14 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_link_key_notification_evt
-**
-** Description Process event HCI_LINK_KEY_NOTIFICATION_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_link_key_notification_evt
+ *
+ * Description Process event HCI_LINK_KEY_NOTIFICATION_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_link_key_notification_evt (uint8_t *p)
{
BD_ADDR bda;
@@ -1397,53 +1397,53 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_loopback_command_evt
-**
-** Description Process event HCI_LOOPBACK_COMMAND_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_loopback_command_evt
+ *
+ * Description Process event HCI_LOOPBACK_COMMAND_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_loopback_command_evt (void)
{
}
/*******************************************************************************
-**
-** Function btu_hcif_data_buf_overflow_evt
-**
-** Description Process event HCI_DATA_BUF_OVERFLOW_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_data_buf_overflow_evt
+ *
+ * Description Process event HCI_DATA_BUF_OVERFLOW_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_data_buf_overflow_evt (void)
{
}
/*******************************************************************************
-**
-** Function btu_hcif_max_slots_changed_evt
-**
-** Description Process event HCI_MAX_SLOTS_CHANGED_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_max_slots_changed_evt
+ *
+ * Description Process event HCI_MAX_SLOTS_CHANGED_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_max_slots_changed_evt (void)
{
}
/*******************************************************************************
-**
-** Function btu_hcif_read_clock_off_comp_evt
-**
-** Description Process event HCI_READ_CLOCK_OFF_COMP_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_read_clock_off_comp_evt
+ *
+ * Description Process event HCI_READ_CLOCK_OFF_COMP_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_read_clock_off_comp_evt (uint8_t *p)
{
uint8_t status;
@@ -1466,27 +1466,27 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_conn_pkt_type_change_evt
-**
-** Description Process event HCI_CONN_PKT_TYPE_CHANGE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_conn_pkt_type_change_evt
+ *
+ * Description Process event HCI_CONN_PKT_TYPE_CHANGE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_conn_pkt_type_change_evt (void)
{
}
/*******************************************************************************
-**
-** Function btu_hcif_qos_violation_evt
-**
-** Description Process event HCI_QOS_VIOLATION_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_qos_violation_evt
+ *
+ * Description Process event HCI_QOS_VIOLATION_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_qos_violation_evt (uint8_t *p)
{
uint16_t handle;
@@ -1499,170 +1499,170 @@
}
/*******************************************************************************
-**
-** Function btu_hcif_page_scan_mode_change_evt
-**
-** Description Process event HCI_PAGE_SCAN_MODE_CHANGE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_page_scan_mode_change_evt
+ *
+ * Description Process event HCI_PAGE_SCAN_MODE_CHANGE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_page_scan_mode_change_evt (void)
{
}
/*******************************************************************************
-**
-** Function btu_hcif_page_scan_rep_mode_chng_evt
-**
-** Description Process event HCI_PAGE_SCAN_REP_MODE_CHNG_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_page_scan_rep_mode_chng_evt
+ *
+ * Description Process event HCI_PAGE_SCAN_REP_MODE_CHNG_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_page_scan_rep_mode_chng_evt (void)
{
}
/**********************************************
-** Simple Pairing Events
-***********************************************/
+ * Simple Pairing Events
+ **********************************************/
/*******************************************************************************
-**
-** Function btu_hcif_host_support_evt
-**
-** Description Process event HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_host_support_evt
+ *
+ * Description Process event HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_host_support_evt (uint8_t *p)
{
btm_sec_rmt_host_support_feat_evt(p);
}
/*******************************************************************************
-**
-** Function btu_hcif_io_cap_request_evt
-**
-** Description Process event HCI_IO_CAPABILITY_REQUEST_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_io_cap_request_evt
+ *
+ * Description Process event HCI_IO_CAPABILITY_REQUEST_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_io_cap_request_evt (uint8_t *p)
{
btm_io_capabilities_req(p);
}
/*******************************************************************************
-**
-** Function btu_hcif_io_cap_response_evt
-**
-** Description Process event HCI_IO_CAPABILITY_RESPONSE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_io_cap_response_evt
+ *
+ * Description Process event HCI_IO_CAPABILITY_RESPONSE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_io_cap_response_evt (uint8_t *p)
{
btm_io_capabilities_rsp(p);
}
/*******************************************************************************
-**
-** Function btu_hcif_user_conf_request_evt
-**
-** Description Process event HCI_USER_CONFIRMATION_REQUEST_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_user_conf_request_evt
+ *
+ * Description Process event HCI_USER_CONFIRMATION_REQUEST_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_user_conf_request_evt (uint8_t *p)
{
btm_proc_sp_req_evt(BTM_SP_CFM_REQ_EVT, p);
}
/*******************************************************************************
-**
-** Function btu_hcif_user_passkey_request_evt
-**
-** Description Process event HCI_USER_PASSKEY_REQUEST_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_user_passkey_request_evt
+ *
+ * Description Process event HCI_USER_PASSKEY_REQUEST_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_user_passkey_request_evt (uint8_t *p)
{
btm_proc_sp_req_evt(BTM_SP_KEY_REQ_EVT, p);
}
/*******************************************************************************
-**
-** Function btu_hcif_user_passkey_notif_evt
-**
-** Description Process event HCI_USER_PASSKEY_NOTIFY_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_user_passkey_notif_evt
+ *
+ * Description Process event HCI_USER_PASSKEY_NOTIFY_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_user_passkey_notif_evt (uint8_t *p)
{
btm_proc_sp_req_evt(BTM_SP_KEY_NOTIF_EVT, p);
}
/*******************************************************************************
-**
-** Function btu_hcif_keypress_notif_evt
-**
-** Description Process event HCI_KEYPRESS_NOTIFY_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_keypress_notif_evt
+ *
+ * Description Process event HCI_KEYPRESS_NOTIFY_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_keypress_notif_evt (uint8_t *p)
{
btm_keypress_notif_evt(p);
}
/*******************************************************************************
-**
-** Function btu_hcif_rem_oob_request_evt
-**
-** Description Process event HCI_REMOTE_OOB_DATA_REQUEST_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_rem_oob_request_evt
+ *
+ * Description Process event HCI_REMOTE_OOB_DATA_REQUEST_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_rem_oob_request_evt (uint8_t *p)
{
btm_rem_oob_req(p);
}
/*******************************************************************************
-**
-** Function btu_hcif_simple_pair_complete_evt
-**
-** Description Process event HCI_SIMPLE_PAIRING_COMPLETE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_simple_pair_complete_evt
+ *
+ * Description Process event HCI_SIMPLE_PAIRING_COMPLETE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void btu_hcif_simple_pair_complete_evt (uint8_t *p)
{
btm_simple_pair_complete(p);
}
/*******************************************************************************
-**
-** Function btu_hcif_enhanced_flush_complete_evt
-**
-** Description Process event HCI_ENHANCED_FLUSH_COMPLETE_EVT
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_hcif_enhanced_flush_complete_evt
+ *
+ * Description Process event HCI_ENHANCED_FLUSH_COMPLETE_EVT
+ *
+ * Returns void
+ *
+ ******************************************************************************/
#if (L2CAP_NON_FLUSHABLE_PB_INCLUDED == TRUE)
static void btu_hcif_enhanced_flush_complete_evt (void)
{
@@ -1670,12 +1670,12 @@
}
#endif
/**********************************************
-** End of Simple Pairing Events
-***********************************************/
+ * End of Simple Pairing Events
+ **********************************************/
/**********************************************
-** BLE Events
-***********************************************/
+ * BLE Events
+ **********************************************/
static void btu_hcif_encryption_key_refresh_cmpl_evt (uint8_t *p)
{
uint8_t status;
@@ -1765,8 +1765,8 @@
}
/**********************************************
-** End of BLE Events Handler
-***********************************************/
+ * End of BLE Events Handler
+ **********************************************/
#if (BLE_LLT_INCLUDED == TRUE)
static void btu_ble_rc_param_req_evt(uint8_t *p)
{
diff --git a/stack/btu/btu_init.cc b/stack/btu/btu_init.cc
index 5babc10..404dc58 100644
--- a/stack/btu/btu_init.cc
+++ b/stack/btu/btu_init.cc
@@ -56,8 +56,8 @@
extern void PLATFORM_DisableHciTransport(uint8_t bDisable);
/*****************************************************************************
-** V A R I A B L E S *
-******************************************************************************/
+ * V A R I A B L E S *
+ *****************************************************************************/
// TODO(cmanton) Move this out of this file
const BD_ADDR BT_BD_ANY = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
@@ -65,15 +65,15 @@
void btu_task_shut_down(void *context);
/*****************************************************************************
-**
-** Function btu_init_core
-**
-** Description Initialize control block memory for each core component.
-**
-**
-** Returns void
-**
-******************************************************************************/
+ *
+ * Function btu_init_core
+ *
+ * Description Initialize control block memory for each core component.
+ *
+ *
+ * Returns void
+ *
+ *****************************************************************************/
void btu_init_core(void)
{
/* Initialize the mandatory core stack components */
@@ -91,15 +91,15 @@
}
/*****************************************************************************
-**
-** Function btu_free_core
-**
-** Description Releases control block memory for each core component.
-**
-**
-** Returns void
-**
-******************************************************************************/
+ *
+ * Function btu_free_core
+ *
+ * Description Releases control block memory for each core component.
+ *
+ *
+ * Returns void
+ *
+ *****************************************************************************/
void btu_free_core(void)
{
/* Free the mandatory core stack components */
@@ -109,17 +109,17 @@
}
/*****************************************************************************
-**
-** Function BTU_StartUp
-**
-** Description Initializes the BTU control block.
-**
-** NOTE: Must be called before creating any tasks
-** (RPC, BTU, HCIT, APPL, etc.)
-**
-** Returns void
-**
-******************************************************************************/
+ *
+ * Function BTU_StartUp
+ *
+ * Description Initializes the BTU control block.
+ *
+ * NOTE: Must be called before creating any tasks
+ * (RPC, BTU, HCIT, APPL, etc.)
+ *
+ * Returns void
+ *
+ *****************************************************************************/
void BTU_StartUp(void)
{
btu_trace_level = HCI_INITIAL_TRACE_LEVEL;
diff --git a/stack/btu/btu_task.cc b/stack/btu/btu_task.cc
index e0f662b..78914f1 100644
--- a/stack/btu/btu_task.cc
+++ b/stack/btu/btu_task.cc
@@ -211,14 +211,14 @@
#if (HCILP_INCLUDED == TRUE)
/*******************************************************************************
-**
-** Function btu_check_bt_sleep
-**
-** Description This function is called to check if controller can go to sleep.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function btu_check_bt_sleep
+ *
+ * Description This function is called to check if controller can go to sleep.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void btu_check_bt_sleep (void)
{
// TODO(zachoverflow) take pending commands into account?
diff --git a/stack/gap/gap_api.cc b/stack/gap/gap_api.cc
index 29b408f..2b385a1 100644
--- a/stack/gap/gap_api.cc
+++ b/stack/gap/gap_api.cc
@@ -25,15 +25,15 @@
tGAP_CB gap_cb;
/*******************************************************************************
-**
-** Function GAP_SetTraceLevel
-**
-** Description This function sets the trace level for GAP. If called with
-** a value of 0xFF, it simply returns the current trace level.
-**
-** Returns The new or current trace level
-**
-*******************************************************************************/
+ *
+ * Function GAP_SetTraceLevel
+ *
+ * Description This function sets the trace level for GAP. If called with
+ * a value of 0xFF, it simply returns the current trace level.
+ *
+ * Returns The new or current trace level
+ *
+ ******************************************************************************/
uint8_t GAP_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
@@ -43,17 +43,17 @@
}
/*******************************************************************************
-**
-** Function GAP_Init
-**
-** Description Initializes the control blocks used by GAP.
-**
-** This routine should not be called except once per
-** stack invocation.
-**
-** Returns Nothing
-**
-*******************************************************************************/
+ *
+ * Function GAP_Init
+ *
+ * Description Initializes the control blocks used by GAP.
+ *
+ * This routine should not be called except once per
+ * stack invocation.
+ *
+ * Returns Nothing
+ *
+ ******************************************************************************/
void GAP_Init(void)
{
memset (&gap_cb, 0, sizeof (tGAP_CB));
diff --git a/stack/gap/gap_ble.cc b/stack/gap/gap_ble.cc
index 7acde46..60a460a 100644
--- a/stack/gap/gap_ble.cc
+++ b/stack/gap/gap_ble.cc
@@ -61,14 +61,14 @@
/*******************************************************************************
-**
-** Function gap_find_clcb_by_bd_addr
-**
-** Description The function searches all LCB with macthing bd address
-**
-** Returns total number of clcb found.
-**
-*******************************************************************************/
+ *
+ * Function gap_find_clcb_by_bd_addr
+ *
+ * Description The function searches all LCB with macthing bd address
+ *
+ * Returns total number of clcb found.
+ *
+ ******************************************************************************/
tGAP_CLCB *gap_find_clcb_by_bd_addr(BD_ADDR bda)
{
uint8_t i_clcb;
@@ -86,14 +86,14 @@
}
/*******************************************************************************
-**
-** Function gap_ble_find_clcb_by_conn_id
-**
-** Description The function searches all LCB with macthing connection ID
-**
-** Returns total number of clcb found.
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_find_clcb_by_conn_id
+ *
+ * Description The function searches all LCB with macthing connection ID
+ *
+ * Returns total number of clcb found.
+ *
+ ******************************************************************************/
tGAP_CLCB *gap_ble_find_clcb_by_conn_id(uint16_t conn_id)
{
uint8_t i_clcb;
@@ -111,14 +111,14 @@
}
/*******************************************************************************
-**
-** Function gap_clcb_alloc
-**
-** Description The function allocates a GAP connection link control block
-**
-** Returns NULL if not found. Otherwise pointer to the connection link block.
-**
-*******************************************************************************/
+ *
+ * Function gap_clcb_alloc
+ *
+ * Description The function allocates a GAP connection link control block
+ *
+ * Returns NULL if not found. Otherwise pointer to the connection link block.
+ *
+ ******************************************************************************/
tGAP_CLCB *gap_clcb_alloc (BD_ADDR bda)
{
uint8_t i_clcb = 0;
@@ -140,14 +140,14 @@
}
/*******************************************************************************
-**
-** Function gap_ble_dealloc_clcb
-**
-** Description The function clean up the pending request queue in GAP
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_dealloc_clcb
+ *
+ * Description The function clean up the pending request queue in GAP
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void gap_ble_dealloc_clcb(tGAP_CLCB *p_clcb)
{
tGAP_BLE_REQ *p_q;
@@ -166,14 +166,14 @@
}
/*******************************************************************************
-**
-** Function gap_ble_enqueue_request
-**
-** Description The function enqueue a GAP client request
-**
-** Returns true is successul; false otherwise
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_enqueue_request
+ *
+ * Description The function enqueue a GAP client request
+ *
+ * Returns true is successul; false otherwise
+ *
+ ******************************************************************************/
bool gap_ble_enqueue_request (tGAP_CLCB *p_clcb, uint16_t uuid, tGAP_BLE_CMPL_CBACK *p_cback)
{
tGAP_BLE_REQ *p_q = (tGAP_BLE_REQ *)osi_malloc(sizeof(tGAP_BLE_REQ));
@@ -186,14 +186,14 @@
}
/*******************************************************************************
-**
-** Function gap_ble_dequeue_request
-**
-** Description The function dequeue a GAP client request if any
-**
-** Returns true is successul; false otherwise
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_dequeue_request
+ *
+ * Description The function dequeue a GAP client request if any
+ *
+ * Returns true is successul; false otherwise
+ *
+ ******************************************************************************/
bool gap_ble_dequeue_request (tGAP_CLCB *p_clcb, uint16_t * p_uuid, tGAP_BLE_CMPL_CBACK **p_cback)
{
tGAP_BLE_REQ *p_q = (tGAP_BLE_REQ *)fixed_queue_try_dequeue(p_clcb->pending_req_q);;
@@ -210,8 +210,8 @@
}
/*******************************************************************************
-** GAP Attributes Database Request callback
-*******************************************************************************/
+ * GAP Attributes Database Request callback
+ ******************************************************************************/
tGATT_STATUS gap_read_attr_value (uint16_t handle, tGATT_VALUE *p_value, bool is_long)
{
tGAP_ATTR *p_db_attr = gap_cb.gatt_attr;
@@ -273,8 +273,8 @@
}
/*******************************************************************************
-** GAP Attributes Database Read/Read Blob Request process
-*******************************************************************************/
+ * GAP Attributes Database Read/Read Blob Request process
+ ******************************************************************************/
tGATT_STATUS gap_proc_read (UNUSED_ATTR tGATTS_REQ_TYPE type, tGATT_READ_REQ *p_data,
tGATTS_RSP *p_rsp)
{
@@ -291,14 +291,14 @@
}
/******************************************************************************
-**
-** Function gap_proc_write_req
-**
-** Description GAP ATT server process a write request.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gap_proc_write_req
+ *
+ * Description GAP ATT server process a write request.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
uint8_t gap_proc_write_req(UNUSED_ATTR tGATTS_REQ_TYPE type, tGATT_WRITE_REQ *p_data)
{
tGAP_ATTR *p_db_attr = gap_cb.gatt_attr;
@@ -316,14 +316,14 @@
}
/******************************************************************************
-**
-** Function gap_ble_s_attr_request_cback
-**
-** Description GAP ATT server attribute access request callback.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_s_attr_request_cback
+ *
+ * Description GAP ATT server attribute access request callback.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gap_ble_s_attr_request_cback (uint16_t conn_id, uint32_t trans_id,
tGATTS_REQ_TYPE type, tGATTS_DATA *p_data)
{
@@ -370,14 +370,14 @@
}
/*******************************************************************************
-**
-** Function btm_ble_att_db_init
-**
-** Description GAP ATT database initalization.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function btm_ble_att_db_init
+ *
+ * Description GAP ATT database initalization.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gap_attr_db_init(void)
{
tBT_UUID app_uuid = {LEN_UUID_128,{0}};
@@ -436,14 +436,14 @@
}
/*******************************************************************************
-**
-** Function GAP_BleAttrDBUpdate
-**
-** Description GAP ATT database update.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleAttrDBUpdate
+ *
+ * Description GAP ATT database update.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void GAP_BleAttrDBUpdate(uint16_t attr_uuid, tGAP_BLE_ATTR_VALUE *p_value)
{
tGAP_ATTR *p_db_attr = gap_cb.gatt_attr;
@@ -485,14 +485,14 @@
}
/*******************************************************************************
-**
-** Function gap_ble_send_cl_read_request
-**
-** Description utility function to send a read request for a GAP charactersitic
-**
-** Returns true if read started, else false if GAP is busy
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_send_cl_read_request
+ *
+ * Description utility function to send a read request for a GAP charactersitic
+ *
+ * Returns true if read started, else false if GAP is busy
+ *
+ ******************************************************************************/
bool gap_ble_send_cl_read_request(tGAP_CLCB *p_clcb)
{
tGATT_READ_PARAM param;
@@ -520,14 +520,14 @@
}
/*******************************************************************************
-**
-** Function gap_ble_cl_op_cmpl
-**
-** Description GAP client operation complete callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_cl_op_cmpl
+ *
+ * Description GAP client operation complete callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gap_ble_cl_op_cmpl(tGAP_CLCB *p_clcb, bool status, uint16_t len, uint8_t *p_name)
{
tGAP_BLE_CMPL_CBACK *p_cback = p_clcb->p_cback;
@@ -556,14 +556,14 @@
}
/*******************************************************************************
-**
-** Function gap_ble_c_connect_cback
-**
-** Description Client connection callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_c_connect_cback
+ *
+ * Description Client connection callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_ble_c_connect_cback (UNUSED_ATTR tGATT_IF gatt_if, BD_ADDR bda,
uint16_t conn_id,
bool connected, tGATT_DISCONN_REASON reason,
@@ -591,14 +591,14 @@
}
/*******************************************************************************
-**
-** Function gap_ble_c_cmpl_cback
-**
-** Description Client operation complete callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_c_cmpl_cback
+ *
+ * Description Client operation complete callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_ble_c_cmpl_cback (uint16_t conn_id, tGATTC_OPTYPE op, tGATT_STATUS status, tGATT_CL_COMPLETE *p_data)
{
@@ -658,14 +658,14 @@
/*******************************************************************************
-**
-** Function gap_ble_accept_cl_operation
-**
-** Description Start a process to read peer address resolution capability
-**
-** Returns true if request accepted
-**
-*******************************************************************************/
+ *
+ * Function gap_ble_accept_cl_operation
+ *
+ * Description Start a process to read peer address resolution capability
+ *
+ * Returns true if request accepted
+ *
+ ******************************************************************************/
bool gap_ble_accept_cl_operation(BD_ADDR peer_bda, uint16_t uuid, tGAP_BLE_CMPL_CBACK *p_cback)
{
tGAP_CLCB *p_clcb;
@@ -708,57 +708,57 @@
return started;
}
/*******************************************************************************
-**
-** Function GAP_BleReadPeerPrefConnParams
-**
-** Description Start a process to read a connected peripheral's preferred
-** connection parameters
-**
-** Returns true if read started, else false if GAP is busy
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleReadPeerPrefConnParams
+ *
+ * Description Start a process to read a connected peripheral's preferred
+ * connection parameters
+ *
+ * Returns true if read started, else false if GAP is busy
+ *
+ ******************************************************************************/
bool GAP_BleReadPeerPrefConnParams (BD_ADDR peer_bda)
{
return gap_ble_accept_cl_operation (peer_bda, GATT_UUID_GAP_PREF_CONN_PARAM, NULL);
}
/*******************************************************************************
-**
-** Function GAP_BleReadPeerDevName
-**
-** Description Start a process to read a connected peripheral's device name.
-**
-** Returns true if request accepted
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleReadPeerDevName
+ *
+ * Description Start a process to read a connected peripheral's device name.
+ *
+ * Returns true if request accepted
+ *
+ ******************************************************************************/
bool GAP_BleReadPeerDevName (BD_ADDR peer_bda, tGAP_BLE_CMPL_CBACK *p_cback)
{
return gap_ble_accept_cl_operation (peer_bda, GATT_UUID_GAP_DEVICE_NAME, p_cback);
}
/*******************************************************************************
-**
-** Function GAP_BleReadPeerAddressResolutionCap
-**
-** Description Start a process to read peer address resolution capability
-**
-** Returns true if request accepted
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleReadPeerAddressResolutionCap
+ *
+ * Description Start a process to read peer address resolution capability
+ *
+ * Returns true if request accepted
+ *
+ ******************************************************************************/
bool GAP_BleReadPeerAddressResolutionCap (BD_ADDR peer_bda, tGAP_BLE_CMPL_CBACK *p_cback)
{
return gap_ble_accept_cl_operation(peer_bda, GATT_UUID_GAP_CENTRAL_ADDR_RESOL, p_cback);
}
/*******************************************************************************
-**
-** Function GAP_BleCancelReadPeerDevName
-**
-** Description Cancel reading a peripheral's device name.
-**
-** Returns true if request accepted
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleCancelReadPeerDevName
+ *
+ * Description Cancel reading a peripheral's device name.
+ *
+ * Returns true if request accepted
+ *
+ ******************************************************************************/
bool GAP_BleCancelReadPeerDevName (BD_ADDR peer_bda)
{
tGAP_CLCB *p_clcb = gap_find_clcb_by_bd_addr (peer_bda);
diff --git a/stack/gap/gap_conn.cc b/stack/gap/gap_conn.cc
index 3656444..42697a0 100644
--- a/stack/gap/gap_conn.cc
+++ b/stack/gap/gap_conn.cc
@@ -29,9 +29,9 @@
#if (GAP_CONN_INCLUDED == TRUE)
#include "btm_int.h"
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void gap_connect_ind (BD_ADDR bd_addr, uint16_t l2cap_cid, uint16_t psm, uint8_t l2cap_id);
static void gap_connect_cfm (uint16_t l2cap_cid, uint16_t result);
static void gap_config_ind (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg);
@@ -48,14 +48,14 @@
static void gap_checks_con_flags (tGAP_CCB *p_ccb);
/*******************************************************************************
-**
-** Function gap_conn_init
-**
-** Description This function is called to initialize GAP connection management
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_conn_init
+ *
+ * Description This function is called to initialize GAP connection management
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gap_conn_init (void)
{
#if (AMP_INCLUDED == TRUE)
@@ -92,38 +92,38 @@
/*******************************************************************************
-**
-** Function GAP_ConnOpen
-**
-** Description This function is called to open an L2CAP connection.
-**
-** Parameters: is_server - If true, the connection is not created
-** but put into a "listen" mode waiting for
-** the remote side to connect.
-**
-** service_id - Unique service ID from
-** BTM_SEC_SERVICE_FIRST_EMPTY (6)
-** to BTM_SEC_MAX_SERVICE_RECORDS (32)
-**
-** p_rem_bda - Pointer to remote BD Address.
-** If a server, and we don't care about the
-** remote BD Address, then NULL should be passed.
-**
-** psm - the PSM used for the connection
-**
-** p_config - Optional pointer to configuration structure.
-** If NULL, the default GAP configuration will
-** be used.
-**
-** security - security flags
-** chan_mode_mask - (GAP_FCR_CHAN_OPT_BASIC, GAP_FCR_CHAN_OPT_ERTM,
-** GAP_FCR_CHAN_OPT_STREAM)
-**
-** p_cb - Pointer to callback function for events.
-**
-** Returns handle of the connection if successful, else GAP_INVALID_HANDLE
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnOpen
+ *
+ * Description This function is called to open an L2CAP connection.
+ *
+ * Parameters: is_server - If true, the connection is not created
+ * but put into a "listen" mode waiting for
+ * the remote side to connect.
+ *
+ * service_id - Unique service ID from
+ * BTM_SEC_SERVICE_FIRST_EMPTY (6)
+ * to BTM_SEC_MAX_SERVICE_RECORDS (32)
+ *
+ * p_rem_bda - Pointer to remote BD Address.
+ * If a server, and we don't care about the
+ * remote BD Address, then NULL should be passed.
+ *
+ * psm - the PSM used for the connection
+ *
+ * p_config - Optional pointer to configuration structure.
+ * If NULL, the default GAP configuration will
+ * be used.
+ *
+ * security - security flags
+ * chan_mode_mask - (GAP_FCR_CHAN_OPT_BASIC, GAP_FCR_CHAN_OPT_ERTM,
+ * GAP_FCR_CHAN_OPT_STREAM)
+ *
+ * p_cb - Pointer to callback function for events.
+ *
+ * Returns handle of the connection if successful, else GAP_INVALID_HANDLE
+ *
+ ******************************************************************************/
uint16_t GAP_ConnOpen(const char *p_serv_name, uint8_t service_id, bool is_server,
BD_ADDR p_rem_bda, uint16_t psm, tL2CAP_CFG_INFO *p_cfg,
tL2CAP_ERTM_INFO *ertm_info, uint16_t security, uint8_t chan_mode_mask,
@@ -293,17 +293,17 @@
/*******************************************************************************
-**
-** Function GAP_ConnClose
-**
-** Description This function is called to close a connection.
-**
-** Parameters: handle - Handle of the connection returned by GAP_ConnOpen
-**
-** Returns BT_PASS - closed OK
-** GAP_ERR_BAD_HANDLE - invalid handle
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnClose
+ *
+ * Description This function is called to close a connection.
+ *
+ * Parameters: handle - Handle of the connection returned by GAP_ConnOpen
+ *
+ * Returns BT_PASS - closed OK
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ *
+ ******************************************************************************/
uint16_t GAP_ConnClose (uint16_t gap_handle)
{
tGAP_CCB *p_ccb = gap_find_ccb_by_handle (gap_handle);
@@ -327,22 +327,22 @@
/*******************************************************************************
-**
-** Function GAP_ConnReadData
-**
-** Description Normally not GKI aware application will call this function
-** after receiving GAP_EVT_RXDATA event.
-**
-** Parameters: handle - Handle of the connection returned in the Open
-** p_data - Data area
-** max_len - Byte count requested
-** p_len - Byte count received
-**
-** Returns BT_PASS - data read
-** GAP_ERR_BAD_HANDLE - invalid handle
-** GAP_NO_DATA_AVAIL - no data available
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnReadData
+ *
+ * Description Normally not GKI aware application will call this function
+ * after receiving GAP_EVT_RXDATA event.
+ *
+ * Parameters: handle - Handle of the connection returned in the Open
+ * p_data - Data area
+ * max_len - Byte count requested
+ * p_len - Byte count received
+ *
+ * Returns BT_PASS - data read
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ * GAP_NO_DATA_AVAIL - no data available
+ *
+ ******************************************************************************/
uint16_t GAP_ConnReadData (uint16_t gap_handle, uint8_t *p_data, uint16_t max_len, uint16_t *p_len)
{
tGAP_CCB *p_ccb = gap_find_ccb_by_handle (gap_handle);
@@ -394,16 +394,16 @@
}
/*******************************************************************************
-**
-** Function GAP_GetRxQueueCnt
-**
-** Description This function return number of bytes on the rx queue.
-**
-** Parameters: handle - Handle returned in the GAP_ConnOpen
-** p_rx_queue_count - Pointer to return queue count in.
-**
-**
-*******************************************************************************/
+ *
+ * Function GAP_GetRxQueueCnt
+ *
+ * Description This function return number of bytes on the rx queue.
+ *
+ * Parameters: handle - Handle returned in the GAP_ConnOpen
+ * p_rx_queue_count - Pointer to return queue count in.
+ *
+ *
+ ******************************************************************************/
int GAP_GetRxQueueCnt (uint16_t handle, uint32_t *p_rx_queue_count)
{
tGAP_CCB *p_ccb;
@@ -431,20 +431,20 @@
}
/*******************************************************************************
-**
-** Function GAP_ConnBTRead
-**
-** Description Bluetooth aware applications will call this function after receiving
-** GAP_EVT_RXDATA event.
-**
-** Parameters: handle - Handle of the connection returned in the Open
-** pp_buf - pointer to address of buffer with data,
-**
-** Returns BT_PASS - data read
-** GAP_ERR_BAD_HANDLE - invalid handle
-** GAP_NO_DATA_AVAIL - no data available
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnBTRead
+ *
+ * Description Bluetooth aware applications will call this function after receiving
+ * GAP_EVT_RXDATA event.
+ *
+ * Parameters: handle - Handle of the connection returned in the Open
+ * pp_buf - pointer to address of buffer with data,
+ *
+ * Returns BT_PASS - data read
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ * GAP_NO_DATA_AVAIL - no data available
+ *
+ ******************************************************************************/
uint16_t GAP_ConnBTRead (uint16_t gap_handle, BT_HDR **pp_buf)
{
tGAP_CCB *p_ccb = gap_find_ccb_by_handle (gap_handle);
@@ -470,23 +470,23 @@
}
/*******************************************************************************
-**
-** Function GAP_ConnWriteData
-**
-** Description Normally not GKI aware application will call this function
-** to send data to the connection.
-**
-** Parameters: handle - Handle of the connection returned in the Open
-** p_data - Data area
-** max_len - Byte count requested
-** p_len - Byte count received
-**
-** Returns BT_PASS - data read
-** GAP_ERR_BAD_HANDLE - invalid handle
-** GAP_ERR_BAD_STATE - connection not established
-** GAP_CONGESTION - system is congested
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnWriteData
+ *
+ * Description Normally not GKI aware application will call this function
+ * to send data to the connection.
+ *
+ * Parameters: handle - Handle of the connection returned in the Open
+ * p_data - Data area
+ * max_len - Byte count requested
+ * p_len - Byte count received
+ *
+ * Returns BT_PASS - data read
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ * GAP_ERR_BAD_STATE - connection not established
+ * GAP_CONGESTION - system is congested
+ *
+ ******************************************************************************/
uint16_t GAP_ConnWriteData (uint16_t gap_handle, uint8_t *p_data, uint16_t max_len, uint16_t *p_len)
{
tGAP_CCB *p_ccb = gap_find_ccb_by_handle (gap_handle);
@@ -546,18 +546,18 @@
/*******************************************************************************
-**
-** Function GAP_ConnReconfig
-**
-** Description Applications can call this function to reconfigure the connection.
-**
-** Parameters: handle - Handle of the connection
-** p_cfg - Pointer to new configuration
-**
-** Returns BT_PASS - config process started
-** GAP_ERR_BAD_HANDLE - invalid handle
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnReconfig
+ *
+ * Description Applications can call this function to reconfigure the connection.
+ *
+ * Parameters: handle - Handle of the connection
+ * p_cfg - Pointer to new configuration
+ *
+ * Returns BT_PASS - config process started
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ *
+ ******************************************************************************/
uint16_t GAP_ConnReconfig (uint16_t gap_handle, tL2CAP_CFG_INFO *p_cfg)
{
tGAP_CCB *p_ccb = gap_find_ccb_by_handle (gap_handle);
@@ -576,26 +576,26 @@
/*******************************************************************************
-**
-** Function GAP_ConnSetIdleTimeout
-**
-** Description Higher layers call this function to set the idle timeout for
-** a connection, or for all future connections. 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.
-**
-** Parameters: handle - Handle of the connection
-** timeout - in secs
-** 0 = immediate disconnect when last channel is removed
-** 0xFFFF = no idle timeout
-**
-** Returns BT_PASS - config process started
-** GAP_ERR_BAD_HANDLE - invalid handle
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnSetIdleTimeout
+ *
+ * Description Higher layers call this function to set the idle timeout for
+ * a connection, or for all future connections. 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.
+ *
+ * Parameters: handle - Handle of the connection
+ * timeout - in secs
+ * 0 = immediate disconnect when last channel is removed
+ * 0xFFFF = no idle timeout
+ *
+ * Returns BT_PASS - config process started
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ *
+ ******************************************************************************/
uint16_t GAP_ConnSetIdleTimeout (uint16_t gap_handle, uint16_t timeout)
{
tGAP_CCB *p_ccb;
@@ -613,18 +613,18 @@
/*******************************************************************************
-**
-** Function GAP_ConnGetRemoteAddr
-**
-** Description This function is called to get the remote BD address
-** of a connection.
-**
-** Parameters: handle - Handle of the connection returned by GAP_ConnOpen
-**
-** Returns BT_PASS - closed OK
-** GAP_ERR_BAD_HANDLE - invalid handle
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnGetRemoteAddr
+ *
+ * Description This function is called to get the remote BD address
+ * of a connection.
+ *
+ * Parameters: handle - Handle of the connection returned by GAP_ConnOpen
+ *
+ * Returns BT_PASS - closed OK
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ *
+ ******************************************************************************/
uint8_t *GAP_ConnGetRemoteAddr (uint16_t gap_handle)
{
tGAP_CCB *p_ccb = gap_find_ccb_by_handle (gap_handle);
@@ -647,16 +647,16 @@
/*******************************************************************************
-**
-** Function GAP_ConnGetRemMtuSize
-**
-** Description Returns the remote device's MTU size
-**
-** Parameters: handle - Handle of the connection
-**
-** Returns uint16_t - maximum size buffer that can be transmitted to the peer
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnGetRemMtuSize
+ *
+ * Description Returns the remote device's MTU size
+ *
+ * Parameters: handle - Handle of the connection
+ *
+ * Returns uint16_t - maximum size buffer that can be transmitted to the peer
+ *
+ ******************************************************************************/
uint16_t GAP_ConnGetRemMtuSize (uint16_t gap_handle)
{
tGAP_CCB *p_ccb;
@@ -669,17 +669,17 @@
}
/*******************************************************************************
-**
-** Function GAP_ConnGetL2CAPCid
-**
-** Description Returns the L2CAP channel id
-**
-** Parameters: handle - Handle of the connection
-**
-** Returns uint16_t - The L2CAP channel id
-** 0, if error
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnGetL2CAPCid
+ *
+ * Description Returns the L2CAP channel id
+ *
+ * Parameters: handle - Handle of the connection
+ *
+ * Returns uint16_t - The L2CAP channel id
+ * 0, if error
+ *
+ ******************************************************************************/
uint16_t GAP_ConnGetL2CAPCid (uint16_t gap_handle)
{
tGAP_CCB *p_ccb;
@@ -692,15 +692,15 @@
}
/*******************************************************************************
-**
-** Function gap_tx_connect_ind
-**
-** Description Sends out GAP_EVT_TX_EMPTY when transmission has been
-** completed.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_tx_connect_ind
+ *
+ * Description Sends out GAP_EVT_TX_EMPTY when transmission has been
+ * completed.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gap_tx_complete_ind (uint16_t l2cap_cid, uint16_t sdu_sent)
{
tGAP_CCB *p_ccb = gap_find_ccb_by_cid (l2cap_cid);
@@ -715,16 +715,16 @@
}
/*******************************************************************************
-**
-** Function gap_connect_ind
-**
-** Description This function handles an inbound connection indication
-** from L2CAP. This is the case where we are acting as a
-** server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_connect_ind
+ *
+ * Description This function handles an inbound connection indication
+ * from L2CAP. This is the case where we are acting as a
+ * server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_connect_ind (BD_ADDR bd_addr, uint16_t l2cap_cid, uint16_t psm, uint8_t l2cap_id)
{
uint16_t xx;
@@ -785,15 +785,15 @@
}
/*******************************************************************************
-**
-** Function gap_checks_con_flags
-**
-** Description This function processes the L2CAP configuration indication
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_checks_con_flags
+ *
+ * Description This function processes the L2CAP configuration indication
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_checks_con_flags (tGAP_CCB *p_ccb)
{
GAP_TRACE_EVENT ("gap_checks_con_flags conn_flags:0x%x, ", p_ccb->con_flags);
@@ -807,15 +807,15 @@
}
/*******************************************************************************
-**
-** Function gap_sec_check_complete
-**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_sec_check_complete
+ *
+ * Description The function called when Security Manager finishes
+ * verification of the service side connection
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_sec_check_complete (UNUSED_ATTR BD_ADDR bd_addr, UNUSED_ATTR tBT_TRANSPORT transport, void *p_ref_data,
uint8_t res)
{
@@ -839,16 +839,16 @@
}
/*******************************************************************************
-**
-** Function gap_connect_cfm
-**
-** Description This function handles the connect confirm events
-** from L2CAP. This is the case when we are acting as a
-** client and have sent a connect request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_connect_cfm
+ *
+ * Description This function handles the connect confirm events
+ * from L2CAP. This is the case when we are acting as a
+ * client and have sent a connect request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_connect_cfm (uint16_t l2cap_cid, uint16_t result)
{
tGAP_CCB *p_ccb;
@@ -901,15 +901,15 @@
}
/*******************************************************************************
-**
-** Function gap_config_ind
-**
-** Description This function processes the L2CAP configuration indication
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_config_ind
+ *
+ * Description This function processes the L2CAP configuration indication
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_config_ind (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
tGAP_CCB *p_ccb;
@@ -952,15 +952,15 @@
/*******************************************************************************
-**
-** Function gap_config_cfm
-**
-** Description This function processes the L2CAP configuration confirmation
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_config_cfm
+ *
+ * Description This function processes the L2CAP configuration confirmation
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_config_cfm (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
tGAP_CCB *p_ccb;
@@ -991,15 +991,15 @@
/*******************************************************************************
-**
-** Function gap_disconnect_ind
-**
-** Description This function handles a disconnect event from L2CAP. If
-** requested to, we ack the disconnect before dropping the CCB
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_disconnect_ind
+ *
+ * Description This function handles a disconnect event from L2CAP. If
+ * requested to, we ack the disconnect before dropping the CCB
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_disconnect_ind (uint16_t l2cap_cid, bool ack_needed)
{
tGAP_CCB *p_ccb;
@@ -1020,14 +1020,14 @@
/*******************************************************************************
-**
-** Function gap_data_ind
-**
-** Description This function is called when data is received from L2CAP.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_data_ind
+ *
+ * Description This function is called when data is received from L2CAP.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_data_ind (uint16_t l2cap_cid, BT_HDR *p_msg)
{
tGAP_CCB *p_ccb;
@@ -1060,13 +1060,13 @@
/*******************************************************************************
-**
-** Function gap_congestion_ind
-**
-** Description This is a callback function called by L2CAP when
-** data L2CAP congestion status changes
-**
-*******************************************************************************/
+ *
+ * Function gap_congestion_ind
+ *
+ * Description This is a callback function called by L2CAP when
+ * data L2CAP congestion status changes
+ *
+ ******************************************************************************/
static void gap_congestion_ind (uint16_t lcid, bool is_congested)
{
tGAP_CCB *p_ccb;
@@ -1106,15 +1106,15 @@
/*******************************************************************************
-**
-** Function gap_find_ccb_by_cid
-**
-** Description This function searches the CCB table for an entry with the
-** passed CID.
-**
-** Returns the CCB address, or NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function gap_find_ccb_by_cid
+ *
+ * Description This function searches the CCB table for an entry with the
+ * passed CID.
+ *
+ * Returns the CCB address, or NULL if not found.
+ *
+ ******************************************************************************/
static tGAP_CCB *gap_find_ccb_by_cid (uint16_t cid)
{
uint16_t xx;
@@ -1133,15 +1133,15 @@
/*******************************************************************************
-**
-** Function gap_find_ccb_by_handle
-**
-** Description This function searches the CCB table for an entry with the
-** passed handle.
-**
-** Returns the CCB address, or NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function gap_find_ccb_by_handle
+ *
+ * Description This function searches the CCB table for an entry with the
+ * passed handle.
+ *
+ * Returns the CCB address, or NULL if not found.
+ *
+ ******************************************************************************/
static tGAP_CCB *gap_find_ccb_by_handle (uint16_t handle)
{
tGAP_CCB *p_ccb;
@@ -1161,14 +1161,14 @@
/*******************************************************************************
-**
-** Function gap_allocate_ccb
-**
-** Description This function allocates a new CCB.
-**
-** Returns CCB address, or NULL if none available.
-**
-*******************************************************************************/
+ *
+ * Function gap_allocate_ccb
+ *
+ * Description This function allocates a new CCB.
+ *
+ * Returns CCB address, or NULL if none available.
+ *
+ ******************************************************************************/
static tGAP_CCB *gap_allocate_ccb (void)
{
uint16_t xx;
@@ -1196,14 +1196,14 @@
/*******************************************************************************
-**
-** Function gap_release_ccb
-**
-** Description This function releases a CCB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gap_release_ccb
+ *
+ * Description This function releases a CCB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gap_release_ccb (tGAP_CCB *p_ccb)
{
uint16_t xx;
diff --git a/stack/gap/gap_int.h b/stack/gap/gap_int.h
index 99d6832..62ef397 100644
--- a/stack/gap/gap_int.h
+++ b/stack/gap/gap_int.h
@@ -109,8 +109,8 @@
tGAP_BLE_ATTR_VALUE attr_value;
}tGAP_ATTR;
/**********************************************************************
-** M A I N C O N T R O L B L O C K
-***********************************************************************/
+ * M A I N C O N T R O L B L O C K
+ **********************************************************************/
#define GAP_MAX_CL GATT_CL_MAX_LCB
diff --git a/stack/gap/gap_utils.cc b/stack/gap/gap_utils.cc
index afdcf65..d3ef93e 100644
--- a/stack/gap/gap_utils.cc
+++ b/stack/gap/gap_utils.cc
@@ -22,14 +22,14 @@
#include "gap_int.h"
/*******************************************************************************
-**
-** Function gap_allocate_cb
-**
-** Description Look through the GAP Control Blocks for a free one.
-**
-** Returns Pointer to the control block or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function gap_allocate_cb
+ *
+ * Description Look through the GAP Control Blocks for a free one.
+ *
+ * Returns Pointer to the control block or NULL if not found
+ *
+ ******************************************************************************/
tGAP_INFO *gap_allocate_cb (void)
{
tGAP_INFO *p_cb = &gap_cb.blk[0];
@@ -54,14 +54,14 @@
/*******************************************************************************
-**
-** Function gap_free_cb
-**
-** Description Release GAP control block.
-**
-** Returns Pointer to the control block or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function gap_free_cb
+ *
+ * Description Release GAP control block.
+ *
+ * Returns Pointer to the control block or NULL if not found
+ *
+ ******************************************************************************/
void gap_free_cb (tGAP_INFO *p_cb)
{
if (p_cb)
@@ -73,17 +73,17 @@
/*******************************************************************************
-**
-** Function gap_is_service_busy
-**
-** Description Look through the GAP Control Blocks that are in use
-** and check to see if the event waiting for is the command
-** requested.
-**
-** Returns true if already in use
-** false if not busy
-**
-*******************************************************************************/
+ *
+ * Function gap_is_service_busy
+ *
+ * Description Look through the GAP Control Blocks that are in use
+ * and check to see if the event waiting for is the command
+ * requested.
+ *
+ * Returns true if already in use
+ * false if not busy
+ *
+ ******************************************************************************/
bool gap_is_service_busy (uint16_t request)
{
tGAP_INFO *p_cb = &gap_cb.blk[0];
@@ -101,15 +101,15 @@
/*******************************************************************************
-**
-** Function gap_convert_btm_status
-**
-** Description Converts a BTM error status into a GAP error status
-**
-**
-** Returns GAP_UNKNOWN_BTM_STATUS is returned if not recognized
-**
-*******************************************************************************/
+ *
+ * Function gap_convert_btm_status
+ *
+ * Description Converts a BTM error status into a GAP error status
+ *
+ *
+ * Returns GAP_UNKNOWN_BTM_STATUS is returned if not recognized
+ *
+ ******************************************************************************/
uint16_t gap_convert_btm_status (tBTM_STATUS btm_status)
{
switch (btm_status)
diff --git a/stack/gatt/att_protocol.cc b/stack/gatt/att_protocol.cc
index 80bf22e..69a87c8 100644
--- a/stack/gatt/att_protocol.cc
+++ b/stack/gatt/att_protocol.cc
@@ -32,17 +32,17 @@
#define GATT_START_END_HANDLE_SIZE 4
/**********************************************************************
-** ATT protocl message building utility *
-***********************************************************************/
+ * ATT protocl message building utility *
+ **********************************************************************/
/*******************************************************************************
-**
-** Function attp_build_mtu_exec_cmd
-**
-** Description Build a exchange MTU request
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_mtu_exec_cmd
+ *
+ * Description Build a exchange MTU request
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_mtu_cmd(uint8_t op_code, uint16_t rx_mtu)
{
uint8_t *p;
@@ -59,14 +59,14 @@
return p_buf;
}
/*******************************************************************************
-**
-** Function attp_build_exec_write_cmd
-**
-** Description Build a execute write request or response.
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_exec_write_cmd
+ *
+ * Description Build a execute write request or response.
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_exec_write_cmd (uint8_t op_code, uint8_t flag)
{
BT_HDR *p_buf = (BT_HDR *)osi_malloc(GATT_DATA_BUF_SIZE);
@@ -89,14 +89,14 @@
}
/*******************************************************************************
-**
-** Function attp_build_err_cmd
-**
-** Description Build a exchange MTU request
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_err_cmd
+ *
+ * Description Build a exchange MTU request
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_err_cmd(uint8_t cmd_code, uint16_t err_handle, uint8_t reason)
{
uint8_t *p;
@@ -115,14 +115,14 @@
return p_buf;
}
/*******************************************************************************
-**
-** Function attp_build_browse_cmd
-**
-** Description Build a read information request or read by type request
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_browse_cmd
+ *
+ * Description Build a read information request or read by type request
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_browse_cmd(uint8_t op_code, uint16_t s_hdl, uint16_t e_hdl, tBT_UUID uuid)
{
const size_t payload_size = (GATT_OP_CODE_SIZE) + (GATT_START_END_HANDLE_SIZE) + (LEN_UUID_128);
@@ -142,14 +142,14 @@
}
/*******************************************************************************
-**
-** Function attp_build_read_handles_cmd
-**
-** Description Build a read by type and value request.
-**
-** Returns pointer to the command buffer.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_read_handles_cmd
+ *
+ * Description Build a read by type and value request.
+ *
+ * Returns pointer to the command buffer.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_read_by_type_value_cmd (uint16_t payload_size, tGATT_FIND_TYPE_VALUE *p_value_type)
{
uint8_t *p;
@@ -177,14 +177,14 @@
}
/*******************************************************************************
-**
-** Function attp_build_read_multi_cmd
-**
-** Description Build a read multiple request
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_read_multi_cmd
+ *
+ * Description Build a read multiple request
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_read_multi_cmd(uint16_t payload_size, uint16_t num_handle, uint16_t *p_handle)
{
uint8_t *p, i = 0;
@@ -205,14 +205,14 @@
return p_buf;
}
/*******************************************************************************
-**
-** Function attp_build_handle_cmd
-**
-** Description Build a read /read blob request
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_handle_cmd
+ *
+ * Description Build a read /read blob request
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_handle_cmd(uint8_t op_code, uint16_t handle, uint16_t offset)
{
uint8_t *p;
@@ -237,14 +237,14 @@
}
/*******************************************************************************
-**
-** Function attp_build_opcode_cmd
-**
-** Description Build a request/response with opcode only.
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_opcode_cmd
+ *
+ * Description Build a request/response with opcode only.
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_opcode_cmd(uint8_t op_code)
{
uint8_t *p;
@@ -261,14 +261,14 @@
}
/*******************************************************************************
-**
-** Function attp_build_value_cmd
-**
-** Description Build a attribute value request
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_value_cmd
+ *
+ * Description Build a attribute value request
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_value_cmd (uint16_t payload_size, uint8_t op_code, uint16_t handle,
uint16_t offset, uint16_t len, uint8_t *p_data)
{
@@ -316,12 +316,12 @@
}
/*******************************************************************************
-**
-** Function attp_send_msg_to_l2cap
-**
-** Description Send message to L2CAP.
-**
-*******************************************************************************/
+ *
+ * Function attp_send_msg_to_l2cap
+ *
+ * Description Send message to L2CAP.
+ *
+ ******************************************************************************/
tGATT_STATUS attp_send_msg_to_l2cap(tGATT_TCB *p_tcb, BT_HDR *p_toL2CAP)
{
uint16_t l2cap_ret;
@@ -347,12 +347,12 @@
}
/*******************************************************************************
-**
-** Function attp_build_sr_msg
-**
-** Description Build ATT Server PDUs.
-**
-*******************************************************************************/
+ *
+ * Function attp_build_sr_msg
+ *
+ * Description Build ATT Server PDUs.
+ *
+ ******************************************************************************/
BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, uint8_t op_code, tGATT_SR_MSG *p_msg)
{
BT_HDR *p_cmd = NULL;
@@ -408,19 +408,19 @@
}
/*******************************************************************************
-**
-** Function attp_send_sr_msg
-**
-** 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.
-**
-**
-*******************************************************************************/
+ *
+ * Function attp_send_sr_msg
+ *
+ * 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)
{
tGATT_STATUS cmd_sent = GATT_NO_RESOURCES;
@@ -437,17 +437,17 @@
}
/*******************************************************************************
-**
-** Function attp_cl_send_cmd
-**
-** Description Send a ATT command or enqueue it.
-**
-** Returns GATT_SUCCESS if command sent
-** GATT_CONGESTED if command sent but channel congested
-** GATT_CMD_STARTED if command queue up in GATT
-** GATT_ERROR if command sending failure
-**
-*******************************************************************************/
+ *
+ * Function attp_cl_send_cmd
+ *
+ * Description Send a ATT command or enqueue it.
+ *
+ * Returns GATT_SUCCESS if command sent
+ * GATT_CONGESTED if command sent but channel congested
+ * GATT_CMD_STARTED if command queue up in GATT
+ * GATT_ERROR if command sending failure
+ *
+ ******************************************************************************/
tGATT_STATUS attp_cl_send_cmd(tGATT_TCB *p_tcb, uint16_t clcb_idx, uint8_t cmd_code, BT_HDR *p_cmd)
{
tGATT_STATUS att_ret = GATT_SUCCESS;
@@ -485,21 +485,21 @@
return att_ret;
}
/*******************************************************************************
-**
-** Function attp_send_cl_msg
-**
-** Description This function sends the client request or confirmation message
-** to server.
-**
-** Parameter p_tcb: pointer to the connectino control block.
-** clcb_idx: clcb index
-** op_code: message op code.
-** p_msg: pointer to message parameters structure.
-**
-** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
-**
-**
-*******************************************************************************/
+ *
+ * Function attp_send_cl_msg
+ *
+ * Description This function sends the client request or confirmation message
+ * to server.
+ *
+ * Parameter p_tcb: pointer to the connectino control block.
+ * clcb_idx: clcb index
+ * op_code: message op code.
+ * 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_t clcb_idx, uint8_t op_code, tGATT_CL_MSG *p_msg)
{
tGATT_STATUS status = GATT_NO_RESOURCES;
diff --git a/stack/gatt/gatt_api.cc b/stack/gatt/gatt_api.cc
index ec0da36..b68ca1b 100644
--- a/stack/gatt/gatt_api.cc
+++ b/stack/gatt/gatt_api.cc
@@ -32,25 +32,25 @@
#include "btm_int.h"
/*******************************************************************************
-**
-** Function GATT_SetTraceLevel
-**
-** Description This function sets the trace level. If called with
-** a value of 0xFF, it simply returns the current trace level.
-**
-** Input Parameters:
-** level: The level to set the GATT tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new or current trace level
-**
-*******************************************************************************/
+ *
+ * Function GATT_SetTraceLevel
+ *
+ * Description This function sets the trace level. If called with
+ * a value of 0xFF, it simply returns the current trace level.
+ *
+ * Input Parameters:
+ * level: The level to set the GATT tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new or current trace level
+ *
+ ******************************************************************************/
uint8_t GATT_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
@@ -60,22 +60,22 @@
}
/*****************************************************************************
-**
-** GATT SERVER API
-**
-******************************************************************************/
+ *
+ * GATT SERVER API
+ *
+ *****************************************************************************/
/*******************************************************************************
-**
-** Function GATTS_AddHandleRange
-**
-** Description This function add the allocated handles range for the specifed
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_AddHandleRange
+ *
+ * Description This function add the allocated handles range for the specifed
+ * 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.
+ *
+ ******************************************************************************/
bool GATTS_AddHandleRange(tGATTS_HNDL_RANGE *p_hndl_range)
{
@@ -93,18 +93,18 @@
/*******************************************************************************
-**
-** 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.
-**
-** Parameter p_cb_info : callback informaiton
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ * Parameter p_cb_info : callback informaiton
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
bool GATTS_NVRegister (tGATT_APPL_INFO *p_cb_info)
{
bool status= false;
@@ -133,7 +133,7 @@
/*******************************************************************************
* BTIF -> BTA conversion functions
- *******************************************************************************/
+ ******************************************************************************/
static void btif_to_bta_uuid(tBT_UUID *p_dest, bt_uuid_t *p_src)
{
@@ -190,20 +190,20 @@
return db_size;
}
/*******************************************************************************
-**
-** Function GATTS_AddService
-**
-** Description This function is called to add GATT service.
-**
-** Parameter gatt_if : application if
-** service : pseudo-representation of service and it's content
-** count : size of service
-**
-** Returns on success GATT_SERVICE_STARTED is returned, and
-** attribute_handle field inside service elements are filled.
-** on error error status is returned.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_AddService
+ *
+ * Description This function is called to add GATT service.
+ *
+ * Parameter gatt_if : application if
+ * service : pseudo-representation of service and it's content
+ * count : size of service
+ *
+ * Returns on success GATT_SERVICE_STARTED is returned, and
+ * attribute_handle field inside service elements are filled.
+ * on error error status is returned.
+ *
+ ******************************************************************************/
uint16_t GATTS_AddService(tGATT_IF gatt_if, btgatt_db_element_t *service, int count) {
tGATT_HDL_LIST_INFO *p_list_info= &gatt_cb.hdl_list_info;
tGATT_HDL_LIST_ELEM *p_list=NULL;
@@ -359,18 +359,18 @@
}
/*******************************************************************************
-**
-** Function GATTS_DeleteService
-**
-** Description This function is called to delete a service.
-**
-** Parameter gatt_if : application interface
-** p_svc_uuid : service UUID
-** start_handle : start handle of the service
-**
-** Returns true if operation succeed, false if handle block was not found.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_DeleteService
+ *
+ * Description This function is called to delete a service.
+ *
+ * Parameter gatt_if : application interface
+ * p_svc_uuid : service UUID
+ * start_handle : start handle of the service
+ *
+ * Returns true if operation succeed, false if handle block was not found.
+ *
+ ******************************************************************************/
bool GATTS_DeleteService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid, uint16_t svc_inst)
{
@@ -418,16 +418,16 @@
}
/*******************************************************************************
-**
-** Function GATTS_StopService
-**
-** Description This function is called to stop a service
-**
-** Parameter service_handle : this is the start handle of a service
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_StopService
+ *
+ * Description This function is called to stop a service
+ *
+ * Parameter service_handle : this is the start handle of a service
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
void GATTS_StopService (uint16_t service_handle)
{
uint8_t ii = gatt_sr_find_i_rcb_by_handle(service_handle);
@@ -451,19 +451,19 @@
}
}
/*******************************************************************************
-**
-** Function GATTs_HandleValueIndication
-**
-** 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.
-** val_len: Length of the indicated attribute value.
-** p_val: Pointer to the indicated attribute value data.
-**
-** Returns GATT_SUCCESS if sucessfully sent or queued; otherwise error code.
-**
-*******************************************************************************/
+ *
+ * Function GATTs_HandleValueIndication
+ *
+ * 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.
+ * val_len: Length of the indicated attribute value.
+ * p_val: Pointer to the indicated attribute value data.
+ *
+ * Returns GATT_SUCCESS if sucessfully sent or queued; otherwise error code.
+ *
+ ******************************************************************************/
tGATT_STATUS GATTS_HandleValueIndication (uint16_t conn_id, uint16_t attr_handle, uint16_t val_len, uint8_t *p_val)
{
tGATT_STATUS cmd_status = GATT_NO_RESOURCES;
@@ -525,19 +525,19 @@
}
/*******************************************************************************
-**
-** Function GATTS_HandleValueNotification
-**
-** 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.
-** val_len: Length of the indicated attribute value.
-** p_val: Pointer to the indicated attribute value data.
-**
-** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_HandleValueNotification
+ *
+ * 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.
+ * val_len: Length of the indicated attribute value.
+ * p_val: Pointer to the indicated attribute value data.
+ *
+ * Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
+ *
+ ******************************************************************************/
tGATT_STATUS GATTS_HandleValueNotification (uint16_t conn_id, uint16_t attr_handle,
uint16_t val_len, uint8_t *p_val)
{
@@ -576,19 +576,19 @@
}
/*******************************************************************************
-**
-** Function GATTS_SendRsp
-**
-** Description This function sends the server response to client.
-**
-** Parameter conn_id: connection identifier.
-** trans_id: transaction id
-** status: response status
-** p_msg: pointer to message parameters structure.
-**
-** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_SendRsp
+ *
+ * Description This function sends the server response to client.
+ *
+ * Parameter conn_id: connection identifier.
+ * trans_id: transaction id
+ * status: response status
+ * p_msg: pointer to message parameters structure.
+ *
+ * Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
+ *
+ ******************************************************************************/
tGATT_STATUS GATTS_SendRsp (uint16_t conn_id, uint32_t trans_id,
tGATT_STATUS status, tGATTS_RSP *p_msg)
{
@@ -620,29 +620,29 @@
return cmd_sent;
}
-/*******************************************************************************/
+/******************************************************************************/
/* GATT Profile Srvr Functions */
-/*******************************************************************************/
+/******************************************************************************/
-/*******************************************************************************/
+/******************************************************************************/
/* */
/* GATT CLIENT APIs */
/* */
-/*******************************************************************************/
+/******************************************************************************/
/*******************************************************************************
-**
-** Function GATTC_ConfigureMTU
-**
-** Description This function is called to configure the ATT MTU size.
-**
-** Parameters conn_id: connection identifier.
-** mtu - attribute MTU size..
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * Function GATTC_ConfigureMTU
+ *
+ * Description This function is called to configure the ATT MTU size.
+ *
+ * Parameters conn_id: connection identifier.
+ * mtu - attribute MTU size..
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
tGATT_STATUS GATTC_ConfigureMTU (uint16_t conn_id, uint16_t mtu)
{
uint8_t ret = GATT_NO_RESOURCES;
@@ -685,18 +685,18 @@
}
/*******************************************************************************
-**
-** Function GATTC_Discover
-**
-** Description This function is called to do a discovery procedure on ATT server.
-**
-** Parameters conn_id: connection identifier.
-** disc_type:discovery type.
-** p_param: parameters of discovery requirement.
-**
-** Returns GATT_SUCCESS if command received/sent successfully.
-**
-*******************************************************************************/
+ *
+ * Function GATTC_Discover
+ *
+ * Description This function is called to do a discovery procedure on ATT server.
+ *
+ * Parameters conn_id: connection identifier.
+ * disc_type:discovery type.
+ * p_param: parameters of discovery requirement.
+ *
+ * Returns GATT_SUCCESS if command received/sent successfully.
+ *
+ ******************************************************************************/
tGATT_STATUS GATTC_Discover (uint16_t conn_id, tGATT_DISC_TYPE disc_type,
tGATT_DISC_PARAM *p_param)
{
@@ -754,19 +754,19 @@
}
/*******************************************************************************
-**
-** Function GATTC_Read
-**
-** Description This function is called to read the value of an attribute from
-** the server.
-**
-** Parameters conn_id: connection identifier.
-** type - attribute read type.
-** p_read - read operation parameters.
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * Function GATTC_Read
+ *
+ * Description This function is called to read the value of an attribute from
+ * the server.
+ *
+ * Parameters conn_id: connection identifier.
+ * type - attribute read type.
+ * p_read - read operation parameters.
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
tGATT_STATUS GATTC_Read (uint16_t conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM *p_read)
{
tGATT_STATUS status = GATT_SUCCESS;
@@ -846,19 +846,19 @@
}
/*******************************************************************************
-**
-** Function GATTC_Write
-**
-** Description This function is called to write the value of an attribute to
-** the server.
-**
-** Parameters conn_id: connection identifier.
-** type - attribute write type.
-** p_write - write operation parameters.
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * Function GATTC_Write
+ *
+ * Description This function is called to write the value of an attribute to
+ * the server.
+ *
+ * Parameters conn_id: connection identifier.
+ * type - attribute write type.
+ * p_write - write operation parameters.
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
tGATT_STATUS GATTC_Write (uint16_t conn_id, tGATT_WRITE_TYPE type, tGATT_VALUE *p_write)
{
tGATT_STATUS status = GATT_SUCCESS;
@@ -912,18 +912,18 @@
/*******************************************************************************
-**
-** Function GATTC_ExecuteWrite
-**
-** Description This function is called to send an Execute write request to
-** the server.
-**
-** Parameters conn_id: connection identifier.
-** is_execute - to execute or cancel the prepare write requet(s)
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * Function GATTC_ExecuteWrite
+ *
+ * Description This function is called to send an Execute write request to
+ * the server.
+ *
+ * Parameters conn_id: connection identifier.
+ * is_execute - to execute or cancel the prepare write requet(s)
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
tGATT_STATUS GATTC_ExecuteWrite (uint16_t conn_id, bool is_execute)
{
tGATT_STATUS status = GATT_SUCCESS;
@@ -964,18 +964,18 @@
}
/*******************************************************************************
-**
-** 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.
-** handle: the handle of the attribute confirmation.
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * 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.
+ * handle: the handle of the attribute confirmation.
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
tGATT_STATUS GATTC_SendHandleValueConfirm (uint16_t conn_id, uint16_t handle)
{
tGATT_STATUS ret = GATT_ILLEGAL_PARAMETER;
@@ -1010,24 +1010,24 @@
}
-/*******************************************************************************/
+/******************************************************************************/
/* */
/* GATT APIs */
/* */
-/*******************************************************************************/
+/******************************************************************************/
/*******************************************************************************
-**
-** Function GATT_SetIdleTimeout
-**
-** Description This function (common to both client and server) sets the idle
-** timeout for a tansport connection
-**
-** Parameter bd_addr: target device bd address.
-** idle_tout: timeout value in seconds.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function GATT_SetIdleTimeout
+ *
+ * Description This function (common to both client and server) sets the idle
+ * timeout for a tansport connection
+ *
+ * Parameter bd_addr: target device bd address.
+ * idle_tout: timeout value in seconds.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void GATT_SetIdleTimeout (BD_ADDR bd_addr, uint16_t idle_tout, tBT_TRANSPORT transport)
{
tGATT_TCB *p_tcb;
@@ -1056,18 +1056,18 @@
/*******************************************************************************
-**
-** Function GATT_Register
-**
-** Description This function is called to register an application
-** with GATT
-**
-** Parameter p_app_uuid128: Application UUID
-** p_cb_info: callback functions.
-**
-** Returns 0 for error, otherwise the index of the client registered with GATT
-**
-*******************************************************************************/
+ *
+ * Function GATT_Register
+ *
+ * Description This function is called to register an application
+ * with GATT
+ *
+ * Parameter p_app_uuid128: Application UUID
+ * p_cb_info: callback functions.
+ *
+ * Returns 0 for error, otherwise the index of the client registered with GATT
+ *
+ ******************************************************************************/
tGATT_IF GATT_Register (tBT_UUID *p_app_uuid128, tGATT_CBACK *p_cb_info)
{
tGATT_REG *p_reg;
@@ -1110,16 +1110,16 @@
/*******************************************************************************
-**
-** Function GATT_Deregister
-**
-** Description This function deregistered the application from GATT.
-**
-** Parameters gatt_if: applicaiton interface.
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function GATT_Deregister
+ *
+ * Description This function deregistered the application from GATT.
+ *
+ * Parameters gatt_if: applicaiton interface.
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
void GATT_Deregister (tGATT_IF gatt_if)
{
tGATT_REG *p_reg = gatt_get_regcb(gatt_if);
@@ -1184,18 +1184,18 @@
/*******************************************************************************
-**
-** Function GATT_StartIf
-**
-** Description This function is called after registration to start receiving
-** callbacks for registered interface. Function may call back
-** with connection status and queued notifications
-**
-** Parameter gatt_if: applicaiton interface.
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function GATT_StartIf
+ *
+ * Description This function is called after registration to start receiving
+ * callbacks for registered interface. Function may call back
+ * with connection status and queued notifications
+ *
+ * Parameter gatt_if: applicaiton interface.
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
void GATT_StartIf (tGATT_IF gatt_if)
{
tGATT_REG *p_reg;
@@ -1225,19 +1225,19 @@
/*******************************************************************************
-**
-** Function GATT_Connect
-**
-** Description This function initiate a connecttion to a remote device on GATT
-** channel.
-**
-** Parameters gatt_if: applicaiton interface
-** bd_addr: peer device address.
-** is_direct: is a direct conenection or a background auto connection
-**
-** Returns true if connection started; false if connection start failure.
-**
-*******************************************************************************/
+ *
+ * Function GATT_Connect
+ *
+ * Description This function initiate a connecttion to a remote device on GATT
+ * channel.
+ *
+ * Parameters gatt_if: applicaiton interface
+ * bd_addr: peer device address.
+ * is_direct: is a direct conenection or a background auto connection
+ *
+ * Returns true if connection started; false if connection start failure.
+ *
+ ******************************************************************************/
bool GATT_Connect (tGATT_IF gatt_if, BD_ADDR bd_addr, bool is_direct,
tBT_TRANSPORT transport, bool opportunistic)
{
@@ -1271,19 +1271,19 @@
}
/*******************************************************************************
-**
-** Function GATT_CancelConnect
-**
-** Description This function terminate the connection initaition to a remote
-** device on GATT channel.
-**
-** Parameters gatt_if: client interface. If 0 used as unconditionally disconnect,
-** typically used for direct connection cancellation.
-** bd_addr: peer device address.
-**
-** Returns true if connection started; false if connection start failure.
-**
-*******************************************************************************/
+ *
+ * Function GATT_CancelConnect
+ *
+ * Description This function terminate the connection initaition to a remote
+ * device on GATT channel.
+ *
+ * Parameters gatt_if: client interface. If 0 used as unconditionally disconnect,
+ * typically used for direct connection cancellation.
+ * bd_addr: peer device address.
+ *
+ * Returns true if connection started; false if connection start failure.
+ *
+ ******************************************************************************/
bool GATT_CancelConnect (tGATT_IF gatt_if, BD_ADDR bd_addr, bool is_direct){
tGATT_REG *p_reg;
tGATT_TCB *p_tcb;
@@ -1351,17 +1351,17 @@
}
/*******************************************************************************
-**
-** Function GATT_Disconnect
-**
-** Description This function disconnect the GATT channel for this registered
-** application.
-**
-** Parameters conn_id: connection identifier.
-**
-** Returns GATT_SUCCESS if disconnected.
-**
-*******************************************************************************/
+ *
+ * Function GATT_Disconnect
+ *
+ * Description This function disconnect the GATT channel for this registered
+ * application.
+ *
+ * Parameters conn_id: connection identifier.
+ *
+ * Returns GATT_SUCCESS if disconnected.
+ *
+ ******************************************************************************/
tGATT_STATUS GATT_Disconnect (uint16_t conn_id)
{
tGATT_STATUS ret = GATT_ILLEGAL_PARAMETER;
@@ -1383,19 +1383,19 @@
/*******************************************************************************
-**
-** Function GATT_GetConnectionInfor
-**
-** Description This function use conn_id to find its associated BD address and applciation
-** interface
-**
-** Parameters conn_id: connection id (input)
-** p_gatt_if: applicaiton interface (output)
-** bd_addr: peer device address. (output)
-**
-** Returns true the ligical link information is found for conn_id
-**
-*******************************************************************************/
+ *
+ * Function GATT_GetConnectionInfor
+ *
+ * Description This function use conn_id to find its associated BD address and applciation
+ * interface
+ *
+ * Parameters conn_id: connection id (input)
+ * p_gatt_if: applicaiton interface (output)
+ * bd_addr: peer device address. (output)
+ *
+ * Returns true the ligical link information is found for conn_id
+ *
+ ******************************************************************************/
bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF *p_gatt_if, BD_ADDR bd_addr,
tBT_TRANSPORT *p_transport)
{
@@ -1420,20 +1420,20 @@
/*******************************************************************************
-**
-** Function GATT_GetConnIdIfConnected
-**
-** 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)
-** bd_addr: peer device address. (input)
-** p_conn_id: connection id (output)
-** transport: transport option
-**
-** Returns true the logical link is connected
-**
-*******************************************************************************/
+ *
+ * Function GATT_GetConnIdIfConnected
+ *
+ * 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)
+ * bd_addr: peer device address. (input)
+ * p_conn_id: connection id (output)
+ * transport: transport option
+ *
+ * Returns true the logical link is connected
+ *
+ ******************************************************************************/
bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr, uint16_t *p_conn_id,
tBT_TRANSPORT transport)
{
diff --git a/stack/gatt/gatt_attr.cc b/stack/gatt/gatt_attr.cc
index f109092..194c9af 100644
--- a/stack/gatt/gatt_attr.cc
+++ b/stack/gatt/gatt_attr.cc
@@ -64,14 +64,14 @@
} ;
/*******************************************************************************
-**
-** Function gatt_profile_find_conn_id_by_bd_addr
-**
-** Description Find the connection ID by remote address
-**
-** Returns Connection ID
-**
-*******************************************************************************/
+ *
+ * Function gatt_profile_find_conn_id_by_bd_addr
+ *
+ * Description Find the connection ID by remote address
+ *
+ * Returns Connection ID
+ *
+ ******************************************************************************/
uint16_t gatt_profile_find_conn_id_by_bd_addr(BD_ADDR remote_bda)
{
uint16_t conn_id = GATT_INVALID_CONN_ID;
@@ -80,14 +80,14 @@
}
/*******************************************************************************
-**
-** Function gatt_profile_find_clcb_by_conn_id
-**
-** Description find clcb by Connection ID
-**
-** Returns Pointer to the found link conenction control block.
-**
-*******************************************************************************/
+ *
+ * Function gatt_profile_find_clcb_by_conn_id
+ *
+ * Description find clcb by Connection ID
+ *
+ * Returns Pointer to the found link conenction control block.
+ *
+ ******************************************************************************/
static tGATT_PROFILE_CLCB *gatt_profile_find_clcb_by_conn_id(uint16_t conn_id)
{
uint8_t i_clcb;
@@ -103,14 +103,14 @@
}
/*******************************************************************************
-**
-** Function gatt_profile_find_clcb_by_bd_addr
-**
-** Description The function searches all LCBs with macthing bd address.
-**
-** Returns Pointer to the found link conenction control block.
-**
-*******************************************************************************/
+ *
+ * Function gatt_profile_find_clcb_by_bd_addr
+ *
+ * Description The function searches all LCBs with macthing bd address.
+ *
+ * Returns Pointer to the found link conenction control block.
+ *
+ ******************************************************************************/
static tGATT_PROFILE_CLCB *gatt_profile_find_clcb_by_bd_addr(BD_ADDR bda, tBT_TRANSPORT transport)
{
uint8_t i_clcb;
@@ -127,14 +127,14 @@
}
/*******************************************************************************
-**
-** Function gatt_profile_clcb_alloc
-**
-** Description The function allocates a GATT profile connection link control block
-**
-** Returns NULL if not found. Otherwise pointer to the connection link block.
-**
-*******************************************************************************/
+ *
+ * Function gatt_profile_clcb_alloc
+ *
+ * Description The function allocates a GATT profile connection link control block
+ *
+ * Returns NULL if not found. Otherwise pointer to the connection link block.
+ *
+ ******************************************************************************/
tGATT_PROFILE_CLCB *gatt_profile_clcb_alloc (uint16_t conn_id, BD_ADDR bda, tBT_TRANSPORT tranport)
{
uint8_t i_clcb = 0;
@@ -159,28 +159,28 @@
}
/*******************************************************************************
-**
-** Function gatt_profile_clcb_dealloc
-**
-** Description The function deallocates a GATT profile connection link control block
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_profile_clcb_dealloc
+ *
+ * Description The function deallocates a GATT profile connection link control block
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_profile_clcb_dealloc (tGATT_PROFILE_CLCB *p_clcb)
{
memset(p_clcb, 0, sizeof(tGATT_PROFILE_CLCB));
}
/*******************************************************************************
-**
-** Function gatt_request_cback
-**
-** Description GATT profile attribute access request callback.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_request_cback
+ *
+ * Description GATT profile attribute access request callback.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void gatt_request_cback (uint16_t conn_id, uint32_t trans_id, tGATTS_REQ_TYPE type,
tGATTS_DATA *p_data)
{
@@ -224,14 +224,14 @@
}
/*******************************************************************************
-**
-** Function gatt_connect_cback
-**
-** Description Gatt profile connection callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_connect_cback
+ *
+ * Description Gatt profile connection callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_connect_cback (UNUSED_ATTR tGATT_IF gatt_if, BD_ADDR bda,
uint16_t conn_id,
bool connected, tGATT_DISCONN_REASON reason,
@@ -261,12 +261,12 @@
}
/*******************************************************************************
-**
-** Function gatt_profile_db_init
-**
-** Description Initializa the GATT profile attribute database.
-**
-*******************************************************************************/
+ *
+ * Function gatt_profile_db_init
+ *
+ * Description Initializa the GATT profile attribute database.
+ *
+ ******************************************************************************/
void gatt_profile_db_init (void)
{
tBT_UUID app_uuid = {LEN_UUID_128, {0}};
@@ -300,14 +300,14 @@
}
/*******************************************************************************
-**
-** Function gatt_disc_res_cback
-**
-** Description Gatt profile discovery result callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_disc_res_cback
+ *
+ * Description Gatt profile discovery result callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_disc_res_cback (uint16_t conn_id, tGATT_DISC_TYPE disc_type, tGATT_DISC_RES *p_data)
{
tGATT_PROFILE_CLCB *p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id);
@@ -338,14 +338,14 @@
}
/*******************************************************************************
-**
-** Function gatt_disc_cmpl_cback
-**
-** Description Gatt profile discovery complete callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_disc_cmpl_cback
+ *
+ * Description Gatt profile discovery complete callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_disc_cmpl_cback (uint16_t conn_id, tGATT_DISC_TYPE disc_type, tGATT_STATUS status)
{
tGATT_PROFILE_CLCB *p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id);
@@ -364,14 +364,14 @@
}
/*******************************************************************************
-**
-** Function gatt_cl_op_cmpl_cback
-**
-** Description Gatt profile client operation complete callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_cl_op_cmpl_cback
+ *
+ * Description Gatt profile client operation complete callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_cl_op_cmpl_cback (UNUSED_ATTR uint16_t conn_id, UNUSED_ATTR tGATTC_OPTYPE op,
UNUSED_ATTR tGATT_STATUS status,
UNUSED_ATTR tGATT_CL_COMPLETE *p_data)
@@ -379,14 +379,14 @@
}
/*******************************************************************************
-**
-** Function gatt_cl_start_config_ccc
-**
-** Description Gatt profile start configure service change CCC
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_cl_start_config_ccc
+ *
+ * Description Gatt profile start configure service change CCC
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_cl_start_config_ccc(tGATT_PROFILE_CLCB *p_clcb)
{
tGATT_DISC_PARAM srvc_disc_param;
@@ -431,14 +431,14 @@
}
/*******************************************************************************
-**
-** Function GATT_ConfigServiceChangeCCC
-**
-** Description Configure service change indication on remote device
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function GATT_ConfigServiceChangeCCC
+ *
+ * Description Configure service change indication on remote device
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void GATT_ConfigServiceChangeCCC (BD_ADDR remote_bda, bool enable, tBT_TRANSPORT transport)
{
tGATT_PROFILE_CLCB *p_clcb = gatt_profile_find_clcb_by_bd_addr (remote_bda, transport);
diff --git a/stack/gatt/gatt_auth.cc b/stack/gatt/gatt_auth.cc
index da77937..0bc02d3 100644
--- a/stack/gatt/gatt_auth.cc
+++ b/stack/gatt/gatt_auth.cc
@@ -33,14 +33,14 @@
#include "osi/include/osi.h"
/*******************************************************************************
-**
-** Function gatt_sign_data
-**
-** Description This function sign the data for write command.
-**
-** Returns true if encrypted, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function gatt_sign_data
+ *
+ * Description This function sign the data for write command.
+ *
+ * Returns true if encrypted, otherwise false.
+ *
+ ******************************************************************************/
static bool gatt_sign_data (tGATT_CLCB *p_clcb)
{
tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf;
@@ -81,15 +81,15 @@
}
/*******************************************************************************
-**
-** Function gatt_verify_signature
-**
-** Description This function start to verify the sign data when receiving
-** the data from peer device.
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function gatt_verify_signature
+ *
+ * Description This function start to verify the sign data when receiving
+ * the data from peer device.
+ *
+ * Returns
+ *
+ ******************************************************************************/
void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf)
{
uint16_t cmd_len;
@@ -120,14 +120,14 @@
return;
}
/*******************************************************************************
-**
-** Function gatt_sec_check_complete
-**
-** Description security check complete and proceed to data sending action.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_sec_check_complete
+ *
+ * Description security check complete and proceed to data sending action.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gatt_sec_check_complete(bool sec_check_ok, tGATT_CLCB *p_clcb, uint8_t sec_act)
{
if (p_clcb && p_clcb->p_tcb &&
@@ -149,14 +149,14 @@
}
}
/*******************************************************************************
-**
-** Function gatt_enc_cmpl_cback
-**
-** Description link encryption complete callback.
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function gatt_enc_cmpl_cback
+ *
+ * Description link encryption complete callback.
+ *
+ * Returns
+ *
+ ******************************************************************************/
void gatt_enc_cmpl_cback(BD_ADDR bd_addr, tBT_TRANSPORT transport,
UNUSED_ATTR void *p_ref_data, tBTM_STATUS result)
{
@@ -219,15 +219,15 @@
}
/*******************************************************************************
-**
-** Function gatt_notify_enc_cmpl
-**
-** Description link encryption complete notification for all encryption process
-** initiated outside GATT.
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function gatt_notify_enc_cmpl
+ *
+ * Description link encryption complete notification for all encryption process
+ * initiated outside GATT.
+ *
+ * Returns
+ *
+ ******************************************************************************/
void gatt_notify_enc_cmpl(BD_ADDR bd_addr)
{
tGATT_TCB *p_tcb;
@@ -270,14 +270,14 @@
return;
}
/*******************************************************************************
-**
-** Function gatt_set_sec_act
-**
-** Description This function set the sec_act in clcb
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function gatt_set_sec_act
+ *
+ * Description This function set the sec_act in clcb
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void gatt_set_sec_act(tGATT_TCB *p_tcb, tGATT_SEC_ACTION sec_act)
{
if (p_tcb)
@@ -286,14 +286,14 @@
}
}
/*******************************************************************************
-**
-** Function gatt_get_sec_act
-**
-** Description This function get the sec_act in clcb
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function gatt_get_sec_act
+ *
+ * Description This function get the sec_act in clcb
+ *
+ * Returns none
+ *
+ ******************************************************************************/
tGATT_SEC_ACTION gatt_get_sec_act(tGATT_TCB *p_tcb)
{
tGATT_SEC_ACTION sec_act = GATT_SEC_NONE;
@@ -304,15 +304,15 @@
return sec_act;
}
/*******************************************************************************
-**
-** Function gatt_determine_sec_act
-**
-** Description This routine determine the security action based on auth_request and
-** current link status
-**
-** Returns tGATT_SEC_ACTION security action
-**
-*******************************************************************************/
+ *
+ * Function gatt_determine_sec_act
+ *
+ * Description This routine determine the security action based on auth_request and
+ * current link status
+ *
+ * Returns tGATT_SEC_ACTION security action
+ *
+ ******************************************************************************/
tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB *p_clcb )
{
tGATT_SEC_ACTION act = GATT_SEC_OK;
@@ -408,15 +408,15 @@
/*******************************************************************************
-**
-** Function gatt_get_link_encrypt_status
-**
-** Description This routine get the encryption status of the specified link
-**
-**
-** Returns tGATT_STATUS link encryption status
-**
-*******************************************************************************/
+ *
+ * Function gatt_get_link_encrypt_status
+ *
+ * Description This routine get the encryption status of the specified link
+ *
+ *
+ * Returns tGATT_STATUS link encryption status
+ *
+ ******************************************************************************/
tGATT_STATUS gatt_get_link_encrypt_status(tGATT_TCB *p_tcb)
{
tGATT_STATUS encrypt_status = GATT_NOT_ENCRYPTED;
@@ -437,14 +437,14 @@
/*******************************************************************************
-**
-** Function gatt_convert_sec_action
-**
-** Description Convert GATT security action enum into equivalent BTM BLE security action enum
-**
-** Returns bool true - conversation is successful
-**
-*******************************************************************************/
+ *
+ * Function gatt_convert_sec_action
+ *
+ * Description Convert GATT security action enum into equivalent BTM BLE security action enum
+ *
+ * Returns bool true - conversation is successful
+ *
+ ******************************************************************************/
static bool gatt_convert_sec_action(tGATT_SEC_ACTION gatt_sec_act, tBTM_BLE_SEC_ACT *p_btm_sec_act )
{
bool status = true;
@@ -467,14 +467,14 @@
return status;
}
/*******************************************************************************
-**
-** Function gatt_check_enc_req
-**
-** Description check link security.
-**
-** Returns true if encrypted, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function gatt_check_enc_req
+ *
+ * Description check link security.
+ *
+ * Returns true if encrypted, otherwise false.
+ *
+ ******************************************************************************/
bool gatt_security_check_start(tGATT_CLCB *p_clcb)
{
tGATT_TCB *p_tcb = p_clcb->p_tcb;
diff --git a/stack/gatt/gatt_cl.cc b/stack/gatt/gatt_cl.cc
index 83e9e4b..42a0eb4 100644
--- a/stack/gatt/gatt_cl.cc
+++ b/stack/gatt/gatt_cl.cc
@@ -42,9 +42,9 @@
#define GATT_MTU_RSP_MIN_LEN 2
#define GATT_READ_BY_TYPE_RSP_MIN_LEN 1
-/********************************************************************************
-** G L O B A L G A T T D A T A *
-*********************************************************************************/
+/*******************************************************************************
+ * G L O B A L G A T T D A T A *
+ ******************************************************************************/
void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb);
uint8_t disc_type_to_att_opcode[GATT_DISC_MAX] =
@@ -69,14 +69,14 @@
/*******************************************************************************
-**
-** Function gatt_act_discovery
-**
-** Description GATT discovery operation.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_act_discovery
+ *
+ * Description GATT discovery operation.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gatt_act_discovery(tGATT_CLCB *p_clcb)
{
uint8_t op_code = disc_type_to_att_opcode[p_clcb->op_subtype];
@@ -125,14 +125,14 @@
}
/*******************************************************************************
-**
-** Function gatt_act_read
-**
-** Description GATT read operation.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_act_read
+ *
+ * Description GATT read operation.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gatt_act_read (tGATT_CLCB *p_clcb, uint16_t offset)
{
tGATT_TCB *p_tcb = p_clcb->p_tcb;
@@ -213,14 +213,14 @@
}
/*******************************************************************************
-**
-** Function gatt_act_write
-**
-** Description GATT write operation.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_act_write
+ *
+ * Description GATT write operation.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gatt_act_write (tGATT_CLCB *p_clcb, uint8_t sec_act)
{
tGATT_TCB *p_tcb = p_clcb->p_tcb;
@@ -286,14 +286,14 @@
}
}
/*******************************************************************************
-**
-** Function gatt_send_queue_write_cancel
-**
-** Description send queue write cancel
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_send_queue_write_cancel
+ *
+ * Description send queue write cancel
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gatt_send_queue_write_cancel (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_EXEC_FLAG flag)
{
uint8_t rt ;
@@ -308,14 +308,14 @@
}
}
/*******************************************************************************
-**
-** Function gatt_check_write_long_terminate
-**
-** Description To terminate write long or not.
-**
-** Returns true: write long is terminated; false keep sending.
-**
-*******************************************************************************/
+ *
+ * Function gatt_check_write_long_terminate
+ *
+ * Description To terminate write long or not.
+ *
+ * Returns true: write long is terminated; false keep sending.
+ *
+ ******************************************************************************/
bool gatt_check_write_long_terminate(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_VALUE *p_rsp_value)
{
tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf;
@@ -351,14 +351,14 @@
return false;
}
/*******************************************************************************
-**
-** Function gatt_send_prepare_write
-**
-** Description Send prepare write.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_send_prepare_write
+ *
+ * Description Send prepare write.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
{
tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf;
@@ -401,15 +401,15 @@
/*******************************************************************************
-**
-** Function gatt_process_find_type_value_rsp
-**
-** Description This function is called to handle find by type value response.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_find_type_value_rsp
+ *
+ * Description This function is called to handle find by type value response.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_process_find_type_value_rsp (UNUSED_ATTR tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb,
uint16_t len, uint8_t *p_data)
{
@@ -444,16 +444,16 @@
gatt_act_discovery(p_clcb) ;
}
/*******************************************************************************
-**
-** Function gatt_process_read_info_rsp
-**
-** Description This function is called to handle the read information
-** response.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_read_info_rsp
+ *
+ * Description This function is called to handle the read information
+ * response.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_process_read_info_rsp(UNUSED_ATTR tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UNUSED_ATTR uint8_t op_code,
uint16_t len, uint8_t *p_data)
{
@@ -501,15 +501,15 @@
gatt_act_discovery(p_clcb) ;
}
/*******************************************************************************
-**
-** Function gatt_proc_disc_error_rsp
-**
-** Description This function process the read by type response and send another
-** request if needed.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_proc_disc_error_rsp
+ *
+ * Description This function process the read by type response and send another
+ * request if needed.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gatt_proc_disc_error_rsp(UNUSED_ATTR tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb,
uint8_t opcode,
UNUSED_ATTR uint16_t handle, uint8_t reason)
@@ -539,15 +539,15 @@
}
/*******************************************************************************
-**
-** Function gatt_process_error_rsp
-**
-** Description This function is called to handle the error response
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_error_rsp
+ *
+ * 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, UNUSED_ATTR uint8_t op_code,
UNUSED_ATTR uint16_t len, uint8_t *p_data)
{
@@ -589,15 +589,15 @@
}
}
/*******************************************************************************
-**
-** Function gatt_process_prep_write_rsp
-**
-** Description This function is called to handle the read response
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_prep_write_rsp
+ *
+ * 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_t op_code,
uint16_t len, uint8_t *p_data)
{
@@ -640,16 +640,16 @@
}
/*******************************************************************************
-**
-** Function gatt_process_notification
-**
-** Description This function is called to handle the handle value indication
-** or handle value notification.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_notification
+ *
+ * Description This function is called to handle the handle value indication
+ * or handle value notification.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_process_notification(tGATT_TCB *p_tcb, uint8_t op_code,
uint16_t len, uint8_t *p_data)
{
@@ -727,16 +727,16 @@
}
/*******************************************************************************
-**
-** Function gatt_process_read_by_type_rsp
-**
-** Description This function is called to handle the read by type response.
-** read by type can be used for discovery, or read by type or
-** read characteristic value.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_read_by_type_rsp
+ *
+ * Description This function is called to handle the read by type response.
+ * read by type can be used for discovery, or read by type or
+ * read characteristic value.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, uint8_t op_code,
uint16_t len, uint8_t *p_data)
{
@@ -929,15 +929,15 @@
}
/*******************************************************************************
-**
-** Function gatt_process_read_rsp
-**
-** Description This function is called to handle the read BLOB response
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_read_rsp
+ *
+ * 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, UNUSED_ATTR uint8_t op_code,
uint16_t len, uint8_t *p_data)
{
@@ -1016,29 +1016,29 @@
/*******************************************************************************
-**
-** Function gatt_process_handle_rsp
-**
-** Description This function is called to handle the write response
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_handle_rsp
+ *
+ * Description This function is called to handle the write response
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_process_handle_rsp(tGATT_CLCB *p_clcb)
{
gatt_end_operation(p_clcb, GATT_SUCCESS, NULL);
}
/*******************************************************************************
-**
-** Function gatt_process_mtu_rsp
-**
-** Description This function is called to process the configure MTU response.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_mtu_rsp
+ *
+ * Description This function is called to process the configure MTU response.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_process_mtu_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, uint16_t len, uint8_t *p_data)
{
uint16_t mtu;
@@ -1061,15 +1061,15 @@
gatt_end_operation(p_clcb, status, NULL);
}
/*******************************************************************************
-**
-** Function gatt_cmd_to_rsp_code
-**
-** Description The function convert a ATT command op code into the corresponding
-** response code assume no error occurs.
-**
-** Returns response code.
-**
-*******************************************************************************/
+ *
+ * Function gatt_cmd_to_rsp_code
+ *
+ * Description The function convert a ATT command op code into the corresponding
+ * response code assume no error occurs.
+ *
+ * Returns response code.
+ *
+ ******************************************************************************/
uint8_t gatt_cmd_to_rsp_code (uint8_t cmd_code)
{
uint8_t rsp_code = 0;
@@ -1081,14 +1081,14 @@
return rsp_code;
}
/*******************************************************************************
-**
-** Function gatt_cl_send_next_cmd_inq
-**
-** Description Find next command in queue and sent to server
-**
-** Returns true if command sent, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function gatt_cl_send_next_cmd_inq
+ *
+ * Description Find next command in queue and sent to server
+ *
+ * Returns true if command sent, otherwise false.
+ *
+ ******************************************************************************/
bool 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];
@@ -1141,16 +1141,16 @@
}
/*******************************************************************************
-**
-** Function gatt_client_handle_server_rsp
-**
-** Description This function is called to handle the server response to
-** client.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_client_handle_server_rsp
+ *
+ * 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_t op_code,
uint16_t len, uint8_t *p_data)
{
diff --git a/stack/gatt/gatt_db.cc b/stack/gatt/gatt_db.cc
index 090964d..c375179 100644
--- a/stack/gatt/gatt_db.cc
+++ b/stack/gatt/gatt_db.cc
@@ -34,9 +34,9 @@
#include "btm_int.h"
#include "osi/include/osi.h"
-/********************************************************************************
-** L O C A L F U N C T I O N P R O T O T Y P E S *
-*********************************************************************************/
+/*******************************************************************************
+ * L O C A L F U N C T I O N P R O T O T Y P E S *
+ ******************************************************************************/
static bool allocate_svc_db_buf(tGATT_SVC_DB *p_db);
static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, tBT_UUID *p_uuid, tGATT_PERM perm);
static bool deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr);
@@ -48,17 +48,17 @@
bt_gatt_db_attribute_type_t gatt_type);
/*******************************************************************************
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ ******************************************************************************/
bool gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID *p_service, bool is_pri,
uint16_t s_hdl, uint16_t num_handle)
{
@@ -81,17 +81,17 @@
}
/*******************************************************************************
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ ******************************************************************************/
tBT_UUID * gatts_get_service_uuid (tGATT_SVC_DB *p_db)
{
if (!p_db || !p_db->p_attr_list)
@@ -107,14 +107,14 @@
}
/*******************************************************************************
-**
-** Function gatts_check_attr_readability
-**
-** Description check attribute readability
-**
-** Returns status of operation.
-**
-*******************************************************************************/
+ *
+ * Function gatts_check_attr_readability
+ *
+ * Description check attribute readability
+ *
+ * Returns status of operation.
+ *
+ ******************************************************************************/
static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR *p_attr,
UNUSED_ATTR uint16_t offset,
bool read_long,
@@ -186,23 +186,23 @@
}
/*******************************************************************************
-**
-** Function read_attr_value
-**
-** Description Utility function to read an attribute value.
-**
-** Parameter p_attr: pointer to the attribute to read.
-** offset: read offset.
-** p_value: output parameter to carry out the attribute value.
-** 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.
-**
-** Returns status of operation.
-**
-*******************************************************************************/
+ *
+ * Function read_attr_value
+ *
+ * Description Utility function to read an attribute value.
+ *
+ * Parameter p_attr: pointer to the attribute to read.
+ * offset: read offset.
+ * p_value: output parameter to carry out the attribute value.
+ * 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.
+ *
+ * Returns status of operation.
+ *
+ ******************************************************************************/
static tGATT_STATUS read_attr_value (void *p_attr,
uint16_t offset,
uint8_t **p_data,
@@ -300,23 +300,23 @@
}
/*******************************************************************************
-**
-** Function gatts_db_read_attr_value_by_type
-**
-** Description Query attribute value by attribute type.
-**
-** Parameter p_db: pointer to the attribute database.
-** p_rsp: Read By type response data.
-** s_handle: starting handle of the range we are looking for.
-** 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.
-**
-** Returns Status of the operation.
-**
-*******************************************************************************/
+ *
+ * Function gatts_db_read_attr_value_by_type
+ *
+ * Description Query attribute value by attribute type.
+ *
+ * Parameter p_db: pointer to the attribute database.
+ * p_rsp: Read By type response data.
+ * s_handle: starting handle of the range we are looking for.
+ * 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.
+ *
+ * Returns Status of the operation.
+ *
+ ******************************************************************************/
tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb,
tGATT_SVC_DB *p_db,
uint8_t op_code,
@@ -412,17 +412,17 @@
}
/*******************************************************************************
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ ******************************************************************************/
uint16_t gatts_add_included_service (tGATT_SVC_DB *p_db, uint16_t s_handle,
uint16_t e_handle, tBT_UUID service)
{
@@ -459,20 +459,20 @@
}
/*******************************************************************************
-**
-** Function gatts_add_characteristic
-**
-** Description This function add a characteristics and its descriptor into
-** a servce identified by the service database pointer.
-**
-** Parameter p_db: database pointer.
-** perm: permission (authentication and key size requirements)
-** property: property of the characteristic.
-** p_char: characteristic value information.
-**
-** Returns Status of te operation.
-**
-*******************************************************************************/
+ *
+ * Function gatts_add_characteristic
+ *
+ * Description This function add a characteristics and its descriptor into
+ * a servce identified by the service database pointer.
+ *
+ * Parameter p_db: database pointer.
+ * perm: permission (authentication and key size requirements)
+ * property: property of the characteristic.
+ * p_char: characteristic value information.
+ *
+ * Returns Status of te operation.
+ *
+ ******************************************************************************/
uint16_t gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
tGATT_CHAR_PROP property,
tBT_UUID * p_char_uuid)
@@ -512,14 +512,14 @@
}
/*******************************************************************************
-**
-** Function gatt_convertchar_descr_type
-**
-** Description This function convert a char descript UUID into descriptor type.
-**
-** Returns descriptor type.
-**
-*******************************************************************************/
+ *
+ * Function gatt_convertchar_descr_type
+ *
+ * Description This function convert a char descript UUID into descriptor type.
+ *
+ * Returns descriptor type.
+ *
+ ******************************************************************************/
uint8_t gatt_convertchar_descr_type(tBT_UUID *p_descr_uuid)
{
tBT_UUID std_descr = {LEN_UUID_16, {GATT_UUID_CHAR_EXT_PROP}};
@@ -556,19 +556,19 @@
}
/*******************************************************************************
-**
-** Function gatts_add_char_descr
-**
-** Description This function add a characteristics descriptor.
-**
-** Parameter p_db: database pointer.
-** perm: characteristic descriptor permission type.
-** char_dscp_tpye: the characteristic descriptor masks.
-** p_dscp_params: characteristic descriptors values.
-**
-** Returns Status of the operation.
-**
-*******************************************************************************/
+ *
+ * Function gatts_add_char_descr
+ *
+ * Description This function add a characteristics descriptor.
+ *
+ * Parameter p_db: database pointer.
+ * perm: characteristic descriptor permission type.
+ * char_dscp_tpye: the characteristic descriptor masks.
+ * p_dscp_params: characteristic descriptors values.
+ *
+ * Returns Status of the operation.
+ *
+ ******************************************************************************/
uint16_t gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
tBT_UUID * p_descr_uuid)
{
@@ -590,28 +590,28 @@
}
}
-/*******************************************************************************/
+/******************************************************************************/
/* Service Attribute Database Query Utility Functions */
-/*******************************************************************************/
+/******************************************************************************/
/*******************************************************************************
-**
-** Function gatts_read_attr_value_by_handle
-**
-** Description Query attribute value by attribute handle.
-**
-** Parameter p_db: pointer to the attribute database.
-** handle: Attribute handle to read.
-** offset: Read offset.
-** p_value: output parameter to carry out the attribute value.
-** 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
-**
-** Returns Status of operation.
-**
-*******************************************************************************/
+ *
+ * Function gatts_read_attr_value_by_handle
+ *
+ * Description Query attribute value by attribute handle.
+ *
+ * Parameter p_db: pointer to the attribute database.
+ * handle: Attribute handle to read.
+ * offset: Read offset.
+ * p_value: output parameter to carry out the attribute value.
+ * 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
+ *
+ * Returns Status of operation.
+ *
+ ******************************************************************************/
tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,
tGATT_SVC_DB *p_db,
uint8_t op_code,
@@ -653,24 +653,24 @@
}
/*******************************************************************************
-**
-** Function gatts_read_attr_perm_check
-**
-** Description Check attribute readability.
-**
-** Parameter p_db: pointer to the attribute database.
-** handle: Attribute handle to read.
-** offset: Read offset.
-** p_value: output parameter to carry out the attribute value.
-** 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
-**
-** Returns Status of operation.
-**
-*******************************************************************************/
+ *
+ * Function gatts_read_attr_perm_check
+ *
+ * Description Check attribute readability.
+ *
+ * Parameter p_db: pointer to the attribute database.
+ * handle: Attribute handle to read.
+ * offset: Read offset.
+ * p_value: output parameter to carry out the attribute value.
+ * 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
+ *
+ * Returns Status of operation.
+ *
+ ******************************************************************************/
tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
bool is_long,
uint16_t handle,
@@ -700,23 +700,23 @@
return status;
}
/*******************************************************************************
-**
-** Function gatts_write_attr_perm_check
-**
-** Description Write attribute value into database.
-**
-** Parameter p_db: pointer to the attribute database.
-** op_code:op code of this write.
-** handle: handle of the attribute to write.
-** 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
-**
-** Returns Status of the operation.
-**
-*******************************************************************************/
+ *
+ * Function gatts_write_attr_perm_check
+ *
+ * Description Write attribute value into database.
+ *
+ * Parameter p_db: pointer to the attribute database.
+ * op_code:op code of this write.
+ * handle: handle of the attribute to write.
+ * 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
+ *
+ * Returns Status of the operation.
+ *
+ ******************************************************************************/
tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, uint8_t op_code,
uint16_t handle, uint16_t offset, uint8_t *p_data,
uint16_t len, tGATT_SEC_FLAG sec_flag, uint8_t key_size)
@@ -903,20 +903,20 @@
}
/*******************************************************************************
-**
-** Function allocate_attr_in_db
-**
-** Description Allocate a memory space for a new attribute, and link this
-** attribute into the database attribute list.
-**
-**
-** Parameter p_db : database pointer.
-** p_uuid: pointer to attribute UUID
-** service : type of attribute to be added.
-**
-** Returns pointer to the newly allocated attribute.
-**
-*******************************************************************************/
+ *
+ * Function allocate_attr_in_db
+ *
+ * Description Allocate a memory space for a new attribute, and link this
+ * attribute into the database attribute list.
+ *
+ *
+ * Parameter p_db : database pointer.
+ * p_uuid: pointer to attribute UUID
+ * service : type of attribute to be added.
+ *
+ * Returns pointer to the newly allocated attribute.
+ *
+ ******************************************************************************/
static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, tBT_UUID *p_uuid, tGATT_PERM perm)
{
if (p_uuid == NULL) {
@@ -970,17 +970,17 @@
}
/*******************************************************************************
-**
-** Function deallocate_attr_in_db
-**
-** Description Free an attribute within the database.
-**
-** Parameter p_db: database pointer.
-** p_attr: pointer to the attribute record to be freed.
-**
-** Returns bool : success
-**
-*******************************************************************************/
+ *
+ * Function deallocate_attr_in_db
+ *
+ * Description Free an attribute within the database.
+ *
+ * Parameter p_db: database pointer.
+ * p_attr: pointer to the attribute record to be freed.
+ *
+ * Returns bool : success
+ *
+ ******************************************************************************/
static bool deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr)
{
tGATT_ATTR *p_cur, *p_next;
@@ -1014,21 +1014,21 @@
}
/*******************************************************************************
-**
-** Function copy_extra_byte_in_db
-**
-** Description Utility function to allocate extra bytes memory in DB and copy
-** the value from a source place.
-**
-**
-** Parameter p_db: database pointer.
-** p_dst: destination data pointer.
-** p_src: source data pointer.
-** len: data length to be copied.
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function copy_extra_byte_in_db
+ *
+ * Description Utility function to allocate extra bytes memory in DB and copy
+ * the value from a source place.
+ *
+ *
+ * Parameter p_db: database pointer.
+ * p_dst: destination data pointer.
+ * p_src: source data pointer.
+ * len: data length to be copied.
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
static bool copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, uint16_t len)
{
uint8_t *p = (uint8_t *)*p_dst;
@@ -1052,14 +1052,14 @@
}
/*******************************************************************************
-**
-** Function allocate_svc_db_buf
-**
-** Description Utility function to allocate extra buffer for service database.
-**
-** Returns true if allocation succeed, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function allocate_svc_db_buf
+ *
+ * Description Utility function to allocate extra buffer for service database.
+ *
+ * Returns true if allocation succeed, otherwise false.
+ *
+ ******************************************************************************/
static bool allocate_svc_db_buf(tGATT_SVC_DB *p_db)
{
BT_HDR *p_buf = (BT_HDR *)osi_calloc(GATT_DB_BUF_SIZE);
@@ -1076,14 +1076,14 @@
}
/*******************************************************************************
-**
-** Function gatts_send_app_read_request
-**
-** Description Send application read request callback
-**
-** Returns status of operation.
-**
-*******************************************************************************/
+ *
+ * Function gatts_send_app_read_request
+ *
+ * Description Send application read request callback
+ *
+ * Returns status of operation.
+ *
+ ******************************************************************************/
static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, uint8_t op_code,
uint16_t handle, uint16_t offset, uint32_t trans_id,
bt_gatt_db_attribute_type_t gatt_type)
@@ -1132,17 +1132,17 @@
}
/*******************************************************************************
-**
-** Function gatts_db_add_service_declaration
-**
-** Description Update a service database service declaration record.
-**
-** Parameter p_db: database pointer.
-** service: UUID of the service.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_db_add_service_declaration
+ *
+ * Description Update a service database service declaration record.
+ *
+ * Parameter p_db: database pointer.
+ * service: UUID of the service.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static bool gatts_db_add_service_declaration(tGATT_SVC_DB *p_db, tBT_UUID *p_service, bool is_pri)
{
tGATT_ATTR *p_attr;
diff --git a/stack/gatt/gatt_main.cc b/stack/gatt/gatt_main.cc
index e9a6f14..dd0d56d 100644
--- a/stack/gatt/gatt_main.cc
+++ b/stack/gatt/gatt_main.cc
@@ -40,9 +40,9 @@
*/
#define GATT_MIN_BR_MTU_SIZE 48
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void gatt_le_connect_cback (uint16_t chan, BD_ADDR bd_addr, bool connected,
uint16_t reason, tBT_TRANSPORT transport);
static void gatt_le_data_ind (uint16_t chan, BD_ADDR bd_addr, BT_HDR *p_buf);
@@ -77,15 +77,15 @@
tGATT_CB gatt_cb;
/*******************************************************************************
-**
-** Function gatt_init
-**
-** Description This function is enable the GATT profile on the device.
-** It clears out the control blocks, and registers with L2CAP.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_init
+ *
+ * Description This function is enable the GATT profile on the device.
+ * It clears out the control blocks, and registers with L2CAP.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_init (void)
{
tL2CAP_FIXED_CHNL_REG fixed_reg;
@@ -136,14 +136,14 @@
/*******************************************************************************
-**
-** Function gatt_free
-**
-** Description This function frees resources used by the GATT profile.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_free
+ *
+ * Description This function frees resources used by the GATT profile.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_free(void)
{
int i;
@@ -177,16 +177,16 @@
}
/*******************************************************************************
-**
-** Function gatt_connect
-**
-** Description This function is called to initiate a connection to a peer device.
-**
-** Parameter rem_bda: remote device address to connect to.
-**
-** Returns true if connection is started, otherwise return false.
-**
-*******************************************************************************/
+ *
+ * Function gatt_connect
+ *
+ * Description This function is called to initiate a connection to a peer device.
+ *
+ * Parameter rem_bda: remote device address to connect to.
+ *
+ * Returns true if connection is started, otherwise return false.
+ *
+ ******************************************************************************/
bool gatt_connect (BD_ADDR rem_bda, tGATT_TCB *p_tcb, tBT_TRANSPORT transport)
{
bool gatt_ret = false;
@@ -210,17 +210,17 @@
}
/*******************************************************************************
-**
-** Function gatt_disconnect
-**
-** Description This function is called to disconnect to an ATT device.
-**
-** Parameter p_tcb: pointer to the TCB to disconnect.
-**
-** Returns true: if connection found and to be disconnected; otherwise
-** return false.
-**
-*******************************************************************************/
+ *
+ * Function gatt_disconnect
+ *
+ * Description This function is called to disconnect to an ATT device.
+ *
+ * Parameter p_tcb: pointer to the TCB to disconnect.
+ *
+ * Returns true: if connection found and to be disconnected; otherwise
+ * return false.
+ *
+ ******************************************************************************/
bool gatt_disconnect (tGATT_TCB *p_tcb)
{
bool ret = false;
@@ -267,14 +267,14 @@
}
/*******************************************************************************
-**
-** Function gatt_update_app_hold_link_status
-**
-** Description Update the application use link status
-**
-** Returns true if any modifications are made, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function gatt_update_app_hold_link_status
+ *
+ * Description Update the application use link status
+ *
+ * Returns true if any modifications are made, false otherwise.
+ *
+ ******************************************************************************/
bool gatt_update_app_hold_link_status(tGATT_IF gatt_if, tGATT_TCB *p_tcb, bool is_add)
{
for (int i=0; i<GATT_MAX_APPS; i++) {
@@ -294,15 +294,15 @@
}
/*******************************************************************************
-**
-** Function gatt_update_app_use_link_flag
-**
-** Description Update the application use link flag and optional to check the acl link
-** if the link is up then set the idle time out accordingly
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_update_app_use_link_flag
+ *
+ * Description Update the application use link flag and optional to check the acl link
+ * if the link is up then set the idle time out accordingly
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB *p_tcb, bool is_add,
bool check_acl_link)
{
@@ -339,14 +339,14 @@
}
/*******************************************************************************
-**
-** Function gatt_act_connect
-**
-** Description GATT connection initiation.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function gatt_act_connect
+ *
+ * Description GATT connection initiation.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
bool gatt_act_connect (tGATT_REG *p_reg, BD_ADDR bd_addr,
tBT_TRANSPORT transport, bool opportunistic)
{
@@ -408,14 +408,14 @@
}
/*******************************************************************************
-**
-** Function gatt_le_connect_cback
-**
-** Description This callback function is called by L2CAP to indicate that
-** the ATT fixed channel for LE is
-** connected (conn = true)/disconnected (conn = false).
-**
-*******************************************************************************/
+ *
+ * Function gatt_le_connect_cback
+ *
+ * Description This callback function is called by L2CAP to indicate that
+ * the ATT fixed channel for LE is
+ * connected (conn = true)/disconnected (conn = false).
+ *
+ ******************************************************************************/
static void gatt_le_connect_cback (uint16_t chan, BD_ADDR bd_addr, bool connected,
uint16_t reason, tBT_TRANSPORT transport)
{
@@ -493,15 +493,15 @@
}
/*******************************************************************************
-**
-** Function gatt_channel_congestion
-**
-** Description This function is called to process the congestion callback
-** from lcb
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_channel_congestion
+ *
+ * Description This function is called to process the congestion callback
+ * from lcb
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_channel_congestion(tGATT_TCB *p_tcb, bool congested)
{
uint8_t i = 0;
@@ -528,15 +528,15 @@
}
/*******************************************************************************
-**
-** Function gatt_le_cong_cback
-**
-** Description This function is called when GATT fixed channel is congested
-** or uncongested.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_le_cong_cback
+ *
+ * Description This function is called when GATT fixed channel is congested
+ * or uncongested.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_le_cong_cback(BD_ADDR remote_bda, bool congested)
{
tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(remote_bda, BT_TRANSPORT_LE);
@@ -549,20 +549,20 @@
}
/*******************************************************************************
-**
-** Function gatt_le_data_ind
-**
-** Description This function is called when data is received from L2CAP.
-** if we are the originator of the connection, we are the ATT
-** client, and the received message is queued up for the client.
-**
-** If we are the destination of the connection, we are the ATT
-** server, so the message is passed to the server processing
-** function.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_le_data_ind
+ *
+ * Description This function is called when data is received from L2CAP.
+ * if we are the originator of the connection, we are the ATT
+ * client, and the received message is queued up for the client.
+ *
+ * If we are the destination of the connection, we are the ATT
+ * server, so the message is passed to the server processing
+ * function.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_le_data_ind (uint16_t chan, BD_ADDR bd_addr, BT_HDR *p_buf)
{
tGATT_TCB *p_tcb;
@@ -586,16 +586,16 @@
}
/*******************************************************************************
-**
-** Function gatt_l2cif_connect_ind
-**
-** Description This function handles an inbound connection indication
-** from L2CAP. This is the case where we are acting as a
-** server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_l2cif_connect_ind
+ *
+ * Description This function handles an inbound connection indication
+ * from L2CAP. This is the case where we are acting as a
+ * server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_l2cif_connect_ind_cback (BD_ADDR bd_addr, uint16_t lcid,
UNUSED_ATTR uint16_t psm, uint8_t id)
{
@@ -643,15 +643,15 @@
}
/*******************************************************************************
-**
-** Function gatt_l2c_connect_cfm_cback
-**
-** Description This is the L2CAP connect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_l2c_connect_cfm_cback
+ *
+ * Description This is the L2CAP connect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_l2cif_connect_cfm_cback(uint16_t lcid, uint16_t result)
{
tGATT_TCB *p_tcb;
@@ -696,15 +696,15 @@
}
/*******************************************************************************
-**
-** Function gatt_l2cif_config_cfm_cback
-**
-** Description This is the L2CAP config confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_l2cif_config_cfm_cback
+ *
+ * Description This is the L2CAP config confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_l2cif_config_cfm_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tGATT_TCB *p_tcb;
@@ -754,15 +754,15 @@
}
/*******************************************************************************
-**
-** Function gatt_l2cif_config_ind_cback
-**
-** Description This is the L2CAP config indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_l2cif_config_ind_cback
+ *
+ * Description This is the L2CAP config indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_l2cif_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tGATT_TCB *p_tcb;
@@ -812,15 +812,15 @@
}
/*******************************************************************************
-**
-** Function gatt_l2cif_disconnect_ind_cback
-**
-** Description This is the L2CAP disconnect indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_l2cif_disconnect_ind_cback
+ *
+ * Description This is the L2CAP disconnect indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_l2cif_disconnect_ind_cback(uint16_t lcid, bool ack_needed)
{
tGATT_TCB *p_tcb;
@@ -851,15 +851,15 @@
}
/*******************************************************************************
-**
-** Function gatt_l2cif_disconnect_cfm_cback
-**
-** Description This is the L2CAP disconnect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_l2cif_disconnect_cfm_cback
+ *
+ * Description This is the L2CAP disconnect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_l2cif_disconnect_cfm_cback(uint16_t lcid,
UNUSED_ATTR uint16_t result)
{
@@ -888,15 +888,15 @@
}
/*******************************************************************************
-**
-** Function gatt_l2cif_data_ind_cback
-**
-** Description This is the L2CAP data indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_l2cif_data_ind_cback
+ *
+ * Description This is the L2CAP data indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_l2cif_data_ind_cback(uint16_t lcid, BT_HDR *p_buf)
{
tGATT_TCB *p_tcb;
@@ -913,14 +913,14 @@
}
/*******************************************************************************
-**
-** Function gatt_l2cif_congest_cback
-**
-** Description L2CAP congestion callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_l2cif_congest_cback
+ *
+ * Description L2CAP congestion callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_l2cif_congest_cback (uint16_t lcid, bool congested)
{
tGATT_TCB *p_tcb = gatt_find_tcb_by_cid(lcid);
@@ -932,15 +932,15 @@
}
/*******************************************************************************
-**
-** Function gatt_send_conn_cback
-**
-** Description Callback used to notify layer above about a connection.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_send_conn_cback
+ *
+ * Description Callback used to notify layer above about a connection.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatt_send_conn_cback(tGATT_TCB *p_tcb)
{
uint8_t i;
@@ -976,20 +976,20 @@
}
/*******************************************************************************
-**
-** Function gatt_le_data_ind
-**
-** Description This function is called when data is received from L2CAP.
-** if we are the originator of the connection, we are the ATT
-** client, and the received message is queued up for the client.
-**
-** If we are the destination of the connection, we are the ATT
-** server, so the message is passed to the server processing
-** function.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_le_data_ind
+ *
+ * Description This function is called when data is received from L2CAP.
+ * if we are the originator of the connection, we are the ATT
+ * client, and the received message is queued up for the client.
+ *
+ * If we are the destination of the connection, we are the ATT
+ * server, so the message is passed to the server processing
+ * function.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf)
{
uint8_t *p = (uint8_t *)(p_buf + 1) + p_buf->offset;
@@ -1033,14 +1033,14 @@
}
/*******************************************************************************
-**
-** Function gatt_add_a_bonded_dev_for_srv_chg
-**
-** Description Add a bonded dev to the service changed client list
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_add_a_bonded_dev_for_srv_chg
+ *
+ * Description Add a bonded dev to the service changed client list
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_add_a_bonded_dev_for_srv_chg (BD_ADDR bda)
{
tGATTS_SRV_CHG_REQ req;
@@ -1058,15 +1058,15 @@
}
/*******************************************************************************
-**
-** Function gatt_send_srv_chg_ind
-**
-** Description This function is called to send a service chnaged indication to
-** the specified bd address
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_send_srv_chg_ind
+ *
+ * Description This function is called to send a service chnaged indication to
+ * the specified bd address
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_send_srv_chg_ind (BD_ADDR peer_bda)
{
uint8_t handle_range[GATT_SIZE_OF_SRV_CHG_HNDL_RANGE];
@@ -1097,15 +1097,15 @@
}
/*******************************************************************************
-**
-** Function gatt_chk_srv_chg
-**
-** Description Check sending service chnaged Indication is required or not
-** if required then send the Indication
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_chk_srv_chg
+ *
+ * Description Check sending service chnaged Indication is required or not
+ * if required then send the Indication
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_chk_srv_chg(tGATTS_SRV_CHG *p_srv_chg_clt)
{
GATT_TRACE_DEBUG("gatt_chk_srv_chg srv_changed=%d", p_srv_chg_clt->srv_changed );
@@ -1117,15 +1117,15 @@
}
/*******************************************************************************
-**
-** Function gatt_init_srv_chg
-**
-** Description This function is used to initialize the service changed
-** attribute value
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_init_srv_chg
+ *
+ * Description This function is used to initialize the service changed
+ * attribute value
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_init_srv_chg (void)
{
tGATTS_SRV_CHG_REQ req;
@@ -1168,14 +1168,14 @@
}
/*******************************************************************************
-**
-** Function gatt_proc_srv_chg
-**
-** Description This function is process the service changed request
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_proc_srv_chg
+ *
+ * Description This function is process the service changed request
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_proc_srv_chg (void)
{
uint8_t start_idx, found_idx;
@@ -1209,14 +1209,14 @@
}
/*******************************************************************************
-**
-** Function gatt_set_ch_state
-**
-** Description This function set the ch_state in tcb
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function gatt_set_ch_state
+ *
+ * Description This function set the ch_state in tcb
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void gatt_set_ch_state(tGATT_TCB *p_tcb, tGATT_CH_STATE ch_state)
{
if (p_tcb)
@@ -1227,14 +1227,14 @@
}
/*******************************************************************************
-**
-** Function gatt_get_ch_state
-**
-** Description This function get the ch_state in tcb
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function gatt_get_ch_state
+ *
+ * Description This function get the ch_state in tcb
+ *
+ * Returns none
+ *
+ ******************************************************************************/
tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB *p_tcb)
{
tGATT_CH_STATE ch_state = GATT_CH_CLOSE;
diff --git a/stack/gatt/gatt_sr.cc b/stack/gatt/gatt_sr.cc
index 54684dc..3da64f9 100644
--- a/stack/gatt/gatt_sr.cc
+++ b/stack/gatt/gatt_sr.cc
@@ -34,15 +34,15 @@
/*******************************************************************************
-**
-** Function gatt_sr_enqueue_cmd
-**
-** Description This function enqueue the request from client which needs a
-** application response, and update the transaction ID.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_enqueue_cmd
+ *
+ * Description This function enqueue the request from client which needs a
+ * application response, and update the transaction ID.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint32_t gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, uint8_t op_code, uint16_t handle)
{
tGATT_SR_CMD *p_cmd = &p_tcb->sr_cmd;
@@ -73,28 +73,28 @@
}
/*******************************************************************************
-**
-** Function gatt_sr_cmd_empty
-**
-** Description This function check the server command queue is empty or not.
-**
-** Returns true if empty, false if there is pending command.
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_cmd_empty
+ *
+ * Description This function check the server command queue is empty or not.
+ *
+ * Returns true if empty, false if there is pending command.
+ *
+ ******************************************************************************/
bool gatt_sr_cmd_empty (tGATT_TCB *p_tcb)
{
return(p_tcb->sr_cmd.op_code == 0);
}
/*******************************************************************************
-**
-** Function gatt_dequeue_sr_cmd
-**
-** Description This function dequeue the request from command queue.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_dequeue_sr_cmd
+ *
+ * Description This function dequeue the request from command queue.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_dequeue_sr_cmd (tGATT_TCB *p_tcb)
{
/* Double check in case any buffers are queued */
@@ -110,14 +110,14 @@
}
/*******************************************************************************
-**
-** Function process_read_multi_rsp
-**
-** Description This function check the read multiple response.
-**
-** Returns bool if all replies have been received
-**
-*******************************************************************************/
+ *
+ * Function process_read_multi_rsp
+ *
+ * Description This function check the read multiple response.
+ *
+ * Returns bool if all replies have been received
+ *
+ ******************************************************************************/
static bool process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
tGATTS_RSP *p_msg, uint16_t mtu)
{
@@ -244,15 +244,15 @@
}
/*******************************************************************************
-**
-** Function gatt_sr_process_app_rsp
-**
-** Description This function checks whether the response message from application
-** match any pending request or not.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_process_app_rsp
+ *
+ * Description This function checks whether the response message from application
+ * match any pending request or not.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
UNUSED_ATTR uint32_t trans_id, uint8_t op_code,
tGATT_STATUS status, tGATTS_RSP *p_msg)
@@ -313,15 +313,15 @@
}
/*******************************************************************************
-**
-** Function gatt_process_exec_write_req
-**
-** Description This function is called to process the execute write request
-** from client.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_exec_write_req
+ *
+ * Description This function is called to process the execute write request
+ * from client.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_process_exec_write_req (tGATT_TCB *p_tcb, uint8_t op_code,
UNUSED_ATTR uint16_t len, uint8_t *p_data)
{
@@ -376,15 +376,15 @@
}
/*******************************************************************************
-**
-** Function gatt_process_read_multi_req
-**
-** Description This function is called to process the read multiple request
-** from client.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_process_read_multi_req
+ *
+ * Description This function is called to process the read multiple request
+ * from client.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_process_read_multi_req (tGATT_TCB *p_tcb, uint8_t op_code, uint16_t len, uint8_t *p_data)
{
uint32_t trans_id;
@@ -491,15 +491,15 @@
}
/*******************************************************************************
-**
-** Function gatt_build_primary_service_rsp
-**
-** Description Primamry service request processed internally. Theretically
-** only deal with ReadByTypeVAlue and ReadByGroupType.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_build_primary_service_rsp
+ *
+ * Description Primamry service request processed internally. Theretically
+ * only deal with ReadByTypeVAlue and ReadByGroupType.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_tcb,
uint8_t op_code, uint16_t s_hdl,
uint16_t e_hdl,
@@ -583,16 +583,16 @@
}
/*******************************************************************************
-**
-** Function gatt_build_find_info_rsp
-**
-** Description fill the find information response information in the given
-** buffer.
-**
-** Returns true: if data filled sucessfully.
-** false: packet full, or format mismatch.
-**
-*******************************************************************************/
+ *
+ * Function gatt_build_find_info_rsp
+ *
+ * Description fill the find information response information in the given
+ * buffer.
+ *
+ * Returns true: if data filled sucessfully.
+ * false: packet full, or format mismatch.
+ *
+ ******************************************************************************/
static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SR_REG *p_rcb, BT_HDR *p_msg, uint16_t *p_len,
uint16_t s_hdl, uint16_t e_hdl)
{
@@ -666,14 +666,14 @@
}
/*******************************************************************************
-**
-** Function gatts_internal_read_by_type_req
-**
-** Description check to see if the ReadByType request can be handled internally.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_internal_read_by_type_req
+ *
+ * Description check to see if the ReadByType request can be handled internally.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static tGATT_STATUS gatts_validate_packet_format(uint8_t op_code, uint16_t *p_len,
uint8_t **p_data, tBT_UUID *p_uuid_filter,
uint16_t *p_s_hdl, uint16_t *p_e_hdl)
@@ -729,15 +729,15 @@
}
/*******************************************************************************
-**
-** Function gatts_process_primary_service_req
-**
-** Description process ReadByGroupType/ReadByTypeValue request, for discover
-** all primary services or discover primary service by UUID request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_process_primary_service_req
+ *
+ * Description process ReadByGroupType/ReadByTypeValue request, for discover
+ * all primary services or discover primary service by UUID request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatts_process_primary_service_req(tGATT_TCB *p_tcb, uint8_t op_code, uint16_t len, uint8_t *p_data)
{
uint8_t reason = GATT_INVALID_PDU;
@@ -793,15 +793,15 @@
}
/*******************************************************************************
-**
-** Function gatts_process_find_info
-**
-** Description process find information request, for discover character
-** descriptors.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_process_find_info
+ *
+ * Description process find information request, for discover character
+ * descriptors.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatts_process_find_info(tGATT_TCB *p_tcb, uint8_t op_code, uint16_t len, uint8_t *p_data)
{
uint8_t reason = GATT_INVALID_PDU, *p;
@@ -858,15 +858,15 @@
}
/*******************************************************************************
-**
-** Function gatts_process_mtu_req
-**
-** Description This function is called to process excahnge MTU request.
-** Only used on LE.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_process_mtu_req
+ *
+ * Description This function is called to process excahnge MTU request.
+ * Only used on LE.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatts_process_mtu_req (tGATT_TCB *p_tcb, uint16_t len, uint8_t *p_data)
{
uint16_t mtu = 0;
@@ -923,20 +923,20 @@
}
/*******************************************************************************
-**
-** Function gatts_process_read_by_type_req
-**
-** Description process Read By type request.
-** This PDU can be used to perform:
-** - read characteristic value
-** - read characteristic descriptor value
-** - discover characteristic
-** - discover characteristic by UUID
-** - relationship discovery
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_process_read_by_type_req
+ *
+ * Description process Read By type request.
+ * This PDU can be used to perform:
+ * - read characteristic value
+ * - read characteristic descriptor value
+ * - discover characteristic
+ * - discover characteristic by UUID
+ * - relationship discovery
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatts_process_read_by_type_req(tGATT_TCB *p_tcb, uint8_t op_code, uint16_t len, uint8_t *p_data)
{
tBT_UUID uuid;
@@ -1027,15 +1027,15 @@
}
/*******************************************************************************
-**
-** Function gatts_process_write_req
-**
-** Description This function is called to process the write request
-** from client.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_process_write_req
+ *
+ * Description This function is called to process the write request
+ * from client.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatts_process_write_req (tGATT_TCB *p_tcb, uint8_t i_rcb, uint16_t handle,
uint8_t op_code, uint16_t len, uint8_t *p_data,
bt_gatt_db_attribute_type_t gatt_type)
@@ -1136,15 +1136,15 @@
}
/*******************************************************************************
-**
-** Function gatts_process_read_req
-**
-** Description This function is called to process the read request
-** from client.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_process_read_req
+ *
+ * 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_t op_code,
uint16_t handle,
UNUSED_ATTR uint16_t len, uint8_t *p_data)
@@ -1194,15 +1194,15 @@
}
/*******************************************************************************
-**
-** Function gatts_process_attribute_req
-**
-** Description This function is called to process the per attribute handle request
-** from client.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_process_attribute_req
+ *
+ * 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_t op_code,
uint16_t len, uint8_t *p_data)
{
@@ -1279,14 +1279,14 @@
}
/*******************************************************************************
-**
-** Function gatts_proc_srv_chg_ind_ack
-**
-** Description This function process the service changed indicaiton ACK
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_proc_srv_chg_ind_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;
@@ -1306,15 +1306,15 @@
}
/*******************************************************************************
-**
-** Function gatts_chk_pending_ind
-**
-** Description This function check any pending indication needs to be sent if
-** there is a pending indication then sent the indication
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_chk_pending_ind
+ *
+ * Description This function check any pending indication needs to be sent if
+ * there is a pending indication then sent the indication
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void gatts_chk_pending_ind(tGATT_TCB *p_tcb )
{
GATT_TRACE_DEBUG("%s", __func__);
@@ -1332,15 +1332,15 @@
}
/*******************************************************************************
-**
-** Function gatts_proc_ind_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
-**
-*******************************************************************************/
+ *
+ * Function gatts_proc_ind_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
+ *
+ ******************************************************************************/
static bool gatts_proc_ind_ack(tGATT_TCB *p_tcb, uint16_t ack_handle)
{
bool continue_processing = true;
@@ -1359,14 +1359,14 @@
}
/*******************************************************************************
-**
-** Function gatts_process_value_conf
-**
-** Description This function is called to process the handle value confirmation.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatts_process_value_conf
+ *
+ * Description This function is called to process the handle value confirmation.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatts_process_value_conf(tGATT_TCB *p_tcb, uint8_t op_code)
{
uint16_t handle = p_tcb->indicate_handle;
@@ -1403,16 +1403,16 @@
}
/*******************************************************************************
-**
-** Function gatt_server_handle_client_req
-**
-** Description This function is called to handle the client requests to
-** server.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_server_handle_client_req
+ *
+ * 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_t op_code,
uint16_t len, uint8_t *p_data)
{
diff --git a/stack/gatt/gatt_utils.cc b/stack/gatt/gatt_utils.cc
index 0c2fba9..be49921 100644
--- a/stack/gatt/gatt_utils.cc
+++ b/stack/gatt/gatt_utils.cc
@@ -82,14 +82,14 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*******************************************************************************
-**
-** Function gatt_free_pending_ind
-**
-** Description Free all pending indications
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_free_pending_ind
+ *
+ * Description Free all pending indications
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_free_pending_ind(tGATT_TCB *p_tcb)
{
GATT_TRACE_DEBUG("%s", __func__);
@@ -105,14 +105,14 @@
}
/*******************************************************************************
-**
-** Function gatt_free_pending_enc_queue
-**
-** Description Free all buffers in pending encyption queue
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_free_pending_enc_queue
+ *
+ * Description Free all buffers in pending encyption queue
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_free_pending_enc_queue(tGATT_TCB *p_tcb)
{
GATT_TRACE_DEBUG("%s", __func__);
@@ -128,14 +128,14 @@
}
/*******************************************************************************
-**
-** Function gatt_delete_dev_from_srv_chg_clt_list
-**
-** Description Delete a device from the service changed client lit
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_delete_dev_from_srv_chg_clt_list
+ *
+ * Description Delete a device from the service changed client lit
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_delete_dev_from_srv_chg_clt_list(BD_ADDR bd_addr)
{
GATT_TRACE_DEBUG("gatt_delete_dev_from_srv_chg_clt_list");
@@ -156,14 +156,14 @@
}
/*******************************************************************************
-**
-** Function gatt_set_srv_chg
-**
-** Description Set the service changed flag to true
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_set_srv_chg
+ *
+ * Description Set the service changed flag to true
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_set_srv_chg(void)
{
GATT_TRACE_DEBUG ("gatt_set_srv_chg");
@@ -190,14 +190,14 @@
}
/*******************************************************************************
-**
-** Function gatt_add_pending_ind
-**
-** Description Add a pending indication
-**
-** Returns Pointer to the current pending indication buffer, NULL no buffer available
-**
-*******************************************************************************/
+ *
+ * Function gatt_add_pending_ind
+ *
+ * Description Add a pending indication
+ *
+ * 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 = (tGATT_VALUE *)osi_malloc(sizeof(tGATT_VALUE));
@@ -212,14 +212,14 @@
}
/*******************************************************************************
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * 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
+ *
+ ******************************************************************************/
tGATTS_SRV_CHG *gatt_add_srv_chg_clt(tGATTS_SRV_CHG *p_srv_chg)
{
tGATTS_SRV_CHG *p_buf = (tGATTS_SRV_CHG *)osi_malloc(sizeof(tGATTS_SRV_CHG));
@@ -234,14 +234,14 @@
}
/*******************************************************************************
-**
-** Function gatt_alloc_hdl_buffer
-**
-** Description Allocate a handle buufer
-**
-** Returns Pointer to the allocated buffer, NULL no buffer available
-**
-*******************************************************************************/
+ *
+ * Function gatt_alloc_hdl_buffer
+ *
+ * Description Allocate a handle buufer
+ *
+ * Returns Pointer to the allocated buffer, NULL no buffer available
+ *
+ ******************************************************************************/
tGATT_HDL_LIST_ELEM *gatt_alloc_hdl_buffer(void)
{
uint8_t i;
@@ -263,14 +263,14 @@
}
/*******************************************************************************
-**
-** Function gatt_find_hdl_buffer_by_handle
-**
-** Description Find handle range buffer by service handle.
-**
-** Returns Pointer to the buffer, NULL no buffer available
-**
-*******************************************************************************/
+ *
+ * Function gatt_find_hdl_buffer_by_handle
+ *
+ * Description Find handle range buffer by service handle.
+ *
+ * Returns Pointer to the buffer, NULL no buffer available
+ *
+ ******************************************************************************/
tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_handle(uint16_t handle)
{
tGATT_HDL_LIST_INFO *p_list_info= &gatt_cb.hdl_list_info;
@@ -289,14 +289,14 @@
return NULL;
}
/*******************************************************************************
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * 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
+ *
+ ******************************************************************************/
tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_app_id (tBT_UUID *p_app_uuid128,
tBT_UUID *p_svc_uuid,
uint16_t start_handle)
@@ -320,14 +320,14 @@
return NULL;
}
/*******************************************************************************
-**
-** Function gatt_free_hdl_buffer
-**
-** Description free a handle buffer
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_free_hdl_buffer
+ *
+ * Description free a handle buffer
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_free_hdl_buffer(tGATT_HDL_LIST_ELEM *p)
{
@@ -340,15 +340,15 @@
}
}
/*******************************************************************************
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * 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
+ *
+ ******************************************************************************/
void gatt_free_srvc_db_buffer_app_id(tBT_UUID *p_app_id)
{
tGATT_HDL_LIST_ELEM *p_elem = &gatt_cb.hdl_list[0];
@@ -369,14 +369,14 @@
}
}
/*******************************************************************************
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * 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
+ *
+ ******************************************************************************/
bool gatt_is_last_attribute(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_start, tBT_UUID value)
{
tGATT_SRV_LIST_ELEM *p_srv= p_start->p_next;
@@ -406,14 +406,14 @@
}
/*******************************************************************************
-**
-** Function gatt_update_last_pri_srv_info
-**
-** Description Update the the last primary info for the service list info
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_update_last_pri_srv_info
+ *
+ * Description Update the the last primary info for the service list info
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_update_last_pri_srv_info(tGATT_SRV_LIST_INFO *p_list)
{
tGATT_SRV_LIST_ELEM *p_srv= p_list->p_first;
@@ -431,14 +431,14 @@
}
/*******************************************************************************
-**
-** Function gatts_update_srv_list_elem
-**
-** Description update an element in the service list.
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function gatts_update_srv_list_elem
+ *
+ * Description update an element in the service list.
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
void gatts_update_srv_list_elem(uint8_t i_sreg,
UNUSED_ATTR uint16_t handle, bool is_primary)
{
@@ -450,15 +450,15 @@
return;
}
/*******************************************************************************
-**
-** Function gatt_add_a_srv_to_list
-**
-** Description add an service to the list in ascending
-** order of the start handle
-**
-** Returns bool true-if add is successful
-**
-*******************************************************************************/
+ *
+ * Function gatt_add_a_srv_to_list
+ *
+ * Description add an service to the list in ascending
+ * order of the start handle
+ *
+ * Returns bool true-if add is successful
+ *
+ ******************************************************************************/
bool gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_new)
{
tGATT_SRV_LIST_ELEM *p_old;
@@ -517,14 +517,14 @@
}
/*******************************************************************************
-**
-** Function gatt_remove_a_srv_from_list
-**
-** Description Remove a service from the list
-**
-** Returns bool true-if remove is successful
-**
-*******************************************************************************/
+ *
+ * Function gatt_remove_a_srv_from_list
+ *
+ * Description Remove a service from the list
+ *
+ * Returns bool true-if remove is successful
+ *
+ ******************************************************************************/
bool gatt_remove_a_srv_from_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_remove)
{
if (!p_remove || !p_list->p_first)
@@ -556,15 +556,15 @@
}
/*******************************************************************************
-**
-** Function gatt_add_an_item_to_list
-**
-** Description add an service handle range to the list in decending
-** order of the start handle
-**
-** Returns bool true-if add is successful
-**
-*******************************************************************************/
+ *
+ * Function gatt_add_an_item_to_list
+ *
+ * Description add an service handle range to the list in decending
+ * order of the start handle
+ *
+ * Returns bool true-if add is successful
+ *
+ ******************************************************************************/
bool gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELEM *p_new)
{
tGATT_HDL_LIST_ELEM *p_old;
@@ -621,14 +621,14 @@
}
/*******************************************************************************
-**
-** Function gatt_remove_an_item_from_list
-**
-** Description Remove an service handle range from the list
-**
-** Returns bool true-if remove is successful
-**
-*******************************************************************************/
+ *
+ * Function gatt_remove_an_item_from_list
+ *
+ * Description Remove an service handle range from the list
+ *
+ * Returns bool true-if remove is successful
+ *
+ ******************************************************************************/
bool gatt_remove_an_item_from_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELEM *p_remove)
{
if (!p_remove || !p_list->p_first)
@@ -659,14 +659,14 @@
}
/*******************************************************************************
-**
-** Function gatt_find_the_connected_bda
-**
-** Description This function find the connected bda
-**
-** Returns true if found
-**
-*******************************************************************************/
+ *
+ * Function gatt_find_the_connected_bda
+ *
+ * Description This function find the connected bda
+ *
+ * Returns true if found
+ *
+ ******************************************************************************/
bool gatt_find_the_connected_bda(uint8_t start_idx, BD_ADDR bda, uint8_t *p_found_idx,
tBT_TRANSPORT *p_transport)
{
@@ -694,15 +694,15 @@
/*******************************************************************************
-**
-** Function gatt_is_srv_chg_ind_pending
-**
-** Description Check whether a service chnaged is in the indication pending queue
-** or waiting for an Ack already
-**
-** Returns bool
-**
-*******************************************************************************/
+ *
+ * Function gatt_is_srv_chg_ind_pending
+ *
+ * Description Check whether a service chnaged is in the indication pending queue
+ * or waiting for an Ack already
+ *
+ * Returns bool
+ *
+ ******************************************************************************/
bool gatt_is_srv_chg_ind_pending (tGATT_TCB *p_tcb)
{
bool srv_chg_ind_pending = false;
@@ -735,14 +735,14 @@
/*******************************************************************************
-**
-** Function gatt_is_bda_in_the_srv_chg_clt_list
-**
-** Description This function check the specified bda is in the srv chg clinet list or not
-**
-** Returns pointer to the found elemenet otherwise NULL
-**
-*******************************************************************************/
+ *
+ * Function gatt_is_bda_in_the_srv_chg_clt_list
+ *
+ * Description This function check the specified bda is in the srv chg clinet list or not
+ *
+ * Returns pointer to the found elemenet otherwise NULL
+ *
+ ******************************************************************************/
tGATTS_SRV_CHG *gatt_is_bda_in_the_srv_chg_clt_list (BD_ADDR bda)
{
tGATTS_SRV_CHG *p_buf = NULL;
@@ -769,14 +769,14 @@
/*******************************************************************************
-**
-** Function gatt_is_bda_connected
-**
-** Description
-**
-** Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
-**
-*******************************************************************************/
+ *
+ * Function gatt_is_bda_connected
+ *
+ * Description
+ *
+ * Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
+ *
+ ******************************************************************************/
bool gatt_is_bda_connected(BD_ADDR bda)
{
uint8_t i = 0;
@@ -795,14 +795,14 @@
}
/*******************************************************************************
-**
-** Function gatt_find_i_tcb_by_addr
-**
-** Description The function searches for an empty tcb entry, and return the index.
-**
-** Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
-**
-*******************************************************************************/
+ *
+ * Function gatt_find_i_tcb_by_addr
+ *
+ * Description The function searches for an empty tcb entry, and return the index.
+ *
+ * Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
+ *
+ ******************************************************************************/
uint8_t gatt_find_i_tcb_by_addr(BD_ADDR bda, tBT_TRANSPORT transport)
{
uint8_t i = 0;
@@ -820,14 +820,14 @@
/*******************************************************************************
-**
-** Function gatt_get_tcb_by_idx
-**
-** Description The function get TCB using the TCB index
-**
-** Returns NULL if not found. Otherwise index to the tcb.
-**
-*******************************************************************************/
+ *
+ * Function gatt_get_tcb_by_idx
+ *
+ * Description The function get TCB using the TCB index
+ *
+ * Returns NULL if not found. Otherwise index to the tcb.
+ *
+ ******************************************************************************/
tGATT_TCB * gatt_get_tcb_by_idx(uint8_t tcb_idx)
{
tGATT_TCB *p_tcb = NULL;
@@ -839,14 +839,14 @@
}
/*******************************************************************************
-**
-** Function gatt_find_tcb_by_addr
-**
-** Description The function searches for an empty tcb entry, and return pointer.
-**
-** Returns NULL if not found. Otherwise index to the tcb.
-**
-*******************************************************************************/
+ *
+ * Function gatt_find_tcb_by_addr
+ *
+ * Description The function searches for an empty tcb entry, and return pointer.
+ *
+ * Returns NULL if not found. Otherwise index to the tcb.
+ *
+ ******************************************************************************/
tGATT_TCB * gatt_find_tcb_by_addr(BD_ADDR bda, tBT_TRANSPORT transport)
{
tGATT_TCB *p_tcb = NULL;
@@ -859,14 +859,14 @@
return p_tcb;
}
/*******************************************************************************
-**
-** Function gatt_find_i_tcb_free
-**
-** Description The function searches for an empty tcb entry, and return the index.
-**
-** Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
-**
-*******************************************************************************/
+ *
+ * Function gatt_find_i_tcb_free
+ *
+ * Description The function searches for an empty tcb entry, and return the index.
+ *
+ * Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
+ *
+ ******************************************************************************/
uint8_t gatt_find_i_tcb_free(void)
{
uint8_t i = 0, j = GATT_INDEX_INVALID;
@@ -882,14 +882,14 @@
return j;
}
/*******************************************************************************
-**
-** Function gatt_allocate_tcb_by_bdaddr
-**
-** Description The function locate or allocate new tcb entry for matching bda.
-**
-** Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
-**
-*******************************************************************************/
+ *
+ * Function gatt_allocate_tcb_by_bdaddr
+ *
+ * Description The function locate or allocate new tcb entry for matching bda.
+ *
+ * Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
+ *
+ ******************************************************************************/
tGATT_TCB * gatt_allocate_tcb_by_bdaddr(BD_ADDR bda, tBT_TRANSPORT transport)
{
uint8_t i = 0;
@@ -925,14 +925,14 @@
}
/*******************************************************************************
-**
-** Function gatt_convert_uuid16_to_uuid128
-**
-** Description Convert a 16 bits UUID to be an standard 128 bits one.
-**
-** Returns true if two uuid match; false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function gatt_convert_uuid16_to_uuid128
+ *
+ * Description Convert a 16 bits UUID to be an standard 128 bits one.
+ *
+ * Returns true if two uuid match; false otherwise.
+ *
+ ******************************************************************************/
void gatt_convert_uuid16_to_uuid128(uint8_t uuid_128[LEN_UUID_128], uint16_t uuid_16)
{
uint8_t *p = &uuid_128[LEN_UUID_128 - 4];
@@ -943,14 +943,14 @@
}
/*******************************************************************************
-**
-** Function gatt_convert_uuid32_to_uuid128
-**
-** Description Convert a 32 bits UUID to be an standard 128 bits one.
-**
-** Returns true if two uuid match; false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function gatt_convert_uuid32_to_uuid128
+ *
+ * Description Convert a 32 bits UUID to be an standard 128 bits one.
+ *
+ * Returns true if two uuid match; false otherwise.
+ *
+ ******************************************************************************/
void gatt_convert_uuid32_to_uuid128(uint8_t uuid_128[LEN_UUID_128], uint32_t uuid_32)
{
uint8_t *p = &uuid_128[LEN_UUID_128 - 4];
@@ -960,14 +960,14 @@
UINT32_TO_STREAM(p, uuid_32);
}
/*******************************************************************************
-**
-** Function gatt_uuid_compare
-**
-** Description Compare two UUID to see if they are the same.
-**
-** Returns true if two uuid match; false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function gatt_uuid_compare
+ *
+ * Description Compare two UUID to see if they are the same.
+ *
+ * Returns true if two uuid match; false otherwise.
+ *
+ ******************************************************************************/
bool gatt_uuid_compare (tBT_UUID src, tBT_UUID tar)
{
uint8_t su[LEN_UUID_128], tu[LEN_UUID_128];
@@ -1025,14 +1025,14 @@
}
/*******************************************************************************
-**
-** Function gatt_build_uuid_to_stream
-**
-** Description Add UUID into stream.
-**
-** Returns UUID length.
-**
-*******************************************************************************/
+ *
+ * Function gatt_build_uuid_to_stream
+ *
+ * Description Add UUID into stream.
+ *
+ * Returns UUID length.
+ *
+ ******************************************************************************/
uint8_t gatt_build_uuid_to_stream(uint8_t **p_dst, tBT_UUID uuid)
{
uint8_t *p = *p_dst;
@@ -1060,14 +1060,14 @@
}
/*******************************************************************************
-**
-** Function gatt_parse_uuid_from_cmd
-**
-** Description Convert a 128 bits UUID into a 16 bits UUID.
-**
-** Returns true if command sent, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function gatt_parse_uuid_from_cmd
+ *
+ * Description Convert a 128 bits UUID into a 16 bits UUID.
+ *
+ * Returns true if command sent, otherwise false.
+ *
+ ******************************************************************************/
bool gatt_parse_uuid_from_cmd(tBT_UUID *p_uuid_rec, uint16_t uuid_size, uint8_t **p_data)
{
bool is_base_uuid, ret = true;
@@ -1133,14 +1133,14 @@
}
/*******************************************************************************
-**
-** Function gatt_start_rsp_timer
-**
-** Description Start a wait_for_response timer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_start_rsp_timer
+ *
+ * Description Start a wait_for_response timer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_start_rsp_timer(uint16_t clcb_idx)
{
tGATT_CLCB *p_clcb = &gatt_cb.clcb[clcb_idx];
@@ -1161,14 +1161,14 @@
}
/*******************************************************************************
-**
-** Function gatt_start_conf_timer
-**
-** Description Start a wait_for_confirmation timer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_start_conf_timer
+ *
+ * Description Start a wait_for_confirmation timer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_start_conf_timer(tGATT_TCB *p_tcb)
{
alarm_set_on_queue(p_tcb->conf_timer, GATT_WAIT_FOR_RSP_TIMEOUT_MS,
@@ -1177,14 +1177,14 @@
}
/*******************************************************************************
-**
-** Function gatt_start_ind_ack_timer
-**
-** Description start the application ack timer
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_start_ind_ack_timer
+ *
+ * Description start the application ack timer
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_start_ind_ack_timer(tGATT_TCB *p_tcb)
{
/* start notification cache timer */
@@ -1193,14 +1193,14 @@
}
/*******************************************************************************
-**
-** Function gatt_rsp_timeout
-**
-** Description Called when GATT wait for ATT command response timer expires
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_rsp_timeout
+ *
+ * Description Called when GATT wait for ATT command response timer expires
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_rsp_timeout(void *data)
{
tGATT_CLCB *p_clcb = (tGATT_CLCB *)data;
@@ -1234,14 +1234,14 @@
}
/*******************************************************************************
-**
-** Function gatt_indication_confirmation_timeout
-**
-** Description Called when the indication confirmation timer expires
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_indication_confirmation_timeout
+ *
+ * Description Called when the indication confirmation timer expires
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_indication_confirmation_timeout(void *data)
{
tGATT_TCB *p_tcb = (tGATT_TCB *)data;
@@ -1251,14 +1251,14 @@
}
/*******************************************************************************
-**
-** Function gatt_ind_ack_timeout
-**
-** Description Called when GATT wait for ATT handle confirmation timeout
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_ind_ack_timeout
+ *
+ * Description Called when GATT wait for ATT handle confirmation timeout
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_ind_ack_timeout(void *data)
{
tGATT_TCB *p_tcb = (tGATT_TCB *)data;
@@ -1271,14 +1271,14 @@
attp_send_cl_msg(p_tcb, 0, GATT_HANDLE_VALUE_CONF, NULL);
}
/*******************************************************************************
-**
-** Function gatt_sr_find_i_rcb_by_handle
-**
-** Description The function searches for a service that owns a specific handle.
-**
-** Returns GATT_MAX_SR_PROFILES if not found. Otherwise index of th eservice.
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_find_i_rcb_by_handle
+ *
+ * Description The function searches for a service that owns a specific handle.
+ *
+ * Returns GATT_MAX_SR_PROFILES if not found. Otherwise index of th eservice.
+ *
+ ******************************************************************************/
uint8_t gatt_sr_find_i_rcb_by_handle(uint16_t handle)
{
uint8_t i_rcb = 0;
@@ -1296,14 +1296,14 @@
}
/*******************************************************************************
-**
-** Function gatt_sr_find_i_rcb_by_handle
-**
-** Description The function searches for a service that owns a specific handle.
-**
-** Returns 0 if not found. Otherwise index of th eservice.
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_find_i_rcb_by_handle
+ *
+ * Description The function searches for a service that owns a specific handle.
+ *
+ * Returns 0 if not found. Otherwise index of th eservice.
+ *
+ ******************************************************************************/
uint8_t gatt_sr_find_i_rcb_by_app_id(tBT_UUID *p_app_uuid128, tBT_UUID *p_svc_uuid, uint16_t start_handle)
{
uint8_t i_rcb = 0;
@@ -1331,14 +1331,14 @@
return i_rcb;
}
/*******************************************************************************
-**
-** Function gatt_sr_find_i_rcb_by_handle
-**
-** Description The function searches for a service that owns a specific handle.
-**
-** Returns 0 if not found. Otherwise index of th eservice.
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_find_i_rcb_by_handle
+ *
+ * Description The function searches for a service that owns a specific handle.
+ *
+ * Returns 0 if not found. Otherwise index of th eservice.
+ *
+ ******************************************************************************/
uint8_t gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list )
{
uint8_t ii = 0;
@@ -1368,15 +1368,15 @@
return ii;
}
/*******************************************************************************
-**
-** Function gatt_sr_get_sec_info
-**
-** Description Get the security flag and key size information for the peer
-** device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_get_sec_info
+ *
+ * Description Get the security flag and key size information for the peer
+ * device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_sr_get_sec_info(BD_ADDR rem_bda, tBT_TRANSPORT transport, uint8_t *p_sec_flag, uint8_t *p_key_size)
{
uint8_t sec_flag = 0;
@@ -1389,15 +1389,15 @@
*p_sec_flag = sec_flag;
}
/*******************************************************************************
-**
-** Function gatt_sr_send_req_callback
-**
-** Description
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_send_req_callback
+ *
+ * Description
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_sr_send_req_callback(uint16_t conn_id,
uint32_t trans_id,
tGATTS_REQ_TYPE type, tGATTS_DATA *p_data)
@@ -1424,14 +1424,14 @@
}
/*******************************************************************************
-**
-** Function gatt_send_error_rsp
-**
-** Description This function sends an error response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_send_error_rsp
+ *
+ * Description This function sends an error response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tGATT_STATUS gatt_send_error_rsp (tGATT_TCB *p_tcb, uint8_t err_code, uint8_t op_code,
uint16_t handle, bool deq)
{
@@ -1459,14 +1459,14 @@
/*******************************************************************************
-**
-** Function gatt_add_sdp_record
-**
-** Description This function add a SDP record for a GATT primary service
-**
-** Returns 0 if error else sdp handle for the record.
-**
-*******************************************************************************/
+ *
+ * Function gatt_add_sdp_record
+ *
+ * Description This function add a SDP record for a GATT primary service
+ *
+ * Returns 0 if error else sdp handle for the record.
+ *
+ ******************************************************************************/
uint32_t gatt_add_sdp_record (tBT_UUID *p_uuid, uint16_t start_hdl, uint16_t end_hdl)
{
tSDP_PROTOCOL_ELEM proto_elem_list[2];
@@ -1528,14 +1528,14 @@
#if GATT_CONFORMANCE_TESTING == true
/*******************************************************************************
-**
-** Function gatt_set_err_rsp
-**
-** Description This function is called to set the test confirm value
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function gatt_set_err_rsp
+ *
+ * Description This function is called to set the test confirm value
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void gatt_set_err_rsp(bool enable, uint8_t req_op_code, uint8_t err_status)
{
GATT_TRACE_DEBUG("gatt_set_err_rsp enable=%d op_code=%d, err_status=%d", enable, req_op_code, err_status);
@@ -1548,14 +1548,14 @@
/*******************************************************************************
-**
-** Function gatt_get_regcb
-**
-** Description The function returns the registration control block.
-**
-** Returns pointer to the registration control block or NULL
-**
-*******************************************************************************/
+ *
+ * Function gatt_get_regcb
+ *
+ * Description The function returns the registration control block.
+ *
+ * Returns pointer to the registration control block or NULL
+ *
+ ******************************************************************************/
tGATT_REG *gatt_get_regcb (tGATT_IF gatt_if)
{
uint8_t ii = (uint8_t)gatt_if;
@@ -1579,14 +1579,14 @@
/*******************************************************************************
-**
-** Function gatt_is_clcb_allocated
-**
-** Description The function check clcb for conn_id is allocated or not
-**
-** Returns True already allocated
-**
-*******************************************************************************/
+ *
+ * Function gatt_is_clcb_allocated
+ *
+ * Description The function check clcb for conn_id is allocated or not
+ *
+ * Returns True already allocated
+ *
+ ******************************************************************************/
bool gatt_is_clcb_allocated (uint16_t conn_id)
{
@@ -1606,14 +1606,14 @@
}
/*******************************************************************************
-**
-** Function gatt_clcb_alloc
-**
-** Description The function allocates a GATT connection link control block
-**
-** Returns NULL if not found. Otherwise pointer to the connection link block.
-**
-*******************************************************************************/
+ *
+ * Function gatt_clcb_alloc
+ *
+ * Description The function allocates a GATT connection link control block
+ *
+ * Returns NULL if not found. Otherwise pointer to the connection link block.
+ *
+ ******************************************************************************/
tGATT_CLCB *gatt_clcb_alloc (uint16_t conn_id)
{
uint8_t i = 0;
@@ -1641,14 +1641,14 @@
}
/*******************************************************************************
-**
-** Function gatt_clcb_dealloc
-**
-** Description The function de allocates a GATT connection link control block
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_clcb_dealloc
+ *
+ * Description The function de allocates a GATT connection link control block
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_clcb_dealloc (tGATT_CLCB *p_clcb)
{
if (p_clcb && p_clcb->in_use)
@@ -1661,15 +1661,15 @@
/*******************************************************************************
-**
-** Function gatt_find_tcb_by_cid
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function gatt_find_tcb_by_cid
+ *
+ * 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.
+ *
+ ******************************************************************************/
tGATT_TCB * gatt_find_tcb_by_cid (uint16_t lcid)
{
uint16_t xx = 0;
@@ -1688,14 +1688,14 @@
/*******************************************************************************
-**
-** Function gatt_num_apps_hold_link
-**
-** Description The function find the number of applcaitions is holding the link
-**
-** Returns total number of applications holding this acl link.
-**
-*******************************************************************************/
+ *
+ * Function gatt_num_apps_hold_link
+ *
+ * Description The function find the number of applcaitions is holding the link
+ *
+ * Returns total number of applications holding this acl link.
+ *
+ ******************************************************************************/
uint8_t gatt_num_apps_hold_link(tGATT_TCB *p_tcb)
{
uint8_t i, num = 0;
@@ -1712,14 +1712,14 @@
/*******************************************************************************
-**
-** Function gatt_num_clcb_by_bd_addr
-**
-** Description The function searches all LCB with macthing bd address
-**
-** Returns total number of clcb found.
-**
-*******************************************************************************/
+ *
+ * Function gatt_num_clcb_by_bd_addr
+ *
+ * Description The function searches all LCB with macthing bd address
+ *
+ * Returns total number of clcb found.
+ *
+ ******************************************************************************/
uint8_t gatt_num_clcb_by_bd_addr(BD_ADDR bda)
{
uint8_t i, num = 0;
@@ -1733,14 +1733,14 @@
}
/*******************************************************************************
-**
-** Function gatt_sr_update_cback_cnt
-**
-** Description The function searches all LCB with macthing bd address
-**
-** Returns total number of clcb found.
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_update_cback_cnt
+ *
+ * Description The function searches all LCB with macthing bd address
+ *
+ * Returns total number of clcb found.
+ *
+ ******************************************************************************/
void gatt_sr_copy_prep_cnt_to_cback_cnt(tGATT_TCB *p_tcb )
{
uint8_t i;
@@ -1759,14 +1759,14 @@
}
/*******************************************************************************
-**
-** Function gatt_sr_is_cback_cnt_zero
-**
-** Description The function searches all LCB with macthing bd address
-**
-** Returns True if thetotal application callback count is zero
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_is_cback_cnt_zero
+ *
+ * Description The function searches all LCB with macthing bd address
+ *
+ * Returns True if thetotal application callback count is zero
+ *
+ ******************************************************************************/
bool gatt_sr_is_cback_cnt_zero(tGATT_TCB *p_tcb )
{
bool status = true;
@@ -1791,14 +1791,14 @@
}
/*******************************************************************************
-**
-** Function gatt_sr_is_prep_cnt_zero
-**
-** Description Check the prepare write request count is zero or not
-**
-** Returns True no prepare write request
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_is_prep_cnt_zero
+ *
+ * Description Check the prepare write request count is zero or not
+ *
+ * Returns True no prepare write request
+ *
+ ******************************************************************************/
bool gatt_sr_is_prep_cnt_zero(tGATT_TCB *p_tcb)
{
bool status = true;
@@ -1824,14 +1824,14 @@
/*******************************************************************************
-**
-** Function gatt_sr_reset_cback_cnt
-**
-** Description Reset the application callback count to zero
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_reset_cback_cnt
+ *
+ * Description Reset the application callback count to zero
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_sr_reset_cback_cnt(tGATT_TCB *p_tcb )
{
uint8_t i;
@@ -1846,14 +1846,14 @@
}
/*******************************************************************************
-**
-** Function gatt_sr_reset_prep_cnt
-**
-** Description Reset the prep write count to zero
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_reset_prep_cnt
+ *
+ * Description Reset the prep write count to zero
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_sr_reset_prep_cnt(tGATT_TCB *p_tcb )
{
uint8_t i;
@@ -1868,14 +1868,14 @@
/*******************************************************************************
-**
-** Function gatt_sr_update_cback_cnt
-**
-** Description Update the teh applicaiton callback count
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_update_cback_cnt
+ *
+ * Description Update the teh applicaiton callback count
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_sr_update_cback_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, bool is_inc, bool is_reset_first)
{
@@ -1903,14 +1903,14 @@
/*******************************************************************************
-**
-** Function gatt_sr_update_prep_cnt
-**
-** Description Update the teh prepare write request count
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_sr_update_prep_cnt
+ *
+ * Description Update the teh prepare write request count
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_sr_update_prep_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, bool is_inc, bool is_reset_first)
{
uint8_t idx = ((uint8_t) gatt_if) - 1 ;
@@ -1938,14 +1938,14 @@
}
}
/*******************************************************************************
-**
-** Function gatt_cancel_open
-**
-** Description Cancel open request
-**
-** Returns Boolean
-**
-*******************************************************************************/
+ *
+ * Function gatt_cancel_open
+ *
+ * Description Cancel open request
+ *
+ * Returns Boolean
+ *
+ ******************************************************************************/
bool gatt_cancel_open(tGATT_IF gatt_if, BD_ADDR bda)
{
tGATT_TCB *p_tcb=NULL;
@@ -1974,14 +1974,14 @@
}
/*******************************************************************************
-**
-** Function gatt_find_app_hold_link
-**
-** Description find the applicaiton that is holding the specified link
-**
-** Returns Boolean
-**
-*******************************************************************************/
+ *
+ * Function gatt_find_app_hold_link
+ *
+ * Description find the applicaiton that is holding the specified link
+ *
+ * Returns Boolean
+ *
+ ******************************************************************************/
bool gatt_find_app_hold_link(tGATT_TCB *p_tcb, uint8_t start_idx, uint8_t *p_found_idx, tGATT_IF *p_gatt_if)
{
uint8_t i;
@@ -2001,14 +2001,14 @@
}
/*******************************************************************************
-**
-** Function gatt_cmd_enq
-**
-** Description Enqueue this command.
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function gatt_cmd_enq
+ *
+ * Description Enqueue this command.
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
bool gatt_cmd_enq(tGATT_TCB *p_tcb, uint16_t clcb_idx, bool to_send, uint8_t op_code, BT_HDR *p_buf)
{
tGATT_CMD_Q *p_cmd = &p_tcb->cl_cmd_q[p_tcb->next_slot_inq];
@@ -2030,14 +2030,14 @@
}
/*******************************************************************************
-**
-** Function gatt_cmd_dequeue
-**
-** Description dequeue the command in the client CCB command queue.
-**
-** Returns total number of clcb found.
-**
-*******************************************************************************/
+ *
+ * Function gatt_cmd_dequeue
+ *
+ * Description dequeue the command in the client CCB command queue.
+ *
+ * Returns total number of clcb found.
+ *
+ ******************************************************************************/
tGATT_CLCB * gatt_cmd_dequeue(tGATT_TCB *p_tcb, uint8_t *p_op_code)
{
tGATT_CMD_Q *p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
@@ -2057,14 +2057,14 @@
}
/*******************************************************************************
-**
-** Function gatt_send_write_msg
-**
-** Description This real function send out the ATT message for write.
-**
-** Returns status code
-**
-*******************************************************************************/
+ *
+ * Function gatt_send_write_msg
+ *
+ * Description This real function send out the ATT message for write.
+ *
+ * Returns status code
+ *
+ ******************************************************************************/
uint8_t gatt_send_write_msg (tGATT_TCB *p_tcb, uint16_t clcb_idx, uint8_t op_code,
uint16_t handle, uint16_t len,
uint16_t offset, uint8_t *p_data)
@@ -2082,15 +2082,15 @@
}
/*******************************************************************************
-**
-** Function gatt_act_send_browse
-**
-** Description This function ends a browse command request, including read
-** information request and read by type request.
-**
-** Returns status code
-**
-*******************************************************************************/
+ *
+ * Function gatt_act_send_browse
+ *
+ * Description This function ends a browse command request, including read
+ * information request and read by type request.
+ *
+ * Returns status code
+ *
+ ******************************************************************************/
uint8_t gatt_act_send_browse(tGATT_TCB *p_tcb, uint16_t index, uint8_t op, uint16_t s_handle,
uint16_t e_handle, tBT_UUID uuid)
{
@@ -2105,15 +2105,15 @@
}
/*******************************************************************************
-**
-** Function gatt_end_operation
-**
-** Description This function ends a discovery, send callback and finalize
-** some control value.
-**
-** Returns 16 bits uuid.
-**
-*******************************************************************************/
+ *
+ * Function gatt_end_operation
+ *
+ * Description This function ends a discovery, send callback and finalize
+ * some control value.
+ *
+ * Returns 16 bits uuid.
+ *
+ ******************************************************************************/
void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data)
{
tGATT_CL_COMPLETE cb_data;
@@ -2183,15 +2183,15 @@
}
/*******************************************************************************
-**
-** Function gatt_cleanup_upon_disc
-**
-** Description This function cleans up the control blocks when L2CAP channel
-** disconnect.
-**
-** Returns 16 bits uuid.
-**
-*******************************************************************************/
+ *
+ * Function gatt_cleanup_upon_disc
+ *
+ * Description This function cleans up the control blocks when L2CAP channel
+ * disconnect.
+ *
+ * Returns 16 bits uuid.
+ *
+ ******************************************************************************/
void gatt_cleanup_upon_disc(BD_ADDR bda, uint16_t reason, tBT_TRANSPORT transport)
{
tGATT_TCB *p_tcb = NULL;
@@ -2248,14 +2248,14 @@
GATT_TRACE_DEBUG ("exit gatt_cleanup_upon_disc ");
}
/*******************************************************************************
-**
-** Function gatt_dbg_req_op_name
-**
-** Description Get op code description name, for debug information.
-**
-** Returns uint8_t *: name of the operation.
-**
-*******************************************************************************/
+ *
+ * Function gatt_dbg_req_op_name
+ *
+ * Description Get op code description name, for debug information.
+ *
+ * Returns uint8_t *: name of the operation.
+ *
+ ******************************************************************************/
uint8_t * gatt_dbg_op_name(uint8_t op_code)
{
uint8_t pseduo_op_code_idx = op_code & (~GATT_WRITE_CMD_MASK);
@@ -2278,14 +2278,14 @@
}
/*******************************************************************************
-**
-** Function gatt_dbg_display_uuid
-**
-** Description Disaplay the UUID
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function gatt_dbg_display_uuid
+ *
+ * Description Disaplay the UUID
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void gatt_dbg_display_uuid(tBT_UUID bt_uuid)
{
char str_buf[50];
@@ -2321,14 +2321,14 @@
/*******************************************************************************
-**
-** Function gatt_is_bg_dev_for_app
-**
-** Description find is this one of the background devices for the application
-**
-** Returns true this is one of the background devices for the application
-**
-*******************************************************************************/
+ *
+ * Function gatt_is_bg_dev_for_app
+ *
+ * Description find is this one of the background devices for the application
+ *
+ * Returns true this is one of the background devices for the application
+ *
+ ******************************************************************************/
bool gatt_is_bg_dev_for_app(tGATT_BG_CONN_DEV *p_dev, tGATT_IF gatt_if)
{
uint8_t i;
@@ -2343,14 +2343,14 @@
return false;
}
/*******************************************************************************
-**
-** Function gatt_find_bg_dev
-**
-** Description find background connection device from the list.
-**
-** Returns pointer to the device record
-**
-*******************************************************************************/
+ *
+ * Function gatt_find_bg_dev
+ *
+ * Description find background connection device from the list.
+ *
+ * Returns pointer to the device record
+ *
+ ******************************************************************************/
tGATT_BG_CONN_DEV * gatt_find_bg_dev(BD_ADDR remote_bda)
{
tGATT_BG_CONN_DEV *p_dev_list = &gatt_cb.bgconn_dev[0];
@@ -2366,14 +2366,14 @@
return NULL;
}
/*******************************************************************************
-**
-** Function gatt_alloc_bg_dev
-**
-** Description allocate a background connection device record
-**
-** Returns pointer to the device record
-**
-*******************************************************************************/
+ *
+ * Function gatt_alloc_bg_dev
+ *
+ * Description allocate a background connection device record
+ *
+ * Returns pointer to the device record
+ *
+ ******************************************************************************/
tGATT_BG_CONN_DEV * gatt_alloc_bg_dev(BD_ADDR remote_bda)
{
tGATT_BG_CONN_DEV *p_dev_list = &gatt_cb.bgconn_dev[0];
@@ -2393,14 +2393,14 @@
}
/*******************************************************************************
-**
-** Function gatt_add_bg_dev_list
-**
-** Description add/remove device from the back ground connection device list
-**
-** Returns true if device added to the list; false failed
-**
-*******************************************************************************/
+ *
+ * Function gatt_add_bg_dev_list
+ *
+ * Description add/remove device from the back ground connection device list
+ *
+ * Returns true if device added to the list; false failed
+ *
+ ******************************************************************************/
bool gatt_add_bg_dev_list(tGATT_REG *p_reg, BD_ADDR bd_addr)
{
tGATT_IF gatt_if = p_reg->gatt_if;
@@ -2443,14 +2443,14 @@
}
/*******************************************************************************
-**
-** Function gatt_remove_bg_dev_for_app
-**
-** Description Remove the application interface for the specified background device
-**
-** Returns Boolean
-**
-*******************************************************************************/
+ *
+ * Function gatt_remove_bg_dev_for_app
+ *
+ * Description Remove the application interface for the specified background device
+ *
+ * Returns Boolean
+ *
+ ******************************************************************************/
bool gatt_remove_bg_dev_for_app(tGATT_IF gatt_if, BD_ADDR bd_addr)
{
tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE);
@@ -2464,14 +2464,14 @@
/*******************************************************************************
-**
-** Function gatt_get_num_apps_for_bg_dev
-**
-** Description Gte the number of applciations for the specified background device
-**
-** Returns uint8_t total number fo applications
-**
-*******************************************************************************/
+ *
+ * Function gatt_get_num_apps_for_bg_dev
+ *
+ * Description Gte the number of applciations for the specified background device
+ *
+ * Returns uint8_t total number fo applications
+ *
+ ******************************************************************************/
uint8_t gatt_get_num_apps_for_bg_dev(BD_ADDR bd_addr)
{
tGATT_BG_CONN_DEV *p_dev = NULL;
@@ -2491,14 +2491,14 @@
}
/*******************************************************************************
-**
-** Function gatt_find_app_for_bg_dev
-**
-** Description find the application interface for the specified background device
-**
-** Returns Boolean
-**
-*******************************************************************************/
+ *
+ * Function gatt_find_app_for_bg_dev
+ *
+ * Description find the application interface for the specified background device
+ *
+ * Returns Boolean
+ *
+ ******************************************************************************/
bool gatt_find_app_for_bg_dev(BD_ADDR bd_addr, tGATT_IF *p_gatt_if)
{
tGATT_BG_CONN_DEV *p_dev = NULL;
@@ -2525,15 +2525,15 @@
/*******************************************************************************
-**
-** Function gatt_remove_bg_dev_from_list
-**
-** Description add/remove device from the back ground connection device list or
-** listening to advertising list.
-**
-** Returns pointer to the device record
-**
-*******************************************************************************/
+ *
+ * Function gatt_remove_bg_dev_from_list
+ *
+ * Description add/remove device from the back ground connection device list or
+ * listening to advertising list.
+ *
+ * Returns pointer to the device record
+ *
+ ******************************************************************************/
bool gatt_remove_bg_dev_from_list(tGATT_REG *p_reg, BD_ADDR bd_addr)
{
tGATT_IF gatt_if = p_reg->gatt_if;
@@ -2573,14 +2573,14 @@
return ret;
}
/*******************************************************************************
-**
-** Function gatt_deregister_bgdev_list
-**
-** Description deregister all related back ground connetion device.
-**
-** Returns pointer to the device record
-**
-*******************************************************************************/
+ *
+ * Function gatt_deregister_bgdev_list
+ *
+ * Description deregister all related back ground connetion device.
+ *
+ * Returns pointer to the device record
+ *
+ ******************************************************************************/
void gatt_deregister_bgdev_list(tGATT_IF gatt_if)
{
tGATT_BG_CONN_DEV *p_dev_list = &gatt_cb.bgconn_dev[0];
@@ -2611,33 +2611,33 @@
/*******************************************************************************
-**
-** Function gatt_reset_bgdev_list
-**
-** Description reset bg device list
-**
-** Returns pointer to the device record
-**
-*******************************************************************************/
+ *
+ * Function gatt_reset_bgdev_list
+ *
+ * Description reset bg device list
+ *
+ * Returns pointer to the device record
+ *
+ ******************************************************************************/
void gatt_reset_bgdev_list(void)
{
memset(&gatt_cb.bgconn_dev, 0 , sizeof(tGATT_BG_CONN_DEV)*GATT_MAX_BG_CONN_DEV);
}
/*******************************************************************************
-**
-** Function gatt_update_auto_connect_dev
-**
-** Description This function add or remove a device for background connection
-** procedure.
-**
-** Parameters gatt_if: Application ID.
-** add: add peer device
-** bd_addr: peer device address.
-**
-** Returns true if connection started; false if connection start failure.
-**
-*******************************************************************************/
+ *
+ * Function gatt_update_auto_connect_dev
+ *
+ * Description This function add or remove a device for background connection
+ * procedure.
+ *
+ * Parameters gatt_if: Application ID.
+ * add: add peer device
+ * bd_addr: peer device address.
+ *
+ * Returns true if connection started; false if connection start failure.
+ *
+ ******************************************************************************/
bool gatt_update_auto_connect_dev (tGATT_IF gatt_if, bool add, BD_ADDR bd_addr)
{
bool ret = false;
@@ -2673,14 +2673,14 @@
/*******************************************************************************
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * 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
+ *
+ ******************************************************************************/
tGATT_PENDING_ENC_CLCB* gatt_add_pending_enc_channel_clcb(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
{
tGATT_PENDING_ENC_CLCB *p_buf =
diff --git a/stack/hcic/hcicmds.cc b/stack/hcic/hcicmds.cc
index 6d8159c..752011a 100644
--- a/stack/hcic/hcicmds.cc
+++ b/stack/hcic/hcicmds.cc
@@ -1015,8 +1015,8 @@
}
/******************************************
-** Lisbon Features
-*******************************************/
+ * Lisbon Features
+ ******************************************/
#if (BTM_SSR_INCLUDED == TRUE)
void btsnd_hcic_sniff_sub_rate(uint16_t handle, uint16_t max_lat,
@@ -1254,8 +1254,8 @@
#endif
/*************************
-** End of Lisbon Commands
-**************************/
+ * End of Lisbon Commands
+ *************************/
void btsnd_hcic_get_link_quality (uint16_t handle)
{
diff --git a/stack/hid/hidh_api.cc b/stack/hid/hidh_api.cc
index 984333c..b6f8dd2 100644
--- a/stack/hid/hidh_api.cc
+++ b/stack/hid/hidh_api.cc
@@ -40,14 +40,14 @@
static void hidh_search_callback (uint16_t sdp_result);
/*******************************************************************************
-**
-** Function HID_HostGetSDPRecord
-**
-** Description This function reads the device SDP record
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostGetSDPRecord
+ *
+ * Description This function reads the device SDP record
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
tHID_STATUS HID_HostGetSDPRecord ( BD_ADDR addr, tSDP_DISCOVERY_DB *p_db, uint32_t db_len,
tHID_HOST_SDP_CALLBACK *sdp_cback )
{
@@ -231,14 +231,14 @@
/*******************************************************************************
-**
-** Function HID_HostInit
-**
-** Description This function initializes the control block and trace variable
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function HID_HostInit
+ *
+ * Description This function initializes the control block and trace variable
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void HID_HostInit (void)
{
memset(&hh_cb, 0, sizeof(tHID_HOST_CTB));
@@ -256,15 +256,15 @@
}
/*******************************************************************************
-**
-** Function HID_HostSetTraceLevel
-**
-** Description This function sets the trace level for HID Host. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function HID_HostSetTraceLevel
+ *
+ * Description This function sets the trace level for HID Host. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
uint8_t HID_HostSetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
@@ -274,14 +274,14 @@
}
/*******************************************************************************
-**
-** Function HID_HostRegister
-**
-** Description This function registers HID-Host with lower layers
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostRegister
+ *
+ * Description This function registers HID-Host with lower layers
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
tHID_STATUS HID_HostRegister (tHID_HOST_DEV_CALLBACK *dev_cback)
{
tHID_STATUS st;
@@ -306,14 +306,14 @@
}
/*******************************************************************************
-**
-** Function HID_HostDeregister
-**
-** Description This function is called when the host is about power down.
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostDeregister
+ *
+ * Description This function is called when the host is about power down.
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
tHID_STATUS HID_HostDeregister(void)
{
uint8_t i;
@@ -333,14 +333,14 @@
}
/*******************************************************************************
-**
-** Function HID_HostAddDev
-**
-** Description This is called so HID-host may manage this device.
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostAddDev
+ *
+ * Description This is called so HID-host may manage this device.
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
tHID_STATUS HID_HostAddDev ( BD_ADDR addr, uint16_t attr_mask, uint8_t *handle )
{
int i;
@@ -385,14 +385,14 @@
/*******************************************************************************
-**
-** Function HID_HostRemoveDev
-**
-** Description This removes the device from list devices that host has to manage.
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostRemoveDev
+ *
+ * Description This removes the device from list devices that host has to manage.
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
tHID_STATUS HID_HostRemoveDev ( uint8_t dev_handle )
{
if( !hh_cb.reg_flag )
@@ -410,15 +410,15 @@
}
/*******************************************************************************
-**
-** Function HID_HostOpenDev
-**
-** Description This function is called when the user wants to initiate a
-** connection attempt to a device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function HID_HostOpenDev
+ *
+ * Description This function is called when the user wants to initiate a
+ * connection attempt to a device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tHID_STATUS HID_HostOpenDev ( uint8_t dev_handle )
{
if( !hh_cb.reg_flag )
@@ -435,17 +435,17 @@
}
/*******************************************************************************
-**
-** Function HID_HostWriteDev
-**
-** Description This function is called when the host has a report to send.
-**
-** report_id: is only used on GET_REPORT transaction if is specified.
-** only valid when it's a non-zero value.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function HID_HostWriteDev
+ *
+ * Description This function is called when the host has a report to send.
+ *
+ * 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_t dev_handle, uint8_t t_type,
uint8_t param, uint16_t data, uint8_t report_id, BT_HDR *pbuf )
{
@@ -478,14 +478,14 @@
}
/*******************************************************************************
-**
-** Function HID_HostCloseDev
-**
-** Description This function disconnects the device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function HID_HostCloseDev
+ *
+ * Description This function disconnects the device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tHID_STATUS HID_HostCloseDev( uint8_t dev_handle )
{
if( !hh_cb.reg_flag )
@@ -550,14 +550,14 @@
}
/******************************************************************************
-**
-** Function hid_known_hid_device
-**
-** Description check if this device is of type HID Device
-**
-** Returns true if device is HID Device else false
-**
-*******************************************************************************/
+ *
+ * Function hid_known_hid_device
+ *
+ * Description check if this device is of type HID Device
+ *
+ * Returns true if device is HID Device else false
+ *
+ ******************************************************************************/
bool hid_known_hid_device (BD_ADDR bd_addr)
{
uint8_t i;
diff --git a/stack/hid/hidh_conn.cc b/stack/hid/hidh_conn.cc
index 9a8ae04..f41c3e3 100644
--- a/stack/hid/hidh_conn.cc
+++ b/stack/hid/hidh_conn.cc
@@ -51,9 +51,9 @@
static uint8_t find_conn_by_cid (uint16_t cid);
static void hidh_conn_retry (uint8_t dhandle);
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, uint16_t l2cap_cid,
uint16_t psm, uint8_t l2cap_id);
static void hidh_l2cif_connect_cfm (uint16_t l2cap_cid, uint16_t result);
@@ -80,14 +80,14 @@
};
/*******************************************************************************
-**
-** Function hidh_l2cif_reg
-**
-** Description This function initializes the SDP unit.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_l2cif_reg
+ *
+ * Description This function initializes the SDP unit.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tHID_STATUS hidh_conn_reg (void)
{
int xx;
@@ -123,14 +123,14 @@
}
/*******************************************************************************
-**
-** Function hidh_conn_disconnect
-**
-** Description This function disconnects a connection.
-**
-** Returns true if disconnect started, false if already disconnected
-**
-*******************************************************************************/
+ *
+ * Function hidh_conn_disconnect
+ *
+ * Description This function disconnects a connection.
+ *
+ * Returns true if disconnect started, false if already disconnected
+ *
+ ******************************************************************************/
tHID_STATUS hidh_conn_disconnect (uint8_t dhandle)
{
tHID_CONN *p_hcon = &hh_cb.devices[dhandle].conn;
@@ -159,15 +159,15 @@
}
/*******************************************************************************
-**
-** Function hidh_sec_check_complete_term
-**
-** Description HID security check complete callback function.
-**
-** Returns Send L2CA_ConnectRsp OK if secutiry check succeed; otherwise
-** send security block L2C connection response.
-**
-*******************************************************************************/
+ *
+ * Function hidh_sec_check_complete_term
+ *
+ * Description HID security check complete callback function.
+ *
+ * Returns Send L2CA_ConnectRsp OK if secutiry check succeed; otherwise
+ * send security block L2C connection response.
+ *
+ ******************************************************************************/
void hidh_sec_check_complete_term (UNUSED_ATTR BD_ADDR bd_addr, UNUSED_ATTR tBT_TRANSPORT transport, void *p_ref_data,
uint8_t res)
{
@@ -196,16 +196,16 @@
}
/*******************************************************************************
-**
-** Function hidh_l2cif_connect_ind
-**
-** Description This function handles an inbound connection indication
-** from L2CAP. This is the case where we are acting as a
-** server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_l2cif_connect_ind
+ *
+ * Description This function handles an inbound connection indication
+ * from L2CAP. This is the case where we are acting as a
+ * server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, uint16_t l2cap_cid, uint16_t psm, uint8_t l2cap_id)
{
tHID_CONN *p_hcon;
@@ -301,14 +301,14 @@
}
/*******************************************************************************
-**
-** Function hidh_try_repage
-**
-** Description This function processes timeout (to page device).
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_try_repage
+ *
+ * Description This function processes timeout (to page device).
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void hidh_try_repage(uint8_t dhandle)
{
tHID_HOST_DEV_CTB *device;
@@ -323,15 +323,15 @@
}
/*******************************************************************************
-**
-** Function hidh_sec_check_complete_orig
-**
-** Description This function checks to see if security procedures are being
-** carried out or not..
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_sec_check_complete_orig
+ *
+ * Description This function checks to see if security procedures are being
+ * carried out or not..
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void hidh_sec_check_complete_orig (UNUSED_ATTR BD_ADDR bd_addr, UNUSED_ATTR tBT_TRANSPORT transport, void *p_ref_data,
uint8_t res)
{
@@ -372,16 +372,16 @@
}
/*******************************************************************************
-**
-** Function hidh_l2cif_connect_cfm
-**
-** Description This function handles the connect confirm events
-** from L2CAP. This is the case when we are acting as a
-** client and have sent a connect request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_l2cif_connect_cfm
+ *
+ * Description This function handles the connect confirm events
+ * from L2CAP. This is the case when we are acting as a
+ * client and have sent a connect request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void hidh_l2cif_connect_cfm (uint16_t l2cap_cid, uint16_t result)
{
uint8_t dhandle;
@@ -455,15 +455,15 @@
}
/*******************************************************************************
-**
-** Function hidh_l2cif_config_ind
-**
-** Description This function processes the L2CAP configuration indication
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_l2cif_config_ind
+ *
+ * Description This function processes the L2CAP configuration indication
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void hidh_l2cif_config_ind (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
uint8_t dhandle;
@@ -541,15 +541,15 @@
/*******************************************************************************
-**
-** Function hidh_l2cif_config_cfm
-**
-** Description This function processes the L2CAP configuration confirmation
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_l2cif_config_cfm
+ *
+ * Description This function processes the L2CAP configuration confirmation
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void hidh_l2cif_config_cfm (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
uint8_t dhandle;
@@ -621,15 +621,15 @@
/*******************************************************************************
-**
-** Function hidh_l2cif_disconnect_ind
-**
-** Description This function handles a disconnect event from L2CAP. If
-** requested to, we ack the disconnect before dropping the CCB
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_l2cif_disconnect_ind
+ *
+ * Description This function handles a disconnect event from L2CAP. If
+ * requested to, we ack the disconnect before dropping the CCB
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void hidh_l2cif_disconnect_ind (uint16_t l2cap_cid, bool ack_needed)
{
uint8_t dhandle;
@@ -706,14 +706,14 @@
/*******************************************************************************
-**
-** Function hidh_l2cif_disconnect_cfm
-**
-** Description This function handles a disconnect confirm event from L2CAP.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_l2cif_disconnect_cfm
+ *
+ * Description This function handles a disconnect confirm event from L2CAP.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void hidh_l2cif_disconnect_cfm (uint16_t l2cap_cid,
UNUSED_ATTR uint16_t result)
{
@@ -755,14 +755,14 @@
/*******************************************************************************
-**
-** Function hidh_l2cif_cong_ind
-**
-** Description This function handles a congestion status event from L2CAP.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_l2cif_cong_ind
+ *
+ * Description This function handles a congestion status event from L2CAP.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void hidh_l2cif_cong_ind (uint16_t l2cap_cid, bool congested)
{
uint8_t dhandle;
@@ -792,20 +792,20 @@
/*******************************************************************************
-**
-** Function hidh_l2cif_data_ind
-**
-** Description This function is called when data is received from L2CAP.
-** if we are the originator of the connection, we are the SDP
-** client, and the received message is queued up for the client.
-**
-** If we are the destination of the connection, we are the SDP
-** server, so the message is passed to the server processing
-** function.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_l2cif_data_ind
+ *
+ * Description This function is called when data is received from L2CAP.
+ * if we are the originator of the connection, we are the SDP
+ * client, and the received message is queued up for the client.
+ *
+ * If we are the destination of the connection, we are the SDP
+ * server, so the message is passed to the server processing
+ * function.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void hidh_l2cif_data_ind (uint16_t l2cap_cid, BT_HDR *p_msg)
{
uint8_t *p_data = (uint8_t *)(p_msg + 1) + p_msg->offset;
@@ -879,14 +879,14 @@
}
/*******************************************************************************
-**
-** Function hidh_conn_snd_data
-**
-** Description This function is sends out data.
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function hidh_conn_snd_data
+ *
+ * Description This function is sends out data.
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
tHID_STATUS hidh_conn_snd_data (uint8_t dhandle, uint8_t trans_type, uint8_t param,
uint16_t data, uint8_t report_id, BT_HDR *buf)
{
@@ -1015,14 +1015,14 @@
return (HID_SUCCESS);
}
/*******************************************************************************
-**
-** Function hidh_conn_initiate
-**
-** Description This function is called by the management to create a connection.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_conn_initiate
+ *
+ * Description This function is called by the management to create a connection.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tHID_STATUS hidh_conn_initiate (uint8_t dhandle)
{
uint8_t service_id = BTM_SEC_SERVICE_HIDH_NOSEC_CTRL;
@@ -1066,14 +1066,14 @@
/*******************************************************************************
-**
-** Function find_conn_by_cid
-**
-** Description This function finds a connection control block based on CID
-**
-** Returns address of control block, or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function find_conn_by_cid
+ *
+ * Description This function finds a connection control block based on CID
+ *
+ * Returns address of control block, or NULL if not found
+ *
+ ******************************************************************************/
static uint8_t find_conn_by_cid (uint16_t cid)
{
uint8_t xx;
@@ -1095,14 +1095,14 @@
}
/*******************************************************************************
-**
-** Function hidh_conn_retry
-**
-** Description This function is called to retry a failed connection.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function hidh_conn_retry
+ *
+ * Description This function is called to retry a failed connection.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void hidh_conn_retry( uint8_t dhandle )
{
tHID_HOST_DEV_CTB *p_dev = &hh_cb.devices[dhandle];
diff --git a/stack/hid/hidh_int.h b/stack/hid/hidh_int.h
index 6034ac0..17bd1e0 100644
--- a/stack/hid/hidh_int.h
+++ b/stack/hid/hidh_int.h
@@ -77,8 +77,8 @@
extern void hidh_try_repage(uint8_t dhandle);
/******************************************************************************
-** Main Control Block
-*******************************************************************************/
+ * Main Control Block
+ ******************************************************************************/
extern tHID_HOST_CTB hh_cb;
#ifdef __cplusplus
diff --git a/stack/include/a2dp_api.h b/stack/include/a2dp_api.h
index 8f16bf6..71a0581 100644
--- a/stack/include/a2dp_api.h
+++ b/stack/include/a2dp_api.h
@@ -35,8 +35,8 @@
#endif
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
//
// |MAX_PCM_FRAME_NUM_PER_TICK| controls how many buffers we can hold in
@@ -119,8 +119,8 @@
#define A2DP_SET_MULTL_BIT 2 /* multiple bits are set */
/*****************************************************************************
-** type definitions
-*****************************************************************************/
+ * type definitions
+ ****************************************************************************/
/* This data type is used in A2DP_FindService() to initialize the SDP database
* to hold the result service search. */
@@ -267,112 +267,112 @@
} tA2DP_ENCODER_INTERFACE;
/*****************************************************************************
-** external function declarations
-*****************************************************************************/
+ * external function declarations
+ ****************************************************************************/
/******************************************************************************
-**
-** Function A2DP_AddRecord
-**
-** Description This function is called by a server application to add
-** SRC or SNK information to an SDP record. Prior to
-** calling this function the application must call
-** SDP_CreateRecord() to create an SDP record.
-**
-** Input Parameters:
-** service_uuid: Indicates SRC or SNK.
-**
-** p_service_name: Pointer to a null-terminated character
-** string containing the service name.
-**
-** p_provider_name: Pointer to a null-terminated character
-** string containing the provider name.
-**
-** features: Profile supported features.
-**
-** sdp_handle: SDP handle returned by SDP_CreateRecord().
-**
-** Output Parameters:
-** None.
-**
-** Returns A2DP_SUCCESS if function execution succeeded,
-** A2DP_INVALID_PARAMS if bad parameters are given.
-** A2DP_FAIL if function execution failed.
-**
-******************************************************************************/
+ *
+ * Function A2DP_AddRecord
+ *
+ * Description This function is called by a server application to add
+ * SRC or SNK information to an SDP record. Prior to
+ * calling this function the application must call
+ * SDP_CreateRecord() to create an SDP record.
+ *
+ * Input Parameters:
+ * service_uuid: Indicates SRC or SNK.
+ *
+ * p_service_name: Pointer to a null-terminated character
+ * string containing the service name.
+ *
+ * p_provider_name: Pointer to a null-terminated character
+ * string containing the provider name.
+ *
+ * features: Profile supported features.
+ *
+ * sdp_handle: SDP handle returned by SDP_CreateRecord().
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns A2DP_SUCCESS if function execution succeeded,
+ * A2DP_INVALID_PARAMS if bad parameters are given.
+ * A2DP_FAIL if function execution failed.
+ *
+ *****************************************************************************/
extern tA2DP_STATUS A2DP_AddRecord(uint16_t service_uuid, char* p_service_name,
char* p_provider_name, uint16_t features,
uint32_t sdp_handle);
/******************************************************************************
-**
-** Function A2DP_FindService
-**
-** Description This function is called by a client application to
-** perform service discovery and retrieve SRC or SNK SDP
-** record information from a server. Information is
-** returned for the first service 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
-** A2DP_FindService() at a time; the application must wait
-** for the callback before it makes another call to
-** the function.
-**
-** Input Parameters:
-** service_uuid: Indicates SRC or SNK.
-**
-** bd_addr: BD address of the peer device.
-**
-** p_db: Pointer to the information to initialize
-** the discovery database.
-**
-** p_cback: Pointer to the A2DP_FindService()
-** callback function.
-**
-** Output Parameters:
-** None.
-**
-** Returns A2DP_SUCCESS if function execution succeeded,
-** A2DP_INVALID_PARAMS if bad parameters are given.
-** A2DP_BUSY if discovery is already in progress.
-** A2DP_FAIL if function execution failed.
-**
-******************************************************************************/
+ *
+ * Function A2DP_FindService
+ *
+ * Description This function is called by a client application to
+ * perform service discovery and retrieve SRC or SNK SDP
+ * record information from a server. Information is
+ * returned for the first service 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
+ * A2DP_FindService() at a time; the application must wait
+ * for the callback before it makes another call to
+ * the function.
+ *
+ * Input Parameters:
+ * service_uuid: Indicates SRC or SNK.
+ *
+ * bd_addr: BD address of the peer device.
+ *
+ * p_db: Pointer to the information to initialize
+ * the discovery database.
+ *
+ * p_cback: Pointer to the A2DP_FindService()
+ * callback function.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns A2DP_SUCCESS if function execution succeeded,
+ * A2DP_INVALID_PARAMS if bad parameters are given.
+ * A2DP_BUSY if discovery is already in progress.
+ * A2DP_FAIL if function execution failed.
+ *
+ *****************************************************************************/
extern tA2DP_STATUS A2DP_FindService(uint16_t service_uuid, BD_ADDR bd_addr,
tA2DP_SDP_DB_PARAMS* p_db,
tA2DP_FIND_CBACK* p_cback);
/******************************************************************************
-**
-** Function A2DP_SetTraceLevel
-**
-** Description Sets the trace level for A2D. If 0xff is passed, the
-** current trace level is returned.
-**
-** Input Parameters:
-** new_level: The level to set the A2DP tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new trace level or current trace level if
-** the input parameter is 0xff.
-**
-******************************************************************************/
+ *
+ * Function A2DP_SetTraceLevel
+ *
+ * Description Sets the trace level for A2D. If 0xff is passed, the
+ * current trace level is returned.
+ *
+ * Input Parameters:
+ * new_level: The level to set the A2DP tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new trace level or current trace level if
+ * the input parameter is 0xff.
+ *
+ *****************************************************************************/
extern uint8_t A2DP_SetTraceLevel(uint8_t new_level);
/******************************************************************************
-** Function A2DP_BitsSet
-**
-** Description Check the given num for the number of bits set
-** Returns A2DP_SET_ONE_BIT, if one and only one bit is set
-** A2DP_SET_ZERO_BIT, if all bits clear
-** A2DP_SET_MULTL_BIT, if multiple bits are set
-******************************************************************************/
+ * Function A2DP_BitsSet
+ *
+ * Description Check the given num for the number of bits set
+ * Returns A2DP_SET_ONE_BIT, if one and only one bit is set
+ * A2DP_SET_ZERO_BIT, if all bits clear
+ * A2DP_SET_MULTL_BIT, if multiple bits are set
+ *****************************************************************************/
extern uint8_t A2DP_BitsSet(uint8_t num);
// Initializes the A2DP control block.
diff --git a/stack/include/a2dp_sbc.h b/stack/include/a2dp_sbc.h
index 2548132..53dfb0a 100644
--- a/stack/include/a2dp_sbc.h
+++ b/stack/include/a2dp_sbc.h
@@ -32,8 +32,8 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/* the length of the SBC Media Payload header. */
#define A2DP_SBC_MPL_HDR_LEN 1
@@ -77,12 +77,12 @@
#define A2DP_SBC_HDR_NUM_MSK 0x0F
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
// Gets the A2DP SBC Source codec name.
const char* A2DP_CodecSepIndexStrSbc(void);
diff --git a/stack/include/a2dp_sbc_up_sample.h b/stack/include/a2dp_sbc_up_sample.h
index 946a6d4..78e99e8 100644
--- a/stack/include/a2dp_sbc_up_sample.h
+++ b/stack/include/a2dp_sbc_up_sample.h
@@ -32,135 +32,135 @@
#endif
/*******************************************************************************
-**
-** Function a2dp_sbc_init_up_sample
-**
-** Description initialize the up sample
-**
-** src_sps: samples per second (source audio data)
-** 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
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_init_up_sample
+ *
+ * Description initialize the up sample
+ *
+ * src_sps: samples per second (source audio data)
+ * 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
+ *
+ ******************************************************************************/
void a2dp_sbc_init_up_sample(uint32_t src_sps, uint32_t dst_sps, uint8_t bits,
uint8_t n_channels);
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-** Note: An AE reported an issue with this function.
-** When called with a2dp_sbc_up_sample(src, uint8_array_dst..)
-** the byte before uint8_array_dst may get overwritten.
-** Using uint16_array_dst avoids the problem.
-** This issue is related to endian-ness and is hard to resolve
-** in a generic manner.
-** **************** Please use uint16 array as dst.
-**
-** Returns The number of bytes used in p_dst
-** The number of bytes used in p_src (in *p_ret)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ * Note: An AE reported an issue with this function.
+ * When called with a2dp_sbc_up_sample(src, uint8_array_dst..)
+ * the byte before uint8_array_dst may get overwritten.
+ * Using uint16_array_dst avoids the problem.
+ * This issue is related to endian-ness and is hard to resolve
+ * in a generic manner.
+ * **************** Please use uint16 array as dst.
+ *
+ * Returns The number of bytes used in p_dst
+ * The number of bytes used in p_src (in *p_ret)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret);
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample_16s (16bits-stereo)
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample_16s (16bits-stereo)
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample_16s(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret);
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample_16m (16bits-mono)
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample_16m (16bits-mono)
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample_16m(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret);
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample_8s (8bits-stereo)
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample_8s (8bits-stereo)
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample_8s(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret);
/*******************************************************************************
-**
-** Function a2dp_sbc_up_sample_8m (8bits-mono)
-**
-** 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
-**
-** p_src: the data buffer that holds the source audio data
-** 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)
-**
-*******************************************************************************/
+ *
+ * Function a2dp_sbc_up_sample_8m (8bits-mono)
+ *
+ * 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
+ *
+ * p_src: the data buffer that holds the source audio data
+ * 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)
+ *
+ ******************************************************************************/
int a2dp_sbc_up_sample_8m(void* p_src, void* p_dst, uint32_t src_samples,
uint32_t dst_samples, uint32_t* p_ret);
diff --git a/stack/include/avct_api.h b/stack/include/avct_api.h
index f16228f..3c410a6 100644
--- a/stack/include/avct_api.h
+++ b/stack/include/avct_api.h
@@ -33,8 +33,8 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/* API function return value result codes. */
#define AVCT_SUCCESS 0 /* Function successful */
@@ -62,7 +62,7 @@
#define AVCT_MIN_BROWSE_MTU 335 /* Per the AVRC spec, minimum MTU for the browsing channel */
/* Message offset. The number of bytes needed by the protocol stack for the
-** protocol headers of an AVCTP message packet.
+ * protocol headers of an AVCTP message packet.
*/
#define AVCT_MSG_OFFSET 15
#define AVCT_BROWSE_OFFSET 17 /* the default offset for browsing channel */
@@ -100,8 +100,8 @@
#define AVCT_RESULT_FAIL 5
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
/* Control callback function. */
typedef void (tAVCT_CTRL_CBACK)(uint8_t handle, uint8_t event, uint16_t result,
@@ -122,153 +122,153 @@
} tAVCT_CC;
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function AVCT_Register
-**
-** Description This is the system level registration function for the
-** AVCTP protocol. This function initializes AVCTP and
-** 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
-**
-*******************************************************************************/
+ *
+ * Function AVCT_Register
+ *
+ * Description This is the system level registration function for the
+ * AVCTP protocol. This function initializes AVCTP and
+ * 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
+ *
+ ******************************************************************************/
extern void AVCT_Register(uint16_t mtu, uint16_t mtu_br, uint8_t sec_mask);
/*******************************************************************************
-**
-** Function AVCT_Deregister
-**
-** Description This function is called to deregister use AVCTP protocol.
-** It is called when AVCTP is no longer being used by any
-** application in the system. Before this function can be
-** called, all connections must be removed with
-** AVCT_RemoveConn().
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVCT_Deregister
+ *
+ * Description This function is called to deregister use AVCTP protocol.
+ * It is called when AVCTP is no longer being used by any
+ * application in the system. Before this function can be
+ * called, all connections must be removed with
+ * AVCT_RemoveConn().
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVCT_Deregister(void);
/*******************************************************************************
-**
-** Function AVCT_CreateConn
-**
-** Description Create an AVCTP connection. There are two types of
-** connections, initiator and acceptor, as determined by
-** 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
-** passively for an incoming AVCTP connection from a peer device.
-**
-**
-** Returns AVCT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_CreateConn
+ *
+ * Description Create an AVCTP connection. There are two types of
+ * connections, initiator and acceptor, as determined by
+ * 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
+ * passively for an incoming AVCTP connection from a peer device.
+ *
+ *
+ * Returns AVCT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVCT_CreateConn(uint8_t *p_handle, tAVCT_CC *p_cc,
BD_ADDR peer_addr);
/*******************************************************************************
-**
-** Function AVCT_RemoveConn
-**
-** Description Remove an AVCTP connection. This function is called when
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_RemoveConn
+ *
+ * Description Remove an AVCTP connection. This function is called when
+ * 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.
+ *
+ ******************************************************************************/
extern uint16_t AVCT_RemoveConn(uint8_t handle);
/*******************************************************************************
-**
-** Function AVCT_CreateBrowse
-**
-** Description Create an AVCTP connection. There are two types of
-** connections, initiator and acceptor, as determined by
-** 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
-** passively for an incoming AVCTP connection from a peer device.
-**
-**
-** Returns AVCT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_CreateBrowse
+ *
+ * Description Create an AVCTP connection. There are two types of
+ * connections, initiator and acceptor, as determined by
+ * 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
+ * passively for an incoming AVCTP connection from a peer device.
+ *
+ *
+ * Returns AVCT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVCT_CreateBrowse(uint8_t handle, uint8_t role);
/*******************************************************************************
-**
-** Function AVCT_RemoveBrowse
-**
-** Description Remove an AVCTP connection. This function is called when
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_RemoveBrowse
+ *
+ * Description Remove an AVCTP connection. This function is called when
+ * 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.
+ *
+ ******************************************************************************/
extern uint16_t AVCT_RemoveBrowse(uint8_t handle);
/*******************************************************************************
-**
-** Function AVCT_GetBrowseMtu
-**
-** Description Get the peer_mtu for the AVCTP Browse channel of the given
-** connection.
-**
-** Returns the peer browsing channel MTU.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_GetBrowseMtu
+ *
+ * Description Get the peer_mtu for the AVCTP Browse channel of the given
+ * connection.
+ *
+ * Returns the peer browsing channel MTU.
+ *
+ ******************************************************************************/
extern uint16_t AVCT_GetBrowseMtu (uint8_t handle);
/*******************************************************************************
-**
-** Function AVCT_GetPeerMtu
-**
-** Description Get the peer_mtu for the AVCTP channel of the given
-** connection.
-**
-** Returns the peer MTU size.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_GetPeerMtu
+ *
+ * Description Get the peer_mtu for the AVCTP channel of the given
+ * connection.
+ *
+ * Returns the peer MTU size.
+ *
+ ******************************************************************************/
extern uint16_t AVCT_GetPeerMtu (uint8_t handle);
/*******************************************************************************
-**
-** Function AVCT_MsgReq
-**
-** Description Send an AVCTP message to a peer device. In calling
-** AVCT_MsgReq(), the application should keep track of the
-** congestion state of AVCTP as communicated with events
-** AVCT_CONG_IND_EVT and AVCT_UNCONG_IND_EVT. If the
-** application calls AVCT_MsgReq() when AVCTP is congested
-** the message may be discarded. The application may make its
-** first call to AVCT_MsgReq() after it receives an
-** AVCT_CONNECT_CFM_EVT or AVCT_CONNECT_IND_EVT on control channel or
-** AVCT_BROWSE_CONN_CFM_EVT or AVCT_BROWSE_CONN_IND_EVT on browsing channel.
-**
-** p_msg->layer_specific must be set to
-** AVCT_DATA_CTRL for control channel traffic;
-** AVCT_DATA_BROWSE for for browse channel traffic.
-**
-** Returns AVCT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVCT_MsgReq
+ *
+ * Description Send an AVCTP message to a peer device. In calling
+ * AVCT_MsgReq(), the application should keep track of the
+ * congestion state of AVCTP as communicated with events
+ * AVCT_CONG_IND_EVT and AVCT_UNCONG_IND_EVT. If the
+ * application calls AVCT_MsgReq() when AVCTP is congested
+ * the message may be discarded. The application may make its
+ * first call to AVCT_MsgReq() after it receives an
+ * AVCT_CONNECT_CFM_EVT or AVCT_CONNECT_IND_EVT on control channel or
+ * AVCT_BROWSE_CONN_CFM_EVT or AVCT_BROWSE_CONN_IND_EVT on browsing channel.
+ *
+ * p_msg->layer_specific must be set to
+ * AVCT_DATA_CTRL for control channel traffic;
+ * AVCT_DATA_BROWSE for for browse channel traffic.
+ *
+ * Returns AVCT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR *p_msg);
#ifdef __cplusplus
diff --git a/stack/include/avdt_api.h b/stack/include/avdt_api.h
index b4f6365..c009639 100644
--- a/stack/include/avdt_api.h
+++ b/stack/include/avdt_api.h
@@ -33,8 +33,8 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
#ifndef AVDT_VERSION
#define AVDT_VERSION 0x0102
#endif
@@ -64,15 +64,15 @@
#define AVDT_MULTI_AV_HANDLE 0xFF
/* The number of bytes needed by the protocol stack for the protocol headers
-** of a media packet. This is the size of the media packet header, the
-** L2CAP packet header and HCI header.
+ * of a media packet. This is the size of the media packet header, the
+ * L2CAP packet header and HCI header.
*/
#define AVDT_MEDIA_OFFSET 23
/* 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.
+ * 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.
*/
#define AVDT_MARKER_SET 0x80
@@ -103,8 +103,8 @@
#endif
/* Protocol service capabilities. This indicates the protocol service
-** capabilities of a stream endpoint. This value is a mask.
-** Multiple values can be combined with a bitwise OR.
+ * capabilities of a stream endpoint. This value is a mask.
+ * Multiple values can be combined with a bitwise OR.
*/
#define AVDT_PSC_TRANS (1<<1) /* Media transport */
#define AVDT_PSC_REPORT (1<<2) /* Reporting */
@@ -117,8 +117,8 @@
#define AVDT_RECOV_RFC2733 1 /* RFC2733 recovery */
/* Header compression capabilities. This indicates the header compression
-** capabilities. This value is a mask. Multiple values can be combined
-** with a bitwise OR.
+ * capabilities. This value is a mask. Multiple values can be combined
+ * with a bitwise OR.
*/
#define AVDT_HDRCMP_MEDIA (1<<5) /* Available for media packets */
#define AVDT_HDRCMP_RECOV (1<<6) /* Available for recovery packets */
@@ -128,7 +128,7 @@
#define AVDT_MUX_FRAG (1<<7) /* Allow Adaptation Layer Fragmentation */
/* Application service category. This indicates the application
-** service category.
+ * service category.
*/
#define AVDT_ASC_PROTECT 4 /* Content protection */
#define AVDT_ASC_CODEC 7 /* Codec */
@@ -146,11 +146,11 @@
#define AVDT_CP_SCMS_COPY_NEVER 0
/* Error codes. The following are error codes defined in the AVDTP and GAVDP
-** specifications. These error codes communicate protocol errors between
-** AVDTP and the application. More detailed descriptions of the error codes
-** and their appropriate use can be found in the AVDTP and GAVDP specifications.
-** These error codes are unrelated to the result values returned by the
-** AVDTP API functions.
+ * specifications. These error codes communicate protocol errors between
+ * AVDTP and the application. More detailed descriptions of the error codes
+ * and their appropriate use can be found in the AVDTP and GAVDP specifications.
+ * These error codes are unrelated to the result values returned by the
+ * AVDTP API functions.
*/
#define AVDT_ERR_HEADER 0x01 /* Bad packet header format */
#define AVDT_ERR_LENGTH 0x11 /* Bad packet length */
@@ -180,7 +180,7 @@
#define AVDT_ERR_INVALID_FORMAT 0xE1 /* Invalid Content Protection format */
/* Additional error codes. This indicates error codes used by AVDTP
-** in addition to the ones defined in the specifications.
+ * in addition to the ones defined in the specifications.
*/
#define AVDT_ERR_CONNECT 0x07 /* Connection failed. */
#define AVDT_ERR_TIMEOUT 0x08 /* Response timeout. */
@@ -220,8 +220,8 @@
#define AVDT_NSC_SECURITY 0x04 /* Security command not supported */
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
typedef struct
{
@@ -260,7 +260,7 @@
} tAVDT_REG;
/* This structure contains the SEP information. This information is
-** transferred during the discovery procedure.
+ * transferred during the discovery procedure.
*/
typedef struct {
bool in_use; /* true if stream is currently in use */
@@ -293,7 +293,7 @@
} 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 */
@@ -315,7 +315,7 @@
} tAVDT_OPEN;
/* This data structure is associated with the AVDT_SECURITY_IND_EVT
-** and AVDT_SECURITY_CFM_EVT.
+ * and AVDT_SECURITY_CFM_EVT.
*/
typedef struct {
tAVDT_EVT_HDR hdr; /* Event header */
@@ -358,24 +358,24 @@
} tAVDT_CTRL;
/* This is the control callback function. This function passes control events
-** to the application. This function is required for all registered stream
-** endpoints and for the AVDT_DiscoverReq() and AVDT_GetCapReq() functions.
-**
+ * to the application. This function is required for all registered stream
+ * endpoints and for the AVDT_DiscoverReq() and AVDT_GetCapReq() functions.
+ *
*/
typedef void (tAVDT_CTRL_CBACK)(uint8_t handle, BD_ADDR bd_addr, uint8_t event,
tAVDT_CTRL *p_data);
/* This is the data callback function. It is executed when AVDTP has a media
-** packet ready for the application. This function is required for SNK
-** endpoints and not applicable for SRC endpoints.
+ * packet ready for the application. This function is required for SNK
+ * endpoints and not applicable for SRC endpoints.
*/
typedef void (tAVDT_SINK_DATA_CBACK)(uint8_t handle, BT_HDR *p_pkt,
uint32_t time_stamp, uint8_t m_pt);
#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
-** created with AVDT_PSC_REPORT.
+ * packet ready for the application. This function is required for streams
+ * created with AVDT_PSC_REPORT.
*/
typedef void (tAVDT_REPORT_CBACK)(uint8_t handle, AVDT_REPORT_TYPE type,
tAVDT_REPORT_DATA *p_data);
@@ -384,7 +384,7 @@
typedef uint16_t (tAVDT_GETCAP_REQ) (BD_ADDR bd_addr, uint8_t seid, tAVDT_CFG *p_cfg, tAVDT_CTRL_CBACK *p_cback);
/* This structure contains information required when a stream is created.
-** It is passed to the AVDT_CreateStream() function.
+ * It is passed to the AVDT_CreateStream() function.
*/
typedef struct {
tAVDT_CFG cfg; /* SEP configuration */
@@ -409,491 +409,491 @@
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function AVDT_Register
-**
-** Description This is the system level registration function for the
-** AVDTP protocol. This function initializes AVDTP and
-** 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
-**
-*******************************************************************************/
+ *
+ * Function AVDT_Register
+ *
+ * Description This is the system level registration function for the
+ * AVDTP protocol. This function initializes AVDTP and
+ * 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
+ *
+ ******************************************************************************/
extern void AVDT_Register(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function AVDT_Deregister
-**
-** Description This function is called to deregister use AVDTP protocol.
-** 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
-**
-*******************************************************************************/
+ *
+ * Function AVDT_Deregister
+ *
+ * Description This function is called to deregister use AVDTP protocol.
+ * 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
+ *
+ ******************************************************************************/
extern void AVDT_Deregister(void);
/*******************************************************************************
-**
-** Function AVDT_AbortReq
-**
-** Description Trigger Abort request to pass AVDTP Abort related mandatory
-** PTS Test case.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_AbortReq
+ *
+ * Description Trigger Abort request to pass AVDTP Abort related mandatory
+ * PTS Test case.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
extern void AVDT_AbortReq(uint8_t handle);
/*******************************************************************************
-**
-** Function AVDT_CreateStream
-**
-** Description Create a stream endpoint. After a stream endpoint is
-** created an application can initiate a connection between
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_CreateStream
+ *
+ * Description Create a stream endpoint. After a stream endpoint is
+ * created an application can initiate a connection between
+ * 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.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_CreateStream(uint8_t *p_handle, tAVDT_CS *p_cs);
/*******************************************************************************
-**
-** Function AVDT_RemoveStream
-**
-** Description Remove a stream endpoint. This function is called when
-** the application is no longer using a stream endpoint.
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_RemoveStream
+ *
+ * Description Remove a stream endpoint. This function is called when
+ * the application is no longer using a stream endpoint.
+ * 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.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_RemoveStream(uint8_t handle);
/*******************************************************************************
-**
-** Function AVDT_DiscoverReq
-**
-** Description This function initiates a connection to the AVDTP service
-** on the peer device, if not already present, and discovers
-** the stream endpoints on the peer device. (Please note
-** 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
-** AVDT_DiscoverReq() again to the same device until
-** discovery is complete.
-**
-** The memory addressed by sep_info is allocated by the
-** application. This memory is written to by AVDTP as part
-** of the discovery procedure. This memory must remain
-** accessible until the application receives the
-** AVDT_DISCOVER_CFM_EVT.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_DiscoverReq
+ *
+ * Description This function initiates a connection to the AVDTP service
+ * on the peer device, if not already present, and discovers
+ * the stream endpoints on the peer device. (Please note
+ * 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
+ * AVDT_DiscoverReq() again to the same device until
+ * discovery is complete.
+ *
+ * The memory addressed by sep_info is allocated by the
+ * application. This memory is written to by AVDTP as part
+ * of the discovery procedure. This memory must remain
+ * accessible until the application receives the
+ * AVDT_DISCOVER_CFM_EVT.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_DiscoverReq(BD_ADDR bd_addr, tAVDT_SEP_INFO *p_sep_info,
uint8_t max_seps, tAVDT_CTRL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function AVDT_GetCapReq
-**
-** Description This function initiates a connection to the AVDTP service
-** on the peer device, if not already present, and gets the
-** 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
-** AVDT_DiscoverReq() again until the procedure is complete.
-**
-** The memory pointed to by p_cfg is allocated by the
-** application. This memory is written to by AVDTP as part
-** of the get capabilities procedure. This memory must
-** remain accessible until the application receives
-** the AVDT_GETCAP_CFM_EVT.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_GetCapReq
+ *
+ * Description This function initiates a connection to the AVDTP service
+ * on the peer device, if not already present, and gets the
+ * 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
+ * AVDT_DiscoverReq() again until the procedure is complete.
+ *
+ * The memory pointed to by p_cfg is allocated by the
+ * application. This memory is written to by AVDTP as part
+ * of the get capabilities procedure. This memory must
+ * remain accessible until the application receives
+ * the AVDT_GETCAP_CFM_EVT.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_GetCapReq(BD_ADDR bd_addr, uint8_t seid, tAVDT_CFG *p_cfg,
tAVDT_CTRL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function AVDT_GetAllCapReq
-**
-** Description This function initiates a connection to the AVDTP service
-** on the peer device, if not already present, and gets the
-** 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
-** AVDT_DiscoverReq() again until the procedure is complete.
-**
-** The memory pointed to by p_cfg is allocated by the
-** application. This memory is written to by AVDTP as part
-** of the get capabilities procedure. This memory must
-** remain accessible until the application receives
-** the AVDT_GETCAP_CFM_EVT.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_GetAllCapReq
+ *
+ * Description This function initiates a connection to the AVDTP service
+ * on the peer device, if not already present, and gets the
+ * 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
+ * AVDT_DiscoverReq() again until the procedure is complete.
+ *
+ * The memory pointed to by p_cfg is allocated by the
+ * application. This memory is written to by AVDTP as part
+ * of the get capabilities procedure. This memory must
+ * remain accessible until the application receives
+ * the AVDT_GETCAP_CFM_EVT.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_GetAllCapReq(BD_ADDR bd_addr, uint8_t seid, tAVDT_CFG *p_cfg,
tAVDT_CTRL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function AVDT_DelayReport
-**
-** Description This functions sends a Delay Report to the peer device
-** that is associated with a particular SEID.
-** This function is called by SNK device.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_DelayReport
+ *
+ * Description This functions sends a Delay Report to the peer device
+ * that is associated with a particular SEID.
+ * This function is called by SNK device.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_DelayReport(uint8_t handle, uint8_t seid, uint16_t delay);
/*******************************************************************************
-**
-** Function AVDT_OpenReq
-**
-** Description This function initiates a connection to the AVDTP service
-** on the peer device, if not already present, and connects
-** to a stream endpoint on a peer device. When the connection
-** is completed, an AVDT_OPEN_CFM_EVT is sent to the
-** application via the control callback function for this handle.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_OpenReq
+ *
+ * Description This function initiates a connection to the AVDTP service
+ * on the peer device, if not already present, and connects
+ * to a stream endpoint on a peer device. When the connection
+ * is completed, an AVDT_OPEN_CFM_EVT is sent to the
+ * application via the control callback function for this handle.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_OpenReq(uint8_t handle, BD_ADDR bd_addr, uint8_t seid,
tAVDT_CFG *p_cfg);
/*******************************************************************************
-**
-** Function AVDT_ConfigRsp
-**
-** Description Respond to a configure request from the peer device. This
-** function must be called if the application receives an
-** AVDT_CONFIG_IND_EVT through its control callback.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_ConfigRsp
+ *
+ * Description Respond to a configure request from the peer device. This
+ * function must be called if the application receives an
+ * AVDT_CONFIG_IND_EVT through its control callback.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_ConfigRsp(uint8_t handle, uint8_t label, uint8_t error_code,
uint8_t category);
/*******************************************************************************
-**
-** Function AVDT_StartReq
-**
-** Description Start one or more stream endpoints. This initiates the
-** transfer of media packets for the streams. All stream
-** endpoints must previously be opened. When the streams
-** are started, an AVDT_START_CFM_EVT is sent to the
-** application via the control callback function for each stream.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_StartReq
+ *
+ * Description Start one or more stream endpoints. This initiates the
+ * transfer of media packets for the streams. All stream
+ * endpoints must previously be opened. When the streams
+ * are started, an AVDT_START_CFM_EVT is sent to the
+ * application via the control callback function for each stream.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_StartReq(uint8_t *p_handles, uint8_t num_handles);
/*******************************************************************************
-**
-** Function AVDT_SuspendReq
-**
-** Description Suspend one or more stream endpoints. This suspends the
-** transfer of media packets for the streams. All stream
-** endpoints must previously be open and started. When the
-** streams are suspended, an AVDT_SUSPEND_CFM_EVT is sent to
-** the application via the control callback function for
-** each stream.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_SuspendReq
+ *
+ * Description Suspend one or more stream endpoints. This suspends the
+ * transfer of media packets for the streams. All stream
+ * endpoints must previously be open and started. When the
+ * streams are suspended, an AVDT_SUSPEND_CFM_EVT is sent to
+ * the application via the control callback function for
+ * each stream.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_SuspendReq(uint8_t *p_handles, uint8_t num_handles);
/*******************************************************************************
-**
-** Function AVDT_CloseReq
-**
-** Description Close a stream endpoint. This stops the transfer of media
-** packets and closes the transport channel associated with
-** this stream endpoint. When the stream is closed, an
-** AVDT_CLOSE_CFM_EVT is sent to the application via the
-** control callback function for this handle.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_CloseReq
+ *
+ * Description Close a stream endpoint. This stops the transfer of media
+ * packets and closes the transport channel associated with
+ * this stream endpoint. When the stream is closed, an
+ * AVDT_CLOSE_CFM_EVT is sent to the application via the
+ * control callback function for this handle.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_CloseReq(uint8_t handle);
/*******************************************************************************
-**
-** Function AVDT_ReconfigReq
-**
-** Description Reconfigure a stream endpoint. This allows the application
-** to change the codec or content protection capabilities of
-** a stream endpoint after it has been opened. This function
-** can only be called if the stream is opened but not started
-** or if the stream has been suspended. When the procedure
-** is completed, an AVDT_RECONFIG_CFM_EVT is sent to the
-** application via the control callback function for this handle.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_ReconfigReq
+ *
+ * Description Reconfigure a stream endpoint. This allows the application
+ * to change the codec or content protection capabilities of
+ * a stream endpoint after it has been opened. This function
+ * can only be called if the stream is opened but not started
+ * or if the stream has been suspended. When the procedure
+ * is completed, an AVDT_RECONFIG_CFM_EVT is sent to the
+ * application via the control callback function for this handle.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_ReconfigReq(uint8_t handle, tAVDT_CFG *p_cfg);
/*******************************************************************************
-**
-** Function AVDT_ReconfigRsp
-**
-** Description Respond to a reconfigure request from the peer device.
-** This function must be called if the application receives
-** an AVDT_RECONFIG_IND_EVT through its control callback.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_ReconfigRsp
+ *
+ * Description Respond to a reconfigure request from the peer device.
+ * This function must be called if the application receives
+ * an AVDT_RECONFIG_IND_EVT through its control callback.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_ReconfigRsp(uint8_t handle, uint8_t label, uint8_t error_code,
uint8_t category);
/*******************************************************************************
-**
-** Function AVDT_SecurityReq
-**
-** Description Send a security request to the peer device. When the
-** security procedure is completed, an AVDT_SECURITY_CFM_EVT
-** is sent to the application via the control callback function
-** for this handle. (Please note that AVDTP security procedures
-** are unrelated to Bluetooth link level security.)
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_SecurityReq
+ *
+ * Description Send a security request to the peer device. When the
+ * security procedure is completed, an AVDT_SECURITY_CFM_EVT
+ * is sent to the application via the control callback function
+ * for this handle. (Please note that AVDTP security procedures
+ * are unrelated to Bluetooth link level security.)
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_SecurityReq(uint8_t handle, uint8_t *p_data, uint16_t len);
/*******************************************************************************
-**
-** Function AVDT_SecurityRsp
-**
-** Description Respond to a security request from the peer device.
-** This function must be called if the application receives
-** an AVDT_SECURITY_IND_EVT through its control callback.
-** (Please note that AVDTP security procedures are unrelated
-** to Bluetooth link level security.)
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_SecurityRsp
+ *
+ * Description Respond to a security request from the peer device.
+ * This function must be called if the application receives
+ * an AVDT_SECURITY_IND_EVT through its control callback.
+ * (Please note that AVDTP security procedures are unrelated
+ * to Bluetooth link level security.)
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_SecurityRsp(uint8_t handle, uint8_t label, uint8_t error_code,
uint8_t *p_data, uint16_t len);
/*******************************************************************************
-**
-** Function AVDT_WriteReq
-**
-** Description Send a media packet to the peer device. The stream must
-** be started before this function is called. Also, this
-** function can only be called if the stream is a SRC.
-**
-** When AVDTP has sent the media packet and is ready for the
-** next packet, an AVDT_WRITE_CFM_EVT is sent to the
-** application via the control callback. The application must
-** wait for the AVDT_WRITE_CFM_EVT before it makes the next
-** call to AVDT_WriteReq(). If the applications calls
-** AVDT_WriteReq() before it receives the event the packet
-** will not be sent. The application may make its first call
-** to AVDT_WriteReq() after it receives an AVDT_START_CFM_EVT
-** or AVDT_START_IND_EVT.
-**
-** The application passes the packet using the BT_HDR structure.
-** This structure is described in section 2.1. The offset
-** field must be equal to or greater than AVDT_MEDIA_OFFSET.
-** This allows enough space in the buffer for the L2CAP and
-** AVDTP headers.
-**
-** The memory pointed to by p_pkt must be a GKI buffer
-** allocated by the application. This buffer will be freed
-** by the protocol stack; the application must not free
-** this buffer.
-**
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_WriteReq
+ *
+ * Description Send a media packet to the peer device. The stream must
+ * be started before this function is called. Also, this
+ * function can only be called if the stream is a SRC.
+ *
+ * When AVDTP has sent the media packet and is ready for the
+ * next packet, an AVDT_WRITE_CFM_EVT is sent to the
+ * application via the control callback. The application must
+ * wait for the AVDT_WRITE_CFM_EVT before it makes the next
+ * call to AVDT_WriteReq(). If the applications calls
+ * AVDT_WriteReq() before it receives the event the packet
+ * will not be sent. The application may make its first call
+ * to AVDT_WriteReq() after it receives an AVDT_START_CFM_EVT
+ * or AVDT_START_IND_EVT.
+ *
+ * The application passes the packet using the BT_HDR structure.
+ * This structure is described in section 2.1. The offset
+ * field must be equal to or greater than AVDT_MEDIA_OFFSET.
+ * This allows enough space in the buffer for the L2CAP and
+ * AVDTP headers.
+ *
+ * The memory pointed to by p_pkt must be a GKI buffer
+ * allocated by the application. This buffer will be freed
+ * by the protocol stack; the application must not free
+ * this buffer.
+ *
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_WriteReq(uint8_t handle, BT_HDR *p_pkt, uint32_t time_stamp,
uint8_t m_pt);
/*******************************************************************************
-**
-** Function AVDT_WriteReqOpt
-**
-** Description Send a media packet to the peer device. The stream must
-** be started before this function is called. Also, this
-** function can only be called if the stream is a SRC
-**
-** When AVDTP has sent the media packet and is ready for the
-** next packet, an AVDT_WRITE_CFM_EVT is sent to the
-** application via the control callback. The application must
-** wait for the AVDT_WRITE_CFM_EVT before it makes the next
-** call to AVDT_WriteReq(). If the applications calls
-** AVDT_WriteReq() before it receives the event the packet
-** will not be sent. The application may make its first call
-** to AVDT_WriteReq() after it receives an AVDT_START_CFM_EVT
-** or AVDT_START_IND_EVT.
-**
-** The application passes the packet using the BT_HDR structure
-** This structure is described in section 2.1. The offset
-** field must be equal to or greater than AVDT_MEDIA_OFFSET
-** (if NO_RTP is specified, L2CAP_MIN_OFFSET can be used)
-** This allows enough space in the buffer for the L2CAP and
-** AVDTP headers.
-**
-** The memory pointed to by p_pkt must be a GKI buffer
-** allocated by the application. This buffer will be freed
-** by the protocol stack; the application must not free
-** this buffer.
-**
-** The opt parameter allows passing specific options like:
-** - NO_RTP : do not add the RTP header to buffer
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_WriteReqOpt
+ *
+ * Description Send a media packet to the peer device. The stream must
+ * be started before this function is called. Also, this
+ * function can only be called if the stream is a SRC
+ *
+ * When AVDTP has sent the media packet and is ready for the
+ * next packet, an AVDT_WRITE_CFM_EVT is sent to the
+ * application via the control callback. The application must
+ * wait for the AVDT_WRITE_CFM_EVT before it makes the next
+ * call to AVDT_WriteReq(). If the applications calls
+ * AVDT_WriteReq() before it receives the event the packet
+ * will not be sent. The application may make its first call
+ * to AVDT_WriteReq() after it receives an AVDT_START_CFM_EVT
+ * or AVDT_START_IND_EVT.
+ *
+ * The application passes the packet using the BT_HDR structure
+ * This structure is described in section 2.1. The offset
+ * field must be equal to or greater than AVDT_MEDIA_OFFSET
+ * (if NO_RTP is specified, L2CAP_MIN_OFFSET can be used)
+ * This allows enough space in the buffer for the L2CAP and
+ * AVDTP headers.
+ *
+ * The memory pointed to by p_pkt must be a GKI buffer
+ * allocated by the application. This buffer will be freed
+ * by the protocol stack; the application must not free
+ * this buffer.
+ *
+ * The opt parameter allows passing specific options like:
+ * - NO_RTP : do not add the RTP header to buffer
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_WriteReqOpt(uint8_t handle, BT_HDR *p_pkt, uint32_t time_stamp,
uint8_t m_pt, tAVDT_DATA_OPT_MASK opt);
/*******************************************************************************
-**
-** Function AVDT_ConnectReq
-**
-** Description This function initiates an AVDTP signaling connection
-** to the peer device. When the connection is completed, an
-** AVDT_CONNECT_IND_EVT is sent to the application via its
-** control callback function. If the connection attempt fails
-** an AVDT_DISCONNECT_IND_EVT is sent. The security mask
-** parameter overrides the outgoing security mask set in
-** AVDT_Register().
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_ConnectReq
+ *
+ * Description This function initiates an AVDTP signaling connection
+ * to the peer device. When the connection is completed, an
+ * AVDT_CONNECT_IND_EVT is sent to the application via its
+ * control callback function. If the connection attempt fails
+ * an AVDT_DISCONNECT_IND_EVT is sent. The security mask
+ * parameter overrides the outgoing security mask set in
+ * AVDT_Register().
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_ConnectReq(BD_ADDR bd_addr, uint8_t sec_mask,
tAVDT_CTRL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function AVDT_DisconnectReq
-**
-** Description This function disconnect an AVDTP signaling connection
-** to the peer device. When disconnected an
-** AVDT_DISCONNECT_IND_EVT is sent to the application via its
-** control callback function.
-**
-** Returns AVDT_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_DisconnectReq
+ *
+ * Description This function disconnect an AVDTP signaling connection
+ * to the peer device. When disconnected an
+ * AVDT_DISCONNECT_IND_EVT is sent to the application via its
+ * control callback function.
+ *
+ * Returns AVDT_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_DisconnectReq(BD_ADDR bd_addr, tAVDT_CTRL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function AVDT_GetL2CapChannel
-**
-** Description Get the L2CAP CID used by the handle.
-**
-** Returns CID if successful, otherwise 0.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_GetL2CapChannel
+ *
+ * Description Get the L2CAP CID used by the handle.
+ *
+ * Returns CID if successful, otherwise 0.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_GetL2CapChannel(uint8_t handle);
/*******************************************************************************
-**
-** Function AVDT_GetSignalChannel
-**
-** Description Get the L2CAP CID used by the signal channel of the given handle.
-**
-** Returns CID if successful, otherwise 0.
-**
-*******************************************************************************/
+ *
+ * Function AVDT_GetSignalChannel
+ *
+ * Description Get the L2CAP CID used by the signal channel of the given handle.
+ *
+ * Returns CID if successful, otherwise 0.
+ *
+ ******************************************************************************/
extern uint16_t AVDT_GetSignalChannel(uint8_t handle, BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function AVDT_SendReport
-**
-** Description
-**
-**
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function AVDT_SendReport
+ *
+ * Description
+ *
+ *
+ *
+ * Returns
+ *
+ ******************************************************************************/
extern uint16_t AVDT_SendReport(uint8_t handle, AVDT_REPORT_TYPE type,
tAVDT_REPORT_DATA *p_data);
/******************************************************************************
-**
-** Function AVDT_SetTraceLevel
-**
-** Description Sets the trace level for AVDT. If 0xff is passed, the
-** current trace level is returned.
-**
-** Input Parameters:
-** new_level: The level to set the AVDT tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new trace level or current trace level if
-** the input parameter is 0xff.
-**
-******************************************************************************/
+ *
+ * Function AVDT_SetTraceLevel
+ *
+ * Description Sets the trace level for AVDT. If 0xff is passed, the
+ * current trace level is returned.
+ *
+ * Input Parameters:
+ * new_level: The level to set the AVDT tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new trace level or current trace level if
+ * the input parameter is 0xff.
+ *
+ *****************************************************************************/
extern uint8_t AVDT_SetTraceLevel (uint8_t new_level);
#ifdef __cplusplus
diff --git a/stack/include/avdtc_api.h b/stack/include/avdtc_api.h
index 82591c5..4c53add 100644
--- a/stack/include/avdtc_api.h
+++ b/stack/include/avdtc_api.h
@@ -65,160 +65,160 @@
typedef void tAVDTC_CTRL_CBACK(uint8_t handle, BD_ADDR bd_addr, uint8_t event, tAVDTC_CTRL *p_data);
/*******************************************************************************
-**
-** Function AVDTC_Init
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_Init
+ *
+ * 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
+ *
+ ******************************************************************************/
extern void AVDTC_Init(tAVDTC_CTRL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function AVDTC_DiscoverRsp
-**
-** Description Send a discover response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_DiscoverRsp
+ *
+ * Description Send a discover response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_DiscoverRsp(BD_ADDR bd_addr, uint8_t label,
tAVDT_SEP_INFO sep_info[], uint8_t num_seps);
/*******************************************************************************
-**
-** Function AVDTC_GetCapRsp
-**
-** Description Send a get capabilities response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_GetCapRsp
+ *
+ * Description Send a get capabilities response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_GetCapRsp(BD_ADDR bd_addr, uint8_t label, tAVDT_CFG *p_cap);
/*******************************************************************************
-**
-** Function AVDTC_GetAllCapRsp
-**
-** Description Send a get all capabilities response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_GetAllCapRsp
+ *
+ * Description Send a get all capabilities response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_GetAllCapRsp(BD_ADDR bd_addr, uint8_t label, tAVDT_CFG *p_cap);
/*******************************************************************************
-**
-** Function AVDTC_GetConfigReq
-**
-** Description Send a get configuration request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_GetConfigReq
+ *
+ * Description Send a get configuration request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_GetConfigReq(uint8_t handle);
/*******************************************************************************
-**
-** Function AVDTC_GetConfigRsp
-**
-** Description Send a get configuration response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_GetConfigRsp
+ *
+ * Description Send a get configuration response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_GetConfigRsp(uint8_t handle, uint8_t label, tAVDT_CFG *p_cfg);
/*******************************************************************************
-**
-** Function AVDTC_OpenReq
-**
-** Description Send an open request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_OpenReq
+ *
+ * Description Send an open request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_OpenReq(uint8_t handle);
/*******************************************************************************
-**
-** Function AVDTC_OpenRsp
-**
-** Description Send an open response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_OpenRsp
+ *
+ * Description Send an open response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_OpenRsp(uint8_t handle, uint8_t label);
/*******************************************************************************
-**
-** Function AVDTC_StartRsp
-**
-** Description Send a start response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_StartRsp
+ *
+ * Description Send a start response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_StartRsp(uint8_t *p_handles, uint8_t num_handles, uint8_t label);
/*******************************************************************************
-**
-** Function AVDTC_CloseRsp
-**
-** Description Send a close response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_CloseRsp
+ *
+ * Description Send a close response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_CloseRsp(uint8_t handle, uint8_t label);
/*******************************************************************************
-**
-** Function AVDTC_SuspendRsp
-**
-** Description Send a suspend response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_SuspendRsp
+ *
+ * Description Send a suspend response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_SuspendRsp(uint8_t *p_handles, uint8_t num_handles, uint8_t label);
/*******************************************************************************
-**
-** Function AVDTC_AbortReq
-**
-** Description Send an abort request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_AbortReq
+ *
+ * Description Send an abort request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_AbortReq(uint8_t handle);
/*******************************************************************************
-**
-** Function AVDTC_AbortRsp
-**
-** Description Send an abort response.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_AbortRsp
+ *
+ * Description Send an abort response.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_AbortRsp(uint8_t handle, uint8_t label);
/*******************************************************************************
-**
-** Function AVDTC_Rej
-**
-** Description Send a reject message.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVDTC_Rej
+ *
+ * Description Send a reject message.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVDTC_Rej(uint8_t handle, BD_ADDR bd_addr, uint8_t cmd, uint8_t label,
uint8_t err_code, uint8_t err_param);
diff --git a/stack/include/avrc_api.h b/stack/include/avrc_api.h
index 06a6dc7..1245b10 100644
--- a/stack/include/avrc_api.h
+++ b/stack/include/avrc_api.h
@@ -33,8 +33,8 @@
#endif
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* API function return value result codes. */
#define AVRC_SUCCESS AVCT_SUCCESS /* 0 Function successful */
@@ -126,8 +126,8 @@
/*****************************************************************************
-** data type definitions
-*****************************************************************************/
+ * data type definitions
+ ****************************************************************************/
/* This data type is used in AVRC_FindService() to initialize the SDP database
* to hold the result service search. */
@@ -180,40 +180,40 @@
/*****************************************************************************
-** external function declarations
-*****************************************************************************/
+ * external function declarations
+ ****************************************************************************/
/******************************************************************************
-**
-** Function AVRC_AddRecord
-**
-** Description This function is called to build an AVRCP SDP record.
-** Prior to calling this function the application must
-** call SDP_CreateRecord() to create an SDP record.
-**
-** Input Parameters:
-** service_uuid: Indicates TG(UUID_SERVCLASS_AV_REM_CTRL_TARGET)
-** or CT(UUID_SERVCLASS_AV_REMOTE_CONTROL)
-**
-** p_service_name: Pointer to a null-terminated character
-** string containing the service name.
-** If service name is not used set this to NULL.
-**
-** p_provider_name: Pointer to a null-terminated character
-** string containing the provider name.
-** If provider name is not used set this to NULL.
-**
-** categories: Supported categories.
-**
-** sdp_handle: SDP handle returned by SDP_CreateRecord().
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_NO_RESOURCES if not enough resources to build the SDP record.
-**
-******************************************************************************/
+ *
+ * Function AVRC_AddRecord
+ *
+ * Description This function is called to build an AVRCP SDP record.
+ * Prior to calling this function the application must
+ * call SDP_CreateRecord() to create an SDP record.
+ *
+ * Input Parameters:
+ * service_uuid: Indicates TG(UUID_SERVCLASS_AV_REM_CTRL_TARGET)
+ * or CT(UUID_SERVCLASS_AV_REMOTE_CONTROL)
+ *
+ * p_service_name: Pointer to a null-terminated character
+ * string containing the service name.
+ * If service name is not used set this to NULL.
+ *
+ * p_provider_name: Pointer to a null-terminated character
+ * string containing the provider name.
+ * If provider name is not used set this to NULL.
+ *
+ * categories: Supported categories.
+ *
+ * sdp_handle: SDP handle returned by SDP_CreateRecord().
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_NO_RESOURCES if not enough resources to build the SDP record.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_AddRecord(uint16_t service_uuid,
const char *p_service_name,
const char *p_provider_name,
@@ -222,455 +222,455 @@
uint16_t profile_version);
/******************************************************************************
-**
-** Function AVRC_FindService
-**
-** 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.
-** 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
-** the callback before it makes another call to the function.
-** The application is responsible for allocating memory for the
-** discovery database. It is recommended that the size of the
-** discovery database be at least 300 bytes. The application
-** can deallocate the memory after the callback function has
-** executed.
-**
-** Input Parameters:
-** service_uuid: Indicates TG(UUID_SERVCLASS_AV_REM_CTRL_TARGET)
-** or CT(UUID_SERVCLASS_AV_REMOTE_CONTROL)
-**
-** bd_addr: BD address of the peer device.
-**
-** p_db: SDP discovery database parameters.
-**
-** p_cback: Pointer to the callback function.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_PARAMS if discovery database parameters are invalid.
-** AVRC_NO_RESOURCES if there are not enough resources to
-** perform the service search.
-**
-******************************************************************************/
+ *
+ * Function AVRC_FindService
+ *
+ * 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.
+ * 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
+ * the callback before it makes another call to the function.
+ * The application is responsible for allocating memory for the
+ * discovery database. It is recommended that the size of the
+ * discovery database be at least 300 bytes. The application
+ * can deallocate the memory after the callback function has
+ * executed.
+ *
+ * Input Parameters:
+ * service_uuid: Indicates TG(UUID_SERVCLASS_AV_REM_CTRL_TARGET)
+ * or CT(UUID_SERVCLASS_AV_REMOTE_CONTROL)
+ *
+ * bd_addr: BD address of the peer device.
+ *
+ * p_db: SDP discovery database parameters.
+ *
+ * p_cback: Pointer to the callback function.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_PARAMS if discovery database parameters are invalid.
+ * AVRC_NO_RESOURCES if there are not enough resources to
+ * perform the service search.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_FindService(uint16_t service_uuid, BD_ADDR bd_addr,
tAVRC_SDP_DB_PARAMS *p_db, tAVRC_FIND_CBACK *p_cback);
/******************************************************************************
-**
-** Function AVRC_Open
-**
-** 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.
-** The connection can be a target, a controller or for both role,
-** 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.
-** 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
-** AVRC_CLOSE_IND_EVT is received.
-**
-** Input Parameters:
-** p_ccb->company_id: Company Identifier.
-**
-** 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.
-**
-** p_ccb->control: Control role. This is set to
-** AVRC_CT_TARGET for target connections, AVRC_CT_CONTROL
-** for control connections or (AVRC_CT_TARGET|AVRC_CT_CONTROL)
-** for connections that support both roles.
-**
-** peer_addr: BD address of peer device. This value is
-** only used for initiator connections; for acceptor
-** connections it can be set to NULL.
-**
-** Output Parameters:
-** p_handle: Pointer to handle. This parameter is only
-** valid if AVRC_SUCCESS is returned.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_NO_RESOURCES if there are not enough resources to open
-** the connection.
-**
-******************************************************************************/
+ *
+ * Function AVRC_Open
+ *
+ * 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.
+ * The connection can be a target, a controller or for both role,
+ * 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.
+ * 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
+ * AVRC_CLOSE_IND_EVT is received.
+ *
+ * Input Parameters:
+ * p_ccb->company_id: Company Identifier.
+ *
+ * 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.
+ *
+ * p_ccb->control: Control role. This is set to
+ * AVRC_CT_TARGET for target connections, AVRC_CT_CONTROL
+ * for control connections or (AVRC_CT_TARGET|AVRC_CT_CONTROL)
+ * for connections that support both roles.
+ *
+ * peer_addr: BD address of peer device. This value is
+ * only used for initiator connections; for acceptor
+ * connections it can be set to NULL.
+ *
+ * Output Parameters:
+ * p_handle: Pointer to handle. This parameter is only
+ * valid if AVRC_SUCCESS is returned.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_NO_RESOURCES if there are not enough resources to open
+ * the connection.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_Open(uint8_t *p_handle, tAVRC_CONN_CB *p_ccb,
BD_ADDR_PTR peer_addr);
/******************************************************************************
-**
-** Function AVRC_Close
-**
-** Description Close a connection opened with AVRC_Open().
-** This function is called when the
-** application is no longer using a connection.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_Close
+ *
+ * Description Close a connection opened with AVRC_Open().
+ * This function is called when the
+ * application is no longer using a connection.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_Close(uint8_t handle);
/******************************************************************************
-**
-** Function AVRC_OpenBrowse
-**
-** 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.
-** The handle is returned by a previous call to AVRC_Open.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_NO_RESOURCES if there are not enough resources to open
-** the connection.
-**
-******************************************************************************/
+ *
+ * Function AVRC_OpenBrowse
+ *
+ * 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.
+ * The handle is returned by a previous call to AVRC_Open.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_NO_RESOURCES if there are not enough resources to open
+ * the connection.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_OpenBrowse(uint8_t handle, uint8_t conn_role);
/******************************************************************************
-**
-** Function AVRC_CloseBrowse
-**
-** Description Close a connection opened with AVRC_OpenBrowse().
-** This function is called when the
-** application is no longer using a connection.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_CloseBrowse
+ *
+ * Description Close a connection opened with AVRC_OpenBrowse().
+ * This function is called when the
+ * application is no longer using a connection.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_CloseBrowse(uint8_t handle);
/******************************************************************************
-**
-** Function AVRC_MsgReq
-**
-** 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
-** The above BT_HDR settings are set by the AVRC_Bld* functions.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_MsgReq
+ *
+ * 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
+ * The above BT_HDR settings are set by the AVRC_Bld* functions.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_MsgReq (uint8_t handle, uint8_t label, uint8_t ctype, BT_HDR *p_pkt);
/******************************************************************************
-**
-** Function AVRC_UnitCmd
-**
-** Description Send a UNIT INFO command to the peer device. This
-** function can only be called for controller role connections.
-** Any response message from the peer is passed back through
-** the tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_UnitCmd
+ *
+ * Description Send a UNIT INFO command to the peer device. This
+ * function can only be called for controller role connections.
+ * Any response message from the peer is passed back through
+ * the tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_UnitCmd(uint8_t handle, uint8_t label);
/******************************************************************************
-**
-** Function AVRC_SubCmd
-**
-** Description Send a SUBUNIT INFO command to the peer device. This
-** function can only be called for controller role connections.
-** Any response message from the peer is passed back through
-** the tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label.
-**
-** page: Specifies which part of the subunit type table
-** is requested. For AVRCP it is typically zero.
-** Value range is 0-7.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_SubCmd
+ *
+ * Description Send a SUBUNIT INFO command to the peer device. This
+ * function can only be called for controller role connections.
+ * Any response message from the peer is passed back through
+ * the tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label.
+ *
+ * page: Specifies which part of the subunit type table
+ * is requested. For AVRCP it is typically zero.
+ * Value range is 0-7.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_SubCmd(uint8_t handle, uint8_t label, uint8_t page);
/******************************************************************************
-**
-** Function AVRC_PassCmd
-**
-** Description Send a PASS THROUGH command to the peer device. This
-** function can only be called for controller role connections.
-** Any response message from the peer is passed back through
-** the tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label.
-**
-** p_msg: Pointer to PASS THROUGH message structure.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_PassCmd
+ *
+ * Description Send a PASS THROUGH command to the peer device. This
+ * function can only be called for controller role connections.
+ * Any response message from the peer is passed back through
+ * the tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label.
+ *
+ * p_msg: Pointer to PASS THROUGH message structure.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_PassCmd(uint8_t handle, uint8_t 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.
-** This function must be called when a PASS THROUGH command
-** message is received from the peer through the
-** tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label. Must be the same value as
-** passed with the command message in the callback function.
-**
-** p_msg: Pointer to PASS THROUGH message structure.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_PassRsp
+ *
+ * Description Send a PASS THROUGH response to the peer device. This
+ * 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.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label. Must be the same value as
+ * passed with the command message in the callback function.
+ *
+ * p_msg: Pointer to PASS THROUGH message structure.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_PassRsp(uint8_t handle, uint8_t label, tAVRC_MSG_PASS *p_msg);
/******************************************************************************
-**
-** Function AVRC_VendorCmd
-**
-** Description Send a VENDOR DEPENDENT command to the peer device. This
-** function can only be called for controller role connections.
-** Any response message from the peer is passed back through
-** the tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label.
-**
-** p_msg: Pointer to VENDOR DEPENDENT message structure.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_VendorCmd
+ *
+ * Description Send a VENDOR DEPENDENT command to the peer device. This
+ * function can only be called for controller role connections.
+ * Any response message from the peer is passed back through
+ * the tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label.
+ *
+ * p_msg: Pointer to VENDOR DEPENDENT message structure.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_VendorCmd(uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR *p_msg);
/******************************************************************************
-**
-** Function AVRC_VendorRsp
-**
-** Description Send a VENDOR DEPENDENT response to the peer device. This
-** function can only be called for target role connections.
-** This function must be called when a VENDOR DEPENDENT
-** command message is received from the peer through the
-** tAVRC_MSG_CBACK callback function.
-**
-** Input Parameters:
-** handle: Handle of this connection.
-**
-** label: Transaction label. Must be the same value as
-** passed with the command message in the callback function.
-**
-** p_msg: Pointer to VENDOR DEPENDENT message structure.
-**
-** Output Parameters:
-** None.
-**
-** Returns AVRC_SUCCESS if successful.
-** AVRC_BAD_HANDLE if handle is invalid.
-**
-******************************************************************************/
+ *
+ * Function AVRC_VendorRsp
+ *
+ * Description Send a VENDOR DEPENDENT response to the peer device. This
+ * function can only be called for target role connections.
+ * This function must be called when a VENDOR DEPENDENT
+ * command message is received from the peer through the
+ * tAVRC_MSG_CBACK callback function.
+ *
+ * Input Parameters:
+ * handle: Handle of this connection.
+ *
+ * label: Transaction label. Must be the same value as
+ * passed with the command message in the callback function.
+ *
+ * p_msg: Pointer to VENDOR DEPENDENT message structure.
+ *
+ * Output Parameters:
+ * None.
+ *
+ * Returns AVRC_SUCCESS if successful.
+ * AVRC_BAD_HANDLE if handle is invalid.
+ *
+ *****************************************************************************/
extern uint16_t AVRC_VendorRsp(uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR *p_msg);
/******************************************************************************
-**
-** Function AVRC_SetTraceLevel
-**
-** Description Sets the trace level for AVRC. If 0xff is passed, the
-** current trace level is returned.
-**
-** Input Parameters:
-** new_level: The level to set the AVRC tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new trace level or current trace level if
-** the input parameter is 0xff.
-**
-******************************************************************************/
+ *
+ * Function AVRC_SetTraceLevel
+ *
+ * Description Sets the trace level for AVRC. If 0xff is passed, the
+ * current trace level is returned.
+ *
+ * Input Parameters:
+ * new_level: The level to set the AVRC tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new trace level or current trace level if
+ * the input parameter is 0xff.
+ *
+ *****************************************************************************/
extern uint8_t AVRC_SetTraceLevel (uint8_t new_level);
/*******************************************************************************
-**
-** Function AVRC_Init
-**
-** Description This function is called at stack startup to allocate the
-** control block (if using dynamic memory), and initializes the
-** control block and tracing level.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function AVRC_Init
+ *
+ * Description This function is called at stack startup to allocate the
+ * control block (if using dynamic memory), and initializes the
+ * control block and tracing level.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void AVRC_Init(void);
/*******************************************************************************
-**
-** Function AVRC_Ctrl_ParsCommand
-**
-** Description This function is used to parse cmds received for CTRL
-** Currently it is for SetAbsVolume and Volume Change Notification..
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function AVRC_Ctrl_ParsCommand
+ *
+ * Description This function is used to parse cmds received for CTRL
+ * Currently it is for SetAbsVolume and Volume Change Notification..
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
extern tAVRC_STS AVRC_Ctrl_ParsCommand (tAVRC_MSG *p_msg, tAVRC_COMMAND *p_result);
/*******************************************************************************
-**
-** Function AVRC_ParsCommand
-**
-** Description This function is used to parse the received command.
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function AVRC_ParsCommand
+ *
+ * Description This function is used to parse the received command.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
extern tAVRC_STS AVRC_ParsCommand (tAVRC_MSG *p_msg, tAVRC_COMMAND *p_result,
uint8_t *p_buf, uint16_t buf_len);
/*******************************************************************************
-**
-** Function AVRC_ParsResponse
-**
-** Description This function is used to parse the received response.
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function AVRC_ParsResponse
+ *
+ * Description This function is used to parse the received response.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
extern tAVRC_STS AVRC_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p_result,
uint8_t *p_buf, uint16_t buf_len);
/*******************************************************************************
-**
-** Function AVRC_Ctrl_ParsResponse
-**
-** Description This function is a parse response for AVRCP Controller.
-**
-** Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
-** Otherwise, the error code defined by AVRCP 1.4
-**
-*******************************************************************************/
+ *
+ * Function AVRC_Ctrl_ParsResponse
+ *
+ * Description This function is a parse response for AVRCP Controller.
+ *
+ * Returns AVRC_STS_NO_ERROR, if the message in p_data is parsed successfully.
+ * Otherwise, the error code defined by AVRCP 1.4
+ *
+ ******************************************************************************/
extern tAVRC_STS AVRC_Ctrl_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p_result,
uint8_t *p_buf, uint16_t* buf_len);
/*******************************************************************************
-**
-** Function AVRC_BldCommand
-**
-** Description This function builds the given AVRCP command to the given
-** GKI buffer
-**
-** Returns AVRC_STS_NO_ERROR, if the command is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function AVRC_BldCommand
+ *
+ * Description This function builds the given AVRCP command to the given
+ * GKI buffer
+ *
+ * Returns AVRC_STS_NO_ERROR, if the command is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
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
-** GKI buffer
-**
-** Returns AVRC_STS_NO_ERROR, if the response is built successfully
-** Otherwise, the error code.
-**
-*******************************************************************************/
+ *
+ * Function AVRC_BldResponse
+ *
+ * Description This function builds the given AVRCP response to the given
+ * GKI buffer
+ *
+ * Returns AVRC_STS_NO_ERROR, if the response is built successfully
+ * Otherwise, the error code.
+ *
+ ******************************************************************************/
extern tAVRC_STS AVRC_BldResponse( uint8_t handle, tAVRC_RESPONSE *p_rsp, BT_HDR **pp_pkt);
/**************************************************************************
-**
-** Function AVRC_IsValidAvcType
-**
-** Description Check if correct AVC type is specified
-**
-** Returns returns true if it is valid
-**
-**
-*******************************************************************************/
+ *
+ * Function AVRC_IsValidAvcType
+ *
+ * Description Check if correct AVC type is specified
+ *
+ * Returns returns true if it is valid
+ *
+ *
+ ******************************************************************************/
extern bool AVRC_IsValidAvcType(uint8_t pdu_id, uint8_t avc_type);
/*******************************************************************************
-**
-** Function AVRC_IsValidPlayerAttr
-**
-** Description Check if the given attrib value is a valid one
-**
-**
-** Returns returns true if it is valid
-**
-*******************************************************************************/
+ *
+ * Function AVRC_IsValidPlayerAttr
+ *
+ * Description Check if the given attrib value is a valid one
+ *
+ *
+ * Returns returns true if it is valid
+ *
+ ******************************************************************************/
extern bool AVRC_IsValidPlayerAttr(uint8_t attr);
#ifdef __cplusplus
diff --git a/stack/include/avrc_defs.h b/stack/include/avrc_defs.h
index ad5ef71..6a5e0ad 100644
--- a/stack/include/avrc_defs.h
+++ b/stack/include/avrc_defs.h
@@ -27,8 +27,8 @@
#include "stack/include/bt_types.h"
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* Profile revision numbers */
#define AVRC_REV_1_0 0x0100
@@ -179,8 +179,8 @@
#define AVRC_KEYPRESSED_RELEASE 0x80
/*****************************************************************************
-** Metadata transfer definitions
-*****************************************************************************/
+ * Metadata transfer definitions
+ ****************************************************************************/
/* Define the Metadata Packet types
*/
@@ -357,8 +357,8 @@
#define AVRC_CHARSET_ID_UTF32 ((uint16_t) 0x03f9) /* 1017 */
/*****************************************************************************
-** Advanced Control
-*****************************************************************************/
+ * Advanced Control
+ ****************************************************************************/
#define AVRC_ITEM_PLAYER 0x01
#define AVRC_ITEM_FOLDER 0x02
#define AVRC_ITEM_MEDIA 0x03
@@ -404,8 +404,8 @@
typedef uint8_t tAVRC_UID[AVRC_UID_SIZE];
/*****************************************************************************
-** player attribute - supported features
-*****************************************************************************/
+ * player attribute - supported features
+ ****************************************************************************/
#define AVRC_PF_SELECT_BIT_NO 0
#define AVRC_PF_SELECT_MASK 0x01
#define AVRC_PF_SELECT_OFF 0
@@ -759,8 +759,8 @@
#define AVRC_PF_GET_NUM_OF_ITEMS_SUPPORTED(x) ((x)[AVRC_PF_GET_NUM_OF_ITEMS_OFF] & AVRC_PF_GET_NUM_OF_ITEMS_MASK)
/*****************************************************************************
-** data type definitions
-*****************************************************************************/
+ * data type definitions
+ ****************************************************************************/
/*
This structure contains the header parameters of an AV/C message.
@@ -869,15 +869,15 @@
#define AVRC_BE_STREAM_TO_CO_ID(u32, p) {(u32) = (((uint32_t)(*((p) + 2))) + (((uint32_t)(*((p) + 1))) << 8) + (((uint32_t)(*(p))) << 16)); (p) += 3;}
/*****************************************************************************
-** data type definitions
-*****************************************************************************/
+ * data type definitions
+ ****************************************************************************/
#define AVRC_MAX_APP_ATTR_SIZE 16
#define AVRC_MAX_CHARSET_SIZE 16
#define AVRC_MAX_ELEM_ATTR_SIZE 8
/*****************************************************************************
-** Metadata transfer Building/Parsing definitions
-*****************************************************************************/
+ * Metadata transfer Building/Parsing definitions
+ ****************************************************************************/
typedef struct {
uint16_t charset_id;
diff --git a/stack/include/bnep_api.h b/stack/include/bnep_api.h
index 41e4906..6a634d6 100644
--- a/stack/include/bnep_api.h
+++ b/stack/include/bnep_api.h
@@ -32,20 +32,20 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/* Define the minimum offset needed in a GKI buffer for
-** sending BNEP packets. Note, we are currently not sending
-** extension headers, but may in the future, so allow
-** space for them
+ * sending BNEP packets. Note, we are currently not sending
+ * extension headers, but may in the future, so allow
+ * space for them
*/
#define BNEP_MINIMUM_OFFSET (15 + L2CAP_MIN_OFFSET)
#define BNEP_INVALID_HANDLE 0xFFFF
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
/* Define the result codes from BNEP
*/
@@ -75,16 +75,16 @@
/***************************
-** Callback Functions
-****************************/
+ * Callback Functions
+ ***************************/
/* Connection state change callback prototype. Parameters are
-** Connection handle
-** BD Address of remote
-** Connection state change result
-** BNEP_SUCCESS indicates connection is success
-** All values are used to indicate the reason for failure
-** Flag to indicate if it is just a role change
+ * Connection handle
+ * BD Address of remote
+ * Connection state change result
+ * BNEP_SUCCESS indicates connection is success
+ * All values are used to indicate the reason for failure
+ * Flag to indicate if it is just a role change
*/
typedef void (tBNEP_CONN_STATE_CB) (uint16_t handle,
BD_ADDR rem_bda,
@@ -95,10 +95,10 @@
/* Connection indication callback prototype. Parameters are
-** BD Address of remote, remote UUID and local UUID
-** and flag to indicate role change and handle to the connection
-** When BNEP calls this function profile should
-** use BNEP_ConnectResp call to accept or reject the request
+ * BD Address of remote, remote UUID and local UUID
+ * and flag to indicate role change and handle to the connection
+ * When BNEP calls this function profile should
+ * use BNEP_ConnectResp call to accept or reject the request
*/
typedef void (tBNEP_CONNECT_IND_CB) (uint16_t handle,
BD_ADDR bd_addr,
@@ -109,12 +109,12 @@
/* Data buffer received indication callback prototype. Parameters are
-** Handle to the connection
-** Source BD/Ethernet Address
-** Dest BD/Ethernet address
-** Protocol
-** Pointer to the buffer
-** Flag to indicate whether extension headers to be forwarded are present
+ * Handle to the connection
+ * Source BD/Ethernet Address
+ * Dest BD/Ethernet address
+ * Protocol
+ * Pointer to the buffer
+ * Flag to indicate whether extension headers to be forwarded are present
*/
typedef void (tBNEP_DATA_BUF_CB) (uint16_t handle,
uint8_t *src,
@@ -125,13 +125,13 @@
/* Data received indication callback prototype. Parameters are
-** Handle to the connection
-** Source BD/Ethernet Address
-** Dest BD/Ethernet address
-** Protocol
-** Pointer to the beginning of the data
-** Length of data
-** Flag to indicate whether extension headers to be forwarded are present
+ * Handle to the connection
+ * Source BD/Ethernet Address
+ * Dest BD/Ethernet address
+ * Protocol
+ * Pointer to the beginning of the data
+ * Length of data
+ * Flag to indicate whether extension headers to be forwarded are present
*/
typedef void (tBNEP_DATA_IND_CB) (uint16_t handle,
uint8_t *src,
@@ -142,24 +142,24 @@
bool fw_ext_present);
/* Flow control callback for TX data. Parameters are
-** Handle to the connection
-** Event flow status
+ * Handle to the connection
+ * Event flow status
*/
typedef void (tBNEP_TX_DATA_FLOW_CB) (uint16_t handle,
tBNEP_RESULT event);
/* Filters received indication callback prototype. Parameters are
-** Handle to the connection
-** true if the cb is called for indication
-** Ignore this if it is indication, otherwise it is the result
-** for the filter set operation performed by the local
-** device
-** Number of protocol filters present
-** Pointer to the filters start. Filters are present in pairs
-** of start of the range and end of the range.
-** They will be present in big endian order. First
-** two bytes will be starting of the first range and
-** next two bytes will be ending of the range.
+ * Handle to the connection
+ * true if the cb is called for indication
+ * Ignore this if it is indication, otherwise it is the result
+ * for the filter set operation performed by the local
+ * device
+ * Number of protocol filters present
+ * Pointer to the filters start. Filters are present in pairs
+ * of start of the range and end of the range.
+ * They will be present in big endian order. First
+ * two bytes will be starting of the first range and
+ * next two bytes will be ending of the range.
*/
typedef void (tBNEP_FILTER_IND_CB) (uint16_t handle,
bool indication,
@@ -170,16 +170,16 @@
/* Multicast Filters received indication callback prototype. Parameters are
-** Handle to the connection
-** true if the cb is called for indication
-** Ignore this if it is indication, otherwise it is the result
-** for the filter set operation performed by the local
-** device
-** Number of multicast filters present
-** Pointer to the filters start. Filters are present in pairs
-** of start of the range and end of the range.
-** First six bytes will be starting of the first range and
-** next six bytes will be ending of the range.
+ * Handle to the connection
+ * true if the cb is called for indication
+ * Ignore this if it is indication, otherwise it is the result
+ * for the filter set operation performed by the local
+ * device
+ * Number of multicast filters present
+ * Pointer to the filters start. Filters are present in pairs
+ * of start of the range and end of the range.
+ * First six bytes will be starting of the first range and
+ * next six bytes will be ending of the range.
*/
typedef void (tBNEP_MFILTER_IND_CB) (uint16_t handle,
bool indication,
@@ -226,113 +226,113 @@
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function BNEP_Register
-**
-** Description This function is called by the upper layer to register
-** 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
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Register
+ *
+ * Description This function is called by the upper layer to register
+ * 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
+ *
+ ******************************************************************************/
extern tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info);
/*******************************************************************************
-**
-** Function BNEP_Deregister
-**
-** Description This function is called by the upper layer to de-register
-** its callbacks.
-**
-** Parameters: void
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Deregister
+ *
+ * Description This function is called by the upper layer to de-register
+ * its callbacks.
+ *
+ * Parameters: void
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BNEP_Deregister (void);
/*******************************************************************************
-**
-** Function BNEP_Connect
-**
-** Description This function creates a BNEP connection to a remote
-** device.
-**
-** Parameters: p_rem_addr - BD_ADDR of the peer
-** src_uuid - source uuid for the connection
-** dst_uuid - destination uuid for the connection
-** p_handle - pointer to return the handle for the connection
-**
-** Returns BNEP_SUCCESS if connection started
-** BNEP_NO_RESOURCES if no resources
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Connect
+ *
+ * Description This function creates a BNEP connection to a remote
+ * device.
+ *
+ * Parameters: p_rem_addr - BD_ADDR of the peer
+ * src_uuid - source uuid for the connection
+ * dst_uuid - destination uuid for the connection
+ * p_handle - pointer to return the handle for the connection
+ *
+ * Returns BNEP_SUCCESS if connection started
+ * BNEP_NO_RESOURCES if no resources
+ *
+ ******************************************************************************/
extern tBNEP_RESULT BNEP_Connect (BD_ADDR p_rem_bda,
tBT_UUID *src_uuid,
tBT_UUID *dst_uuid,
uint16_t *p_handle);
/*******************************************************************************
-**
-** 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
-**
-** Returns BNEP_SUCCESS if connection started
-** BNEP_WRONG_HANDLE if the connection is not found
-** BNEP_WRONG_STATE if the responce is not expected
-**
-*******************************************************************************/
+ *
+ * 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
+ *
+ * Returns BNEP_SUCCESS if connection started
+ * BNEP_WRONG_HANDLE if the connection is not found
+ * BNEP_WRONG_STATE if the responce is not expected
+ *
+ ******************************************************************************/
extern tBNEP_RESULT BNEP_ConnectResp (uint16_t handle, tBNEP_RESULT resp);
/*******************************************************************************
-**
-** Function BNEP_Disconnect
-**
-** Description This function is called to close the specified connection.
-**
-** Parameters: handle - handle of the connection
-**
-** Returns BNEP_SUCCESS if connection is disconnected
-** BNEP_WRONG_HANDLE if no connection is not found
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Disconnect
+ *
+ * Description This function is called to close the specified connection.
+ *
+ * Parameters: handle - handle of the connection
+ *
+ * Returns BNEP_SUCCESS if connection is disconnected
+ * BNEP_WRONG_HANDLE if no connection is not found
+ *
+ ******************************************************************************/
extern tBNEP_RESULT BNEP_Disconnect (uint16_t handle);
/*******************************************************************************
-**
-** Function BNEP_WriteBuf
-**
-** Description This function sends data in a GKI buffer on BNEP connection
-**
-** Parameters: handle - handle of the connection to write
-** p_dest_addr - BD_ADDR/Ethernet addr of the destination
-** p_buf - pointer to address of buffer with data
-** protocol - protocol type of the packet
-** p_src_addr - (optional) BD_ADDR/ethernet address of the source
-** (should be NULL if it is local BD Addr)
-** fw_ext_present - forwarded extensions present
-**
-** Returns: BNEP_WRONG_HANDLE - if passed handle is not valid
-** BNEP_MTU_EXCEDED - If the data length is greater than MTU
-** BNEP_IGNORE_CMD - If the packet is filtered out
-** BNEP_Q_SIZE_EXCEEDED - If the Tx Q is full
-** BNEP_SUCCESS - If written successfully
-**
-*******************************************************************************/
+ *
+ * Function BNEP_WriteBuf
+ *
+ * Description This function sends data in a GKI buffer on BNEP connection
+ *
+ * Parameters: handle - handle of the connection to write
+ * p_dest_addr - BD_ADDR/Ethernet addr of the destination
+ * p_buf - pointer to address of buffer with data
+ * protocol - protocol type of the packet
+ * p_src_addr - (optional) BD_ADDR/ethernet address of the source
+ * (should be NULL if it is local BD Addr)
+ * fw_ext_present - forwarded extensions present
+ *
+ * Returns: BNEP_WRONG_HANDLE - if passed handle is not valid
+ * BNEP_MTU_EXCEDED - If the data length is greater than MTU
+ * BNEP_IGNORE_CMD - If the packet is filtered out
+ * BNEP_Q_SIZE_EXCEEDED - If the Tx Q is full
+ * BNEP_SUCCESS - If written successfully
+ *
+ ******************************************************************************/
extern tBNEP_RESULT BNEP_WriteBuf (uint16_t handle,
uint8_t *p_dest_addr,
BT_HDR *p_buf,
@@ -341,27 +341,27 @@
bool fw_ext_present);
/*******************************************************************************
-**
-** Function BNEP_Write
-**
-** Description This function sends data over a BNEP connection
-**
-** Parameters: handle - handle of the connection to write
-** p_dest_addr - BD_ADDR/Ethernet addr of the destination
-** p_data - pointer to data start
-** protocol - protocol type of the packet
-** p_src_addr - (optional) BD_ADDR/ethernet address of the source
-** (should be NULL if it is local BD Addr)
-** fw_ext_present - forwarded extensions present
-**
-** Returns: BNEP_WRONG_HANDLE - if passed handle is not valid
-** BNEP_MTU_EXCEDED - If the data length is greater than MTU
-** BNEP_IGNORE_CMD - If the packet is filtered out
-** BNEP_Q_SIZE_EXCEEDED - If the Tx Q is full
-** BNEP_NO_RESOURCES - If not able to allocate a buffer
-** BNEP_SUCCESS - If written successfully
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Write
+ *
+ * Description This function sends data over a BNEP connection
+ *
+ * Parameters: handle - handle of the connection to write
+ * p_dest_addr - BD_ADDR/Ethernet addr of the destination
+ * p_data - pointer to data start
+ * protocol - protocol type of the packet
+ * p_src_addr - (optional) BD_ADDR/ethernet address of the source
+ * (should be NULL if it is local BD Addr)
+ * fw_ext_present - forwarded extensions present
+ *
+ * Returns: BNEP_WRONG_HANDLE - if passed handle is not valid
+ * BNEP_MTU_EXCEDED - If the data length is greater than MTU
+ * BNEP_IGNORE_CMD - If the packet is filtered out
+ * BNEP_Q_SIZE_EXCEEDED - If the Tx Q is full
+ * BNEP_NO_RESOURCES - If not able to allocate a buffer
+ * BNEP_SUCCESS - If written successfully
+ *
+ ******************************************************************************/
extern tBNEP_RESULT BNEP_Write (uint16_t handle,
uint8_t *p_dest_addr,
uint8_t *p_data,
@@ -371,87 +371,87 @@
bool fw_ext_present);
/*******************************************************************************
-**
-** Function BNEP_SetProtocolFilters
-**
-** Description This function sets the protocol filters on peer device
-**
-** Parameters: handle - Handle for the connection
-** num_filters - total number of filter ranges
-** p_start_array - Array of beginings of all protocol ranges
-** p_end_array - Array of ends of all protocol ranges
-**
-** Returns BNEP_WRONG_HANDLE - if the connection handle is not valid
-** BNEP_SET_FILTER_FAIL - if the connection is in wrong state
-** BNEP_TOO_MANY_FILTERS - if too many filters
-** BNEP_SUCCESS - if request sent successfully
-**
-*******************************************************************************/
+ *
+ * Function BNEP_SetProtocolFilters
+ *
+ * Description This function sets the protocol filters on peer device
+ *
+ * Parameters: handle - Handle for the connection
+ * num_filters - total number of filter ranges
+ * p_start_array - Array of beginings of all protocol ranges
+ * p_end_array - Array of ends of all protocol ranges
+ *
+ * Returns BNEP_WRONG_HANDLE - if the connection handle is not valid
+ * BNEP_SET_FILTER_FAIL - if the connection is in wrong state
+ * BNEP_TOO_MANY_FILTERS - if too many filters
+ * BNEP_SUCCESS - if request sent successfully
+ *
+ ******************************************************************************/
extern tBNEP_RESULT BNEP_SetProtocolFilters (uint16_t handle,
uint16_t num_filters,
uint16_t *p_start_array,
uint16_t *p_end_array);
/*******************************************************************************
-**
-** Function BNEP_SetMulticastFilters
-**
-** Description This function sets the filters for multicast addresses for BNEP.
-**
-** Parameters: handle - Handle for the connection
-** num_filters - total number of filter ranges
-** p_start_array - Pointer to sequence of beginings of all
-** multicast address ranges
-** p_end_array - Pointer to sequence of ends of all
-** multicast address ranges
-**
-** Returns BNEP_WRONG_HANDLE - if the connection handle is not valid
-** BNEP_SET_FILTER_FAIL - if the connection is in wrong state
-** BNEP_TOO_MANY_FILTERS - if too many filters
-** BNEP_SUCCESS - if request sent successfully
-**
-*******************************************************************************/
+ *
+ * Function BNEP_SetMulticastFilters
+ *
+ * Description This function sets the filters for multicast addresses for BNEP.
+ *
+ * Parameters: handle - Handle for the connection
+ * num_filters - total number of filter ranges
+ * p_start_array - Pointer to sequence of beginings of all
+ * multicast address ranges
+ * p_end_array - Pointer to sequence of ends of all
+ * multicast address ranges
+ *
+ * Returns BNEP_WRONG_HANDLE - if the connection handle is not valid
+ * BNEP_SET_FILTER_FAIL - if the connection is in wrong state
+ * BNEP_TOO_MANY_FILTERS - if too many filters
+ * BNEP_SUCCESS - if request sent successfully
+ *
+ ******************************************************************************/
extern tBNEP_RESULT BNEP_SetMulticastFilters (uint16_t handle,
uint16_t num_filters,
uint8_t *p_start_array,
uint8_t *p_end_array);
/*******************************************************************************
-**
-** Function BNEP_SetTraceLevel
-**
-** Description This function sets the trace level for BNEP. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function BNEP_SetTraceLevel
+ *
+ * Description This function sets the trace level for BNEP. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
extern uint8_t BNEP_SetTraceLevel (uint8_t new_level);
/*******************************************************************************
-**
-** Function BNEP_Init
-**
-** Description This function initializes the BNEP unit. It should be called
-** before accessing any other APIs to initialize the control block
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BNEP_Init
+ *
+ * Description This function initializes the BNEP unit. It should be called
+ * before accessing any other APIs to initialize the control block
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BNEP_Init (void);
/*******************************************************************************
-**
-** Function BNEP_GetStatus
-**
-** Description This function gets the status information for BNEP connection
-**
-** Returns BNEP_SUCCESS - if the status is available
-** BNEP_NO_RESOURCES - if no structure is passed for output
-** BNEP_WRONG_HANDLE - if the handle is invalid
-** BNEP_WRONG_STATE - if not in connected state
-**
-*******************************************************************************/
+ *
+ * Function BNEP_GetStatus
+ *
+ * Description This function gets the status information for BNEP connection
+ *
+ * Returns BNEP_SUCCESS - if the status is available
+ * BNEP_NO_RESOURCES - if no structure is passed for output
+ * BNEP_WRONG_HANDLE - if the handle is invalid
+ * BNEP_WRONG_STATE - if not in connected state
+ *
+ ******************************************************************************/
extern tBNEP_RESULT BNEP_GetStatus (uint16_t handle, tBNEP_STATUS *p_status);
diff --git a/stack/include/bt_types.h b/stack/include/bt_types.h
index 2b5e176..1993656 100644
--- a/stack/include/bt_types.h
+++ b/stack/include/bt_types.h
@@ -39,14 +39,14 @@
#endif
/* READ WELL !!
-**
-** This section defines global events. These are events that cross layers.
-** Any event that passes between layers MUST be one of these events. Tasks
-** can use their own events internally, but a FUNDAMENTAL design issue is
-** 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.
+ *
+ * This section defines global events. These are events that cross layers.
+ * Any event that passes between layers MUST be one of these events. Tasks
+ * can use their own events internally, but a FUNDAMENTAL design issue is
+ * 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.
*/
#define BT_EVT_MASK 0xFF00
#define BT_SUB_EVT_MASK 0x00FF
@@ -219,8 +219,8 @@
#define HCI_GET_EVT_HDR_PARAM_LEN(p) (uint8_t) (*((uint8_t *)((p) + 1) + (p)->offset + 1))
-/********************************************************************************
-** Macros to get and put bytes to and from a stream (Little Endian format).
+/*******************************************************************************
+ * Macros to get and put bytes to and from a stream (Little Endian format).
*/
#define UINT64_TO_BE_STREAM(p, u64) {*(p)++ = (uint8_t)((u64) >> 56); *(p)++ = (uint8_t)((u64) >> 48); *(p)++ = (uint8_t)((u64) >> 40); *(p)++ = (uint8_t)((u64) >> 32); \
*(p)++ = (uint8_t)((u64) >> 24); *(p)++ = (uint8_t)((u64) >> 16); *(p)++ = (uint8_t)((u64) >> 8); *(p)++ = (uint8_t)(u64); }
@@ -254,9 +254,9 @@
#define STREAM_SKIP_UINT8(p) do { (p) += 1; } while (0)
#define STREAM_SKIP_UINT16(p) do { (p) += 2; } while (0)
-/********************************************************************************
-** Macros to get and put bytes to and from a field (Little Endian format).
-** These are the same as to stream, except the pointer is not incremented.
+/*******************************************************************************
+ * Macros to get and put bytes to and from a field (Little Endian format).
+ * These are the same as to stream, except the pointer is not incremented.
*/
#define UINT32_TO_FIELD(p, u32) {*(uint8_t *)(p) = (uint8_t)(u32); *((uint8_t *)(p)+1) = (uint8_t)((u32) >> 8); *((uint8_t *)(p)+2) = (uint8_t)((u32) >> 16); *((uint8_t *)(p)+3) = (uint8_t)((u32) >> 24);}
#define UINT24_TO_FIELD(p, u24) {*(uint8_t *)(p) = (uint8_t)(u24); *((uint8_t *)(p)+1) = (uint8_t)((u24) >> 8); *((uint8_t *)(p)+2) = (uint8_t)((u24) >> 16);}
@@ -264,8 +264,8 @@
#define UINT8_TO_FIELD(p, u8) {*(uint8_t *)(p) = (uint8_t)(u8);}
-/********************************************************************************
-** Macros to get and put bytes to and from a stream (Big Endian format)
+/*******************************************************************************
+ * Macros to get and put bytes to and from a stream (Big Endian format)
*/
#define UINT32_TO_BE_STREAM(p, u32) {*(p)++ = (uint8_t)((u32) >> 24); *(p)++ = (uint8_t)((u32) >> 16); *(p)++ = (uint8_t)((u32) >> 8); *(p)++ = (uint8_t)(u32); }
#define UINT24_TO_BE_STREAM(p, u24) {*(p)++ = (uint8_t)((u24) >> 16); *(p)++ = (uint8_t)((u24) >> 8); *(p)++ = (uint8_t)(u24);}
@@ -286,9 +286,9 @@
#define BE_STREAM_TO_ARRAY(p, a, len) {int ijk; for (ijk = 0; ijk < (len); ijk++) ((uint8_t *) (a))[ijk] = *(p)++;}
-/********************************************************************************
-** Macros to get and put bytes to and from a field (Big Endian format).
-** These are the same as to stream, except the pointer is not incremented.
+/*******************************************************************************
+ * Macros to get and put bytes to and from a field (Big Endian format).
+ * These are the same as to stream, except the pointer is not incremented.
*/
#define UINT32_TO_BE_FIELD(p, u32) {*(uint8_t *)(p) = (uint8_t)((u32) >> 24); *((uint8_t *)(p)+1) = (uint8_t)((u32) >> 16); *((uint8_t *)(p)+2) = (uint8_t)((u32) >> 8); *((uint8_t *)(p)+3) = (uint8_t)(u32); }
#define UINT24_TO_BE_FIELD(p, u24) {*(uint8_t *)(p) = (uint8_t)((u24) >> 16); *((uint8_t *)(p)+1) = (uint8_t)((u24) >> 8); *((uint8_t *)(p)+2) = (uint8_t)(u24);}
@@ -441,9 +441,9 @@
#define BT_OOB_RAND_R_SIZE 16
/* Broadcom proprietary UUIDs and reserved PSMs
-**
-** The lowest 4 bytes byte of the UUID or GUID depends on the feature. Typically,
-** the value of those bytes will be the PSM or SCN, but it is up to the features.
+ *
+ * The lowest 4 bytes byte of the UUID or GUID depends on the feature. Typically,
+ * the value of those bytes will be the PSM or SCN, but it is up to the features.
*/
#define BRCM_PROPRIETARY_UUID_BASE 0xDA, 0x23, 0x41, 0x02, 0xA3, 0xBB, 0xC1, 0x71, 0xBA, 0x09, 0x6f, 0x21
#define BRCM_PROPRIETARY_GUID_BASE 0xda23, 0x4102, 0xa3, 0xbb, 0xc1, 0x71, 0xba, 0x09, 0x6f, 0x21
@@ -480,9 +480,9 @@
/*****************************************************************************
-** Low Energy definitions
-**
-** Address types
+ * Low Energy definitions
+ *
+ * Address types
*/
#define BLE_ADDR_PUBLIC 0x00
#define BLE_ADDR_RANDOM 0x01
@@ -697,27 +697,27 @@
// From bd.c
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/* global constant for "any" bd addr */
static const BD_ADDR bd_addr_any = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
static const BD_ADDR bd_addr_null= {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
/*****************************************************************************
-** Functions
-*****************************************************************************/
+ * Functions
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function bdcpy
-**
-** Description Copy bd addr b to a.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bdcpy
+ *
+ * Description Copy bd addr b to a.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static inline void bdcpy(BD_ADDR a, const BD_ADDR b)
{
int i;
@@ -729,15 +729,15 @@
}
/*******************************************************************************
-**
-** Function bdcmp
-**
-** Description Compare bd addr b to a.
-**
-**
-** Returns Zero if b==a, nonzero otherwise (like memcmp).
-**
-*******************************************************************************/
+ *
+ * Function bdcmp
+ *
+ * Description Compare bd addr b to a.
+ *
+ *
+ * Returns Zero if b==a, nonzero otherwise (like memcmp).
+ *
+ ******************************************************************************/
static inline int bdcmp(const BD_ADDR a, const BD_ADDR b)
{
int i;
@@ -753,30 +753,30 @@
}
/*******************************************************************************
-**
-** Function bdcmpany
-**
-** Description Compare bd addr to "any" bd addr.
-**
-**
-** Returns Zero if a equals bd_addr_any.
-**
-*******************************************************************************/
+ *
+ * Function bdcmpany
+ *
+ * Description Compare bd addr to "any" bd addr.
+ *
+ *
+ * Returns Zero if a equals bd_addr_any.
+ *
+ ******************************************************************************/
static inline int bdcmpany(const BD_ADDR a)
{
return bdcmp(a, bd_addr_any);
}
/*******************************************************************************
-**
-** Function bdsetany
-**
-** Description Set bd addr to "any" bd addr.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function bdsetany
+ *
+ * Description Set bd addr to "any" bd addr.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static inline void bdsetany(BD_ADDR a)
{
bdcpy(a, bd_addr_any);
diff --git a/stack/include/btm_api.h b/stack/include/btm_api.h
index 82a6c80..98b16ee 100644
--- a/stack/include/btm_api.h
+++ b/stack/include/btm_api.h
@@ -38,155 +38,155 @@
#endif
/*****************************************************************************
-** DEVICE CONTROL and COMMON
-*****************************************************************************/
+ * DEVICE CONTROL and COMMON
+ ****************************************************************************/
/*****************************************************************************
-** EXTERNAL FUNCTION DECLARATIONS
-*****************************************************************************/
+ * EXTERNAL FUNCTION DECLARATIONS
+ ****************************************************************************/
/*****************************************************************************
-** DEVICE CONTROL and COMMON FUNCTIONS
-*****************************************************************************/
+ * DEVICE CONTROL and COMMON FUNCTIONS
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function BTM_DeviceReset
-**
-** Description This function is called to reset the controller.The Callback function
-** if provided is called when startup of the device has
-** completed.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_DeviceReset
+ *
+ * Description This function is called to reset the controller.The Callback function
+ * if provided is called when startup of the device has
+ * completed.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_DeviceReset (tBTM_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function BTM_IsDeviceUp
-**
-** Description This function is called to check if the device is up.
-**
-** Returns true if device is up, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_IsDeviceUp
+ *
+ * Description This function is called to check if the device is up.
+ *
+ * Returns true if device is up, else false
+ *
+ ******************************************************************************/
extern bool BTM_IsDeviceUp (void);
/*******************************************************************************
-**
-** Function BTM_SetLocalDeviceName
-**
-** Description This function is called to set the local device name.
-**
-** Returns BTM_CMD_STARTED if successful, otherwise an error
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetLocalDeviceName
+ *
+ * Description This function is called to set the local device name.
+ *
+ * Returns BTM_CMD_STARTED if successful, otherwise an error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetLocalDeviceName (char *p_name);
/*******************************************************************************
-**
-** Function BTM_SetDeviceClass
-**
-** Description This function is called to set the local device class
-**
-** Returns BTM_SUCCESS if successful, otherwise an error
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetDeviceClass
+ *
+ * Description This function is called to set the local device class
+ *
+ * Returns BTM_SUCCESS if successful, otherwise an error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetDeviceClass (DEV_CLASS dev_class);
/*******************************************************************************
-**
-** Function BTM_ReadLocalDeviceName
-**
-** Description This function is called to read the local device 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
-** is returned and p_name is set to NULL
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLocalDeviceName
+ *
+ * Description This function is called to read the local device 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
+ * is returned and p_name is set to NULL
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadLocalDeviceName (char **p_name);
/*******************************************************************************
-**
-** Function BTM_ReadLocalDeviceNameFromController
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLocalDeviceNameFromController
+ *
+ * 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
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadLocalDeviceNameFromController (tBTM_CMPL_CB *p_rln_cmpl_cback);
/*******************************************************************************
-**
-** Function BTM_ReadDeviceClass
-**
-** Description This function is called to read the local device class
-**
-** Returns pointer to the device class
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadDeviceClass
+ *
+ * Description This function is called to read the local device class
+ *
+ * Returns pointer to the device class
+ *
+ ******************************************************************************/
extern uint8_t *BTM_ReadDeviceClass (void);
/*******************************************************************************
-**
-** Function BTM_ReadLocalFeatures
-**
-** Description This function is called to read the local features
-**
-** Returns pointer to the local features string
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLocalFeatures
+ *
+ * Description This function is called to read the local features
+ *
+ * Returns pointer to the local features string
+ *
+ ******************************************************************************/
extern uint8_t *BTM_ReadLocalFeatures (void);
/*******************************************************************************
-**
-** Function BTM_RegisterForDeviceStatusNotif
-**
-** Description This function is called to register for device status
-** change notifications.
-**
-** Returns pointer to previous caller's callback function or NULL if first
-** registration.
-**
-*******************************************************************************/
+ *
+ * Function BTM_RegisterForDeviceStatusNotif
+ *
+ * Description This function is called to register for device status
+ * change notifications.
+ *
+ * Returns pointer to previous caller's callback function or NULL if first
+ * registration.
+ *
+ ******************************************************************************/
extern tBTM_DEV_STATUS_CB *BTM_RegisterForDeviceStatusNotif (tBTM_DEV_STATUS_CB *p_cb);
/*******************************************************************************
-**
-** Function BTM_RegisterForVSEvents
-**
-** Description This function is called to register/deregister for vendor
-** specific HCI events.
-**
-** If is_register=true, then the function will be registered;
-** if is_register=false, then the function will be deregistered.
-**
-** Returns BTM_SUCCESS if successful,
-** BTM_BUSY if maximum number of callbacks have already been
-** registered.
-**
-*******************************************************************************/
+ *
+ * Function BTM_RegisterForVSEvents
+ *
+ * Description This function is called to register/deregister for vendor
+ * specific HCI events.
+ *
+ * If is_register=true, then the function will be registered;
+ * if is_register=false, then the function will be deregistered.
+ *
+ * Returns BTM_SUCCESS if successful,
+ * BTM_BUSY if maximum number of callbacks have already been
+ * registered.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_RegisterForVSEvents (tBTM_VS_EVT_CB *p_cb, bool is_register);
/*******************************************************************************
-**
-** Function BTM_VendorSpecificCommand
-**
-** Description Send a vendor specific HCI command to the controller.
-**
-*******************************************************************************/
+ *
+ * Function BTM_VendorSpecificCommand
+ *
+ * Description Send a vendor specific HCI command to the controller.
+ *
+ ******************************************************************************/
extern void BTM_VendorSpecificCommand(uint16_t opcode,
uint8_t param_len,
uint8_t *p_param_buf,
@@ -194,815 +194,815 @@
/*******************************************************************************
-**
-** Function BTM_AllocateSCN
-**
-** Description Look through the Server Channel Numbers for a free one to be
-** used with an RFCOMM connection.
-**
-** Returns Allocated SCN number or 0 if none.
-**
-*******************************************************************************/
+ *
+ * Function BTM_AllocateSCN
+ *
+ * Description Look through the Server Channel Numbers for a free one to be
+ * used with an RFCOMM connection.
+ *
+ * Returns Allocated SCN number or 0 if none.
+ *
+ ******************************************************************************/
extern uint8_t BTM_AllocateSCN(void);
/*******************************************************************************
-**
-** Function BTM_TryAllocateSCN
-**
-** Description Try to allocate a fixed server channel
-**
-** Returns Returns true if server channel was available
-**
-*******************************************************************************/
+ *
+ * Function BTM_TryAllocateSCN
+ *
+ * Description Try to allocate a fixed server channel
+ *
+ * Returns Returns true if server channel was available
+ *
+ ******************************************************************************/
extern bool BTM_TryAllocateSCN(uint8_t scn);
/*******************************************************************************
-**
-** Function BTM_FreeSCN
-**
-** Description Free the specified SCN.
-**
-** Returns true if successful, false if SCN is not in use or invalid
-**
-*******************************************************************************/
+ *
+ * Function BTM_FreeSCN
+ *
+ * Description Free the specified SCN.
+ *
+ * Returns true if successful, false if SCN is not in use or invalid
+ *
+ ******************************************************************************/
extern bool BTM_FreeSCN(uint8_t scn);
/*******************************************************************************
-**
-** Function BTM_SetTraceLevel
-**
-** Description This function sets the trace level for BTM. If called with
-** a value of 0xFF, it simply returns the current trace level.
-**
-** Returns The new or current trace level
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetTraceLevel
+ *
+ * Description This function sets the trace level for BTM. If called with
+ * a value of 0xFF, it simply returns the current trace level.
+ *
+ * Returns The new or current trace level
+ *
+ ******************************************************************************/
extern uint8_t BTM_SetTraceLevel (uint8_t new_level);
/*******************************************************************************
-**
-** Function BTM_WritePageTimeout
-**
-** Description Send HCI Wite Page Timeout.
-**
-*******************************************************************************/
+ *
+ * Function BTM_WritePageTimeout
+ *
+ * Description Send HCI Wite Page Timeout.
+ *
+ ******************************************************************************/
extern void BTM_WritePageTimeout(uint16_t timeout);
/*******************************************************************************
-**
-** Function BTM_WriteVoiceSettings
-**
-** Description Send HCI Write Voice Settings command.
-** See hcidefs.h for settings bitmask values.
-**
-*******************************************************************************/
+ *
+ * Function BTM_WriteVoiceSettings
+ *
+ * Description Send HCI Write Voice Settings command.
+ * See hcidefs.h for settings bitmask values.
+ *
+ ******************************************************************************/
extern void BTM_WriteVoiceSettings(uint16_t settings);
/*******************************************************************************
-**
-** Function BTM_EnableTestMode
-**
-** Description Send HCI the enable device under test command.
-**
-** Note: Controller can only be taken out of this mode by
-** resetting the controller.
-**
-** Returns
-** BTM_SUCCESS Command sent.
-** BTM_NO_RESOURCES If out of resources to send the command.
-**
-**
-*******************************************************************************/
+ *
+ * Function BTM_EnableTestMode
+ *
+ * Description Send HCI the enable device under test command.
+ *
+ * Note: Controller can only be taken out of this mode by
+ * resetting the controller.
+ *
+ * Returns
+ * BTM_SUCCESS Command sent.
+ * BTM_NO_RESOURCES If out of resources to send the command.
+ *
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_EnableTestMode(void);
/*****************************************************************************
-** DEVICE DISCOVERY FUNCTIONS - Inquiry, Remote Name, Discovery, Class of Device
-*****************************************************************************/
+ * DEVICE DISCOVERY FUNCTIONS - Inquiry, Remote Name, Discovery, Class of Device
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function BTM_SetDiscoverability
-**
-** Description This function is called to set the device into or out of
-** discoverable mode. Discoverable mode means inquiry
-** scans are enabled. If a value of '0' is entered for window or
-** interval, the default values are used.
-**
-** Returns BTM_SUCCESS if successful
-** BTM_BUSY if a setting of the filter is already in progress
-** BTM_NO_RESOURCES if couldn't get a memory pool buffer
-** BTM_ILLEGAL_VALUE if a bad parameter was detected
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetDiscoverability
+ *
+ * Description This function is called to set the device into or out of
+ * discoverable mode. Discoverable mode means inquiry
+ * scans are enabled. If a value of '0' is entered for window or
+ * interval, the default values are used.
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_BUSY if a setting of the filter is already in progress
+ * BTM_NO_RESOURCES if couldn't get a memory pool buffer
+ * BTM_ILLEGAL_VALUE if a bad parameter was detected
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetDiscoverability (uint16_t inq_mode, uint16_t window,
uint16_t interval);
/*******************************************************************************
-**
-** Function BTM_ReadDiscoverability
-**
-** Description This function is called to read the current discoverability
-** mode of the device.
-**
-** Output Params: p_window - current inquiry scan duration
-** p_interval - current inquiry scan interval
-**
-** Returns BTM_NON_DISCOVERABLE, BTM_LIMITED_DISCOVERABLE, or
-** BTM_GENERAL_DISCOVERABLE
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadDiscoverability
+ *
+ * Description This function is called to read the current discoverability
+ * mode of the device.
+ *
+ * Output Params: p_window - current inquiry scan duration
+ * p_interval - current inquiry scan interval
+ *
+ * Returns BTM_NON_DISCOVERABLE, BTM_LIMITED_DISCOVERABLE, or
+ * BTM_GENERAL_DISCOVERABLE
+ *
+ ******************************************************************************/
extern uint16_t BTM_ReadDiscoverability (uint16_t *p_window,
uint16_t *p_interval);
/*******************************************************************************
-**
-** Function BTM_SetPeriodicInquiryMode
-**
-** Description This function is called to set the device periodic inquiry mode.
-** If the duration is zero, the periodic inquiry mode is cancelled.
-**
-** Parameters: p_inqparms - pointer to the inquiry information
-** mode - GENERAL or LIMITED inquiry
-** duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
-** max_resps - maximum amount of devices to search for before ending the inquiry
-** filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
-** BTM_FILTER_COND_BD_ADDR
-** filter_cond - value for the filter (based on filter_cond_type)
-**
-** max_delay - maximum amount of time between successive inquiries
-** min_delay - minimum amount of time between successive inquiries
-** p_results_cb - callback returning pointer to results (tBTM_INQ_RESULTS)
-**
-** Returns BTM_CMD_STARTED if successfully started
-** BTM_ILLEGAL_VALUE if a bad parameter is detected
-** BTM_NO_RESOURCES if could not allocate a message buffer
-** BTM_SUCCESS - if cancelling the periodic inquiry
-** BTM_BUSY - if an inquiry is already active
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPeriodicInquiryMode
+ *
+ * Description This function is called to set the device periodic inquiry mode.
+ * If the duration is zero, the periodic inquiry mode is cancelled.
+ *
+ * Parameters: p_inqparms - pointer to the inquiry information
+ * mode - GENERAL or LIMITED inquiry
+ * duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
+ * max_resps - maximum amount of devices to search for before ending the inquiry
+ * filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
+ * BTM_FILTER_COND_BD_ADDR
+ * filter_cond - value for the filter (based on filter_cond_type)
+ *
+ * max_delay - maximum amount of time between successive inquiries
+ * min_delay - minimum amount of time between successive inquiries
+ * p_results_cb - callback returning pointer to results (tBTM_INQ_RESULTS)
+ *
+ * Returns BTM_CMD_STARTED if successfully started
+ * BTM_ILLEGAL_VALUE if a bad parameter is detected
+ * BTM_NO_RESOURCES if could not allocate a message buffer
+ * BTM_SUCCESS - if cancelling the periodic inquiry
+ * BTM_BUSY - if an inquiry is already active
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetPeriodicInquiryMode (tBTM_INQ_PARMS *p_inqparms,
uint16_t max_delay, uint16_t min_delay,
tBTM_INQ_RESULTS_CB *p_results_cb);
/*******************************************************************************
-**
-** Function BTM_StartInquiry
-**
-** Description This function is called to start an inquiry.
-**
-** Parameters: p_inqparms - pointer to the inquiry information
-** mode - GENERAL or LIMITED inquiry
-** duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
-** max_resps - maximum amount of devices to search for before ending the inquiry
-** filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
-** BTM_FILTER_COND_BD_ADDR
-** filter_cond - value for the filter (based on filter_cond_type)
-**
-** p_results_cb - Pointer to the callback routine which gets called
-** upon receipt of an inquiry result. If this field is
-** NULL, the application is not notified.
-**
-** p_cmpl_cb - Pointer to the callback routine which gets called
-** upon completion. If this field is NULL, the
-** application is not notified when completed.
-** Returns tBTM_STATUS
-** BTM_CMD_STARTED if successfully initiated
-** BTM_BUSY if already in progress
-** BTM_ILLEGAL_VALUE if parameter(s) are out of range
-** BTM_NO_RESOURCES if could not allocate resources to start the command
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_StartInquiry
+ *
+ * Description This function is called to start an inquiry.
+ *
+ * Parameters: p_inqparms - pointer to the inquiry information
+ * mode - GENERAL or LIMITED inquiry
+ * duration - length in 1.28 sec intervals (If '0', the inquiry is CANCELLED)
+ * max_resps - maximum amount of devices to search for before ending the inquiry
+ * filter_cond_type - BTM_CLR_INQUIRY_FILTER, BTM_FILTER_COND_DEVICE_CLASS, or
+ * BTM_FILTER_COND_BD_ADDR
+ * filter_cond - value for the filter (based on filter_cond_type)
+ *
+ * p_results_cb - Pointer to the callback routine which gets called
+ * upon receipt of an inquiry result. If this field is
+ * NULL, the application is not notified.
+ *
+ * p_cmpl_cb - Pointer to the callback routine which gets called
+ * upon completion. If this field is NULL, the
+ * application is not notified when completed.
+ * Returns tBTM_STATUS
+ * BTM_CMD_STARTED if successfully initiated
+ * BTM_BUSY if already in progress
+ * BTM_ILLEGAL_VALUE if parameter(s) are out of range
+ * BTM_NO_RESOURCES if could not allocate resources to start the command
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_StartInquiry (tBTM_INQ_PARMS *p_inqparms,
tBTM_INQ_RESULTS_CB *p_results_cb,
tBTM_CMPL_CB *p_cmpl_cb);
/*******************************************************************************
-**
-** Function BTM_IsInquiryActive
-**
-** Description This function returns a bit mask of the current inquiry state
-**
-** Returns BTM_INQUIRY_INACTIVE if inactive (0)
-** BTM_LIMITED_INQUIRY_ACTIVE if a limted inquiry is active
-** BTM_GENERAL_INQUIRY_ACTIVE if a general inquiry is active
-** BTM_PERIODIC_INQUIRY_ACTIVE if a periodic inquiry is active
-**
-*******************************************************************************/
+ *
+ * Function BTM_IsInquiryActive
+ *
+ * Description This function returns a bit mask of the current inquiry state
+ *
+ * Returns BTM_INQUIRY_INACTIVE if inactive (0)
+ * BTM_LIMITED_INQUIRY_ACTIVE if a limted inquiry is active
+ * BTM_GENERAL_INQUIRY_ACTIVE if a general inquiry is active
+ * BTM_PERIODIC_INQUIRY_ACTIVE if a periodic inquiry is active
+ *
+ ******************************************************************************/
extern uint16_t BTM_IsInquiryActive (void);
/*******************************************************************************
-**
-** Function BTM_CancelInquiry
-**
-** Description This function cancels an inquiry if active
-**
-** Returns BTM_SUCCESS if successful
-** BTM_NO_RESOURCES if could not allocate a message buffer
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_CancelInquiry
+ *
+ * Description This function cancels an inquiry if active
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_NO_RESOURCES if could not allocate a message buffer
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_CancelInquiry(void);
/*******************************************************************************
-**
-** Function BTM_CancelPeriodicInquiry
-**
-** Description This function cancels a periodic inquiry
-**
-** Returns
-** BTM_NO_RESOURCES if could not allocate a message buffer
-** BTM_SUCCESS - if cancelling the periodic inquiry
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_CancelPeriodicInquiry
+ *
+ * Description This function cancels a periodic inquiry
+ *
+ * Returns
+ * BTM_NO_RESOURCES if could not allocate a message buffer
+ * BTM_SUCCESS - if cancelling the periodic inquiry
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_CancelPeriodicInquiry(void);
/*******************************************************************************
-**
-** Function BTM_SetConnectability
-**
-** Description This function is called to set the device into or out of
-** connectable mode. Discoverable mode means page scans enabled.
-**
-** Returns BTM_SUCCESS if successful
-** BTM_ILLEGAL_VALUE if a bad parameter is detected
-** BTM_NO_RESOURCES if could not allocate a message buffer
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetConnectability
+ *
+ * Description This function is called to set the device into or out of
+ * connectable mode. Discoverable mode means page scans enabled.
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_ILLEGAL_VALUE if a bad parameter is detected
+ * BTM_NO_RESOURCES if could not allocate a message buffer
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetConnectability (uint16_t page_mode, uint16_t window,
uint16_t interval);
/*******************************************************************************
-**
-** Function BTM_ReadConnectability
-**
-** Description This function is called to read the current discoverability
-** mode of the device.
-** Output Params p_window - current page scan duration
-** p_interval - current time between page scans
-**
-** Returns BTM_NON_CONNECTABLE or BTM_CONNECTABLE
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadConnectability
+ *
+ * Description This function is called to read the current discoverability
+ * mode of the device.
+ * Output Params p_window - current page scan duration
+ * p_interval - current time between page scans
+ *
+ * Returns BTM_NON_CONNECTABLE or BTM_CONNECTABLE
+ *
+ ******************************************************************************/
extern uint16_t BTM_ReadConnectability (uint16_t *p_window, uint16_t *p_interval);
/*******************************************************************************
-**
-** Function BTM_SetInquiryMode
-**
-** Description This function is called to set standard, with RSSI
-** mode or extended of the inquiry for local device.
-**
-** Input Params: BTM_INQ_RESULT_STANDARD, BTM_INQ_RESULT_WITH_RSSI or
-** BTM_INQ_RESULT_EXTENDED
-**
-** Returns BTM_SUCCESS if successful
-** BTM_NO_RESOURCES if couldn't get a memory pool buffer
-** BTM_ILLEGAL_VALUE if a bad parameter was detected
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetInquiryMode
+ *
+ * Description This function is called to set standard, with RSSI
+ * mode or extended of the inquiry for local device.
+ *
+ * Input Params: BTM_INQ_RESULT_STANDARD, BTM_INQ_RESULT_WITH_RSSI or
+ * BTM_INQ_RESULT_EXTENDED
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_NO_RESOURCES if couldn't get a memory pool buffer
+ * BTM_ILLEGAL_VALUE if a bad parameter was detected
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetInquiryMode (uint8_t mode);
/*******************************************************************************
-**
-** Function BTM_SetInquiryScanType
-**
-** Description This function is called to set the iquiry scan-type to
-** standard or interlaced.
-**
-** Input Params: BTM_SCAN_TYPE_STANDARD or BTM_SCAN_TYPE_INTERLACED
-**
-** Returns BTM_SUCCESS if successful
-** BTM_MODE_UNSUPPORTED if not a 1.2 device
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetInquiryScanType
+ *
+ * Description This function is called to set the iquiry scan-type to
+ * standard or interlaced.
+ *
+ * Input Params: BTM_SCAN_TYPE_STANDARD or BTM_SCAN_TYPE_INTERLACED
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_MODE_UNSUPPORTED if not a 1.2 device
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetInquiryScanType (uint16_t scan_type);
/*******************************************************************************
-**
-** Function BTM_SetPageScanType
-**
-** Description This function is called to set the page scan-type to
-** standard or interlaced.
-**
-** Input Params: BTM_SCAN_TYPE_STANDARD or BTM_SCAN_TYPE_INTERLACED
-**
-** Returns BTM_SUCCESS if successful
-** BTM_MODE_UNSUPPORTED if not a 1.2 device
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPageScanType
+ *
+ * Description This function is called to set the page scan-type to
+ * standard or interlaced.
+ *
+ * Input Params: BTM_SCAN_TYPE_STANDARD or BTM_SCAN_TYPE_INTERLACED
+ *
+ * Returns BTM_SUCCESS if successful
+ * BTM_MODE_UNSUPPORTED if not a 1.2 device
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetPageScanType (uint16_t scan_type);
/*******************************************************************************
-**
-** Function BTM_ReadRemoteDeviceName
-**
-** Description This function initiates a remote device HCI command to the
-** controller and calls the callback when the process has completed.
-**
-** Input Params: remote_bda - device address of name to retrieve
-** p_cb - callback function called when BTM_CMD_STARTED
-** is returned.
-** A pointer to tBTM_REMOTE_DEV_NAME is passed to the
-** callback.
-**
-** Returns
-** BTM_CMD_STARTED is returned if the request was successfully sent
-** to HCI.
-** BTM_BUSY if already in progress
-** BTM_UNKNOWN_ADDR if device address is bad
-** BTM_NO_RESOURCES if could not allocate resources to start the command
-** BTM_WRONG_MODE if the device is not up.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRemoteDeviceName
+ *
+ * Description This function initiates a remote device HCI command to the
+ * controller and calls the callback when the process has completed.
+ *
+ * Input Params: remote_bda - device address of name to retrieve
+ * p_cb - callback function called when BTM_CMD_STARTED
+ * is returned.
+ * A pointer to tBTM_REMOTE_DEV_NAME is passed to the
+ * callback.
+ *
+ * Returns
+ * BTM_CMD_STARTED is returned if the request was successfully sent
+ * to HCI.
+ * BTM_BUSY if already in progress
+ * BTM_UNKNOWN_ADDR if device address is bad
+ * BTM_NO_RESOURCES if could not allocate resources to start the command
+ * BTM_WRONG_MODE if the device is not up.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadRemoteDeviceName (BD_ADDR remote_bda,
tBTM_CMPL_CB *p_cb,
tBT_TRANSPORT transport);
/*******************************************************************************
-**
-** Function BTM_CancelRemoteDeviceName
-**
-** Description This function initiates the cancel request for the specified
-** remote device.
-**
-** Input Params: None
-**
-** Returns
-** BTM_CMD_STARTED is returned if the request was successfully sent
-** to HCI.
-** BTM_NO_RESOURCES if could not allocate resources to start the command
-** BTM_WRONG_MODE if there is not an active remote name request.
-**
-*******************************************************************************/
+ *
+ * Function BTM_CancelRemoteDeviceName
+ *
+ * Description This function initiates the cancel request for the specified
+ * remote device.
+ *
+ * Input Params: None
+ *
+ * Returns
+ * BTM_CMD_STARTED is returned if the request was successfully sent
+ * to HCI.
+ * BTM_NO_RESOURCES if could not allocate resources to start the command
+ * BTM_WRONG_MODE if there is not an active remote name request.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_CancelRemoteDeviceName (void);
/*******************************************************************************
-**
-** Function BTM_ReadRemoteVersion
-**
-** Description This function is called to read a remote device's version
-**
-** Returns BTM_SUCCESS if successful, otherwise an error
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRemoteVersion
+ *
+ * Description This function is called to read a remote device's version
+ *
+ * Returns BTM_SUCCESS if successful, otherwise an error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadRemoteVersion (BD_ADDR addr,
uint8_t *lmp_version,
uint16_t *manufacturer,
uint16_t *lmp_sub_version);
/*******************************************************************************
-**
-** Function BTM_ReadRemoteFeatures
-**
-** Description This function is called to read a remote device's
-** supported features mask (features mask located at page 0)
-**
-** Note: The size of device features mask page is
-** BTM_FEATURE_BYTES_PER_PAGE bytes.
-**
-** Returns pointer to the remote supported features mask
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRemoteFeatures
+ *
+ * Description This function is called to read a remote device's
+ * supported features mask (features mask located at page 0)
+ *
+ * Note: The size of device features mask page is
+ * BTM_FEATURE_BYTES_PER_PAGE bytes.
+ *
+ * Returns pointer to the remote supported features mask
+ *
+ ******************************************************************************/
extern uint8_t *BTM_ReadRemoteFeatures (BD_ADDR addr);
/*******************************************************************************
-**
-** Function BTM_ReadRemoteExtendedFeatures
-**
-** Description This function is called to read a specific extended features
-** page of the remote device
-**
-** Note1: The size of device features mask page is
-** BTM_FEATURE_BYTES_PER_PAGE bytes.
-** Note2: The valid device features mask page number depends on
-** the remote device capabilities. It is expected to be in the
-** range [0 - BTM_EXT_FEATURES_PAGE_MAX].
+ *
+ * Function BTM_ReadRemoteExtendedFeatures
+ *
+ * Description This function is called to read a specific extended features
+ * page of the remote device
+ *
+ * Note1: The size of device features mask page is
+ * BTM_FEATURE_BYTES_PER_PAGE bytes.
+ * Note2: The valid device features mask page number depends on
+ * the remote device capabilities. It is expected to be in the
+ * range [0 - BTM_EXT_FEATURES_PAGE_MAX].
-** Returns pointer to the remote extended features mask
-** or NULL if page_number is not valid
-**
-*******************************************************************************/
+ * Returns pointer to the remote extended features mask
+ * or NULL if page_number is not valid
+ *
+ ******************************************************************************/
extern uint8_t *BTM_ReadRemoteExtendedFeatures (BD_ADDR addr, uint8_t page_number);
/*******************************************************************************
-**
-** Function BTM_ReadNumberRemoteFeaturesPages
-**
-** Description This function is called to retrieve the number of feature pages
-** read from the remote device
-**
-** Returns number of features pages read from the remote device
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadNumberRemoteFeaturesPages
+ *
+ * Description This function is called to retrieve the number of feature pages
+ * read from the remote device
+ *
+ * Returns number of features pages read from the remote device
+ *
+ ******************************************************************************/
extern uint8_t BTM_ReadNumberRemoteFeaturesPages (BD_ADDR addr);
/*******************************************************************************
-**
-** Function BTM_ReadAllRemoteFeatures
-**
-** Description This function is called to read all features of the remote device
-**
-** Returns pointer to the byte[0] of the page[0] of the remote device
-** feature mask.
-**
-** Note: the function returns the pointer to the array of the size
-** BTM_FEATURE_BYTES_PER_PAGE * (BTM_EXT_FEATURES_PAGE_MAX + 1).
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadAllRemoteFeatures
+ *
+ * Description This function is called to read all features of the remote device
+ *
+ * Returns pointer to the byte[0] of the page[0] of the remote device
+ * feature mask.
+ *
+ * Note: the function returns the pointer to the array of the size
+ * BTM_FEATURE_BYTES_PER_PAGE * (BTM_EXT_FEATURES_PAGE_MAX + 1).
+ *
+ ******************************************************************************/
extern uint8_t *BTM_ReadAllRemoteFeatures (BD_ADDR addr);
/*******************************************************************************
-**
-** Function BTM_InqDbRead
-**
-** Description This function looks through the inquiry database for a match
-** based on Bluetooth Device Address. This is the application's
-** interface to get the inquiry details of a specific BD address.
-**
-** Returns pointer to entry, or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function BTM_InqDbRead
+ *
+ * Description This function looks through the inquiry database for a match
+ * based on Bluetooth Device Address. This is the application's
+ * interface to get the inquiry details of a specific BD address.
+ *
+ * Returns pointer to entry, or NULL if not found
+ *
+ ******************************************************************************/
extern tBTM_INQ_INFO *BTM_InqDbRead (const BD_ADDR p_bda);
/*******************************************************************************
-**
-** Function BTM_InqDbFirst
-**
-** Description This function looks through the inquiry database for the first
-** used entry, and returns that. This is used in conjunction with
-** BTM_InqDbNext by applications as a way to walk through the
-** inquiry database.
-**
-** Returns pointer to first in-use entry, or NULL if DB is empty
-**
-*******************************************************************************/
+ *
+ * Function BTM_InqDbFirst
+ *
+ * Description This function looks through the inquiry database for the first
+ * used entry, and returns that. This is used in conjunction with
+ * BTM_InqDbNext by applications as a way to walk through the
+ * inquiry database.
+ *
+ * Returns pointer to first in-use entry, or NULL if DB is empty
+ *
+ ******************************************************************************/
extern tBTM_INQ_INFO *BTM_InqDbFirst (void);
/*******************************************************************************
-**
-** Function BTM_InqDbNext
-**
-** Description This function looks through the inquiry database for the next
-** used entry, and returns that. If the input parameter is NULL,
-** the first entry is returned.
-**
-** Returns pointer to next in-use entry, or NULL if no more found.
-**
-*******************************************************************************/
+ *
+ * Function BTM_InqDbNext
+ *
+ * Description This function looks through the inquiry database for the next
+ * used entry, and returns that. If the input parameter is NULL,
+ * the first entry is returned.
+ *
+ * Returns pointer to next in-use entry, or NULL if no more found.
+ *
+ ******************************************************************************/
extern tBTM_INQ_INFO *BTM_InqDbNext (tBTM_INQ_INFO *p_cur);
/*******************************************************************************
-**
-** Function BTM_ClearInqDb
-**
-** Description This function is called to clear out a device or all devices
-** from the inquiry database.
-**
-** Parameter p_bda - (input) BD_ADDR -> Address of device to clear
-** (NULL clears all entries)
-**
-** Returns BTM_BUSY if an inquiry, get remote name, or event filter
-** is active, otherwise BTM_SUCCESS
-**
-*******************************************************************************/
+ *
+ * Function BTM_ClearInqDb
+ *
+ * Description This function is called to clear out a device or all devices
+ * from the inquiry database.
+ *
+ * Parameter p_bda - (input) BD_ADDR -> Address of device to clear
+ * (NULL clears all entries)
+ *
+ * Returns BTM_BUSY if an inquiry, get remote name, or event filter
+ * is active, otherwise BTM_SUCCESS
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ClearInqDb (BD_ADDR p_bda);
/*******************************************************************************
-**
-** Function BTM_ReadInquiryRspTxPower
-**
-** Description This command will read the inquiry Transmit Power level used
-** 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
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadInquiryRspTxPower
+ *
+ * Description This command will read the inquiry Transmit Power level used
+ * 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
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadInquiryRspTxPower (tBTM_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function BTM_StartDiscovery
-**
-** Description This function is called by an application (or profile)
-** when it wants to trigger an service discovery using the
-** BTM's discovery database.
-**
-** Returns tBTM_STATUS
-** BTM_CMD_STARTED if the discovery was initiated
-** BTM_BUSY if one is already in progress
-** BTM_UNKNOWN_ADDR if no addresses are in the INQ DB
-** BTM_ERR_PROCESSING if err initiating the command
-**
-*******************************************************************************/
+ *
+ * Function BTM_StartDiscovery
+ *
+ * Description This function is called by an application (or profile)
+ * when it wants to trigger an service discovery using the
+ * BTM's discovery database.
+ *
+ * Returns tBTM_STATUS
+ * BTM_CMD_STARTED if the discovery was initiated
+ * BTM_BUSY if one is already in progress
+ * BTM_UNKNOWN_ADDR if no addresses are in the INQ DB
+ * BTM_ERR_PROCESSING if err initiating the command
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_StartDiscovery (tBTM_CMPL_CB *p_cmpl_cb,
BD_ADDR_PTR p_rem_addr);
/*******************************************************************************
-**
-** Function BTM_FindAttribute
-**
-** Description This function is called by an application (or profile)
-** when it wants to see if an attribute exists in the BTM
-** discovery database.
-**
-** Returns Pointer to matching record, or NULL
-**
-*******************************************************************************/
+ *
+ * Function BTM_FindAttribute
+ *
+ * Description This function is called by an application (or profile)
+ * when it wants to see if an attribute exists in the BTM
+ * discovery database.
+ *
+ * Returns Pointer to matching record, or NULL
+ *
+ ******************************************************************************/
extern tSDP_DISC_REC *BTM_FindAttribute (uint16_t attr_id,
tSDP_DISC_REC *p_start_rec);
/*******************************************************************************
-**
-** Function BTM_FindService
-**
-** Description This function is called by an application (or profile)
-** when it wants to see if a service exists in the BTM
-** discovery database.
-**
-** Returns Pointer to matching record, or NULL
-**
-*******************************************************************************/
+ *
+ * Function BTM_FindService
+ *
+ * Description This function is called by an application (or profile)
+ * when it wants to see if a service exists in the BTM
+ * discovery database.
+ *
+ * Returns Pointer to matching record, or NULL
+ *
+ ******************************************************************************/
extern tSDP_DISC_REC *BTM_FindService (uint16_t service_uuid,
tSDP_DISC_REC *p_start_rec);
/*******************************************************************************
-**
-** Function BTM_SetDiscoveryParams
-**
-** Description This function is called to set the BTM default discovery parameters.
-** These UUID and attribute filters are used during the call to
-** BTM_StartDiscovery.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetDiscoveryParams
+ *
+ * Description This function is called to set the BTM default discovery parameters.
+ * These UUID and attribute filters are used during the call to
+ * BTM_StartDiscovery.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_SetDiscoveryParams (uint16_t num_uuid, tSDP_UUID *p_uuid_list,
uint16_t num_attr, uint16_t *p_attr_list);
/*****************************************************************************
-** ACL CHANNEL MANAGEMENT FUNCTIONS
-*****************************************************************************/
+ * ACL CHANNEL MANAGEMENT FUNCTIONS
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function BTM_SetLinkPolicy
-**
-** Description Create and send HCI "Write Policy Set" command
-**
-** Returns BTM_CMD_STARTED if successfully initiated, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetLinkPolicy
+ *
+ * Description Create and send HCI "Write Policy Set" command
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetLinkPolicy (BD_ADDR remote_bda,
uint16_t *settings);
/*******************************************************************************
-**
-** Function BTM_SetDefaultLinkPolicy
-**
-** Description Set the default value for HCI "Write Policy Set" command
-** to use when an ACL link is created.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetDefaultLinkPolicy
+ *
+ * Description Set the default value for HCI "Write Policy Set" command
+ * to use when an ACL link is created.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_SetDefaultLinkPolicy (uint16_t settings);
/*******************************************************************************
-**
-** Function BTM_SetDefaultLinkSuperTout
-**
-** Description Set the default value for HCI "Write Link Supervision Timeout"
-** command to use when an ACL link is created.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetDefaultLinkSuperTout
+ *
+ * Description Set the default value for HCI "Write Link Supervision Timeout"
+ * command to use when an ACL link is created.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_SetDefaultLinkSuperTout (uint16_t timeout);
/*******************************************************************************
-**
-** Function BTM_SetLinkSuperTout
-**
-** Description Create and send HCI "Write Link Supervision Timeout" command
-**
-** Returns BTM_CMD_STARTED if successfully initiated, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetLinkSuperTout
+ *
+ * Description Create and send HCI "Write Link Supervision Timeout" command
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetLinkSuperTout (BD_ADDR remote_bda,
uint16_t timeout);
/*******************************************************************************
-**
-** Function BTM_GetLinkSuperTout
-**
-** Description Read the link supervision timeout value of the connection
-**
-** Returns status of the operation
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetLinkSuperTout
+ *
+ * Description Read the link supervision timeout value of the connection
+ *
+ * Returns status of the operation
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_GetLinkSuperTout (BD_ADDR remote_bda,
uint16_t *p_timeout);
/*******************************************************************************
-**
-** Function BTM_IsAclConnectionUp
-**
-** Description This function is called to check if an ACL connection exists
-** to a specific remote BD Address.
-**
-** Returns true if connection is up, else false.
-**
-*******************************************************************************/
+ *
+ * Function BTM_IsAclConnectionUp
+ *
+ * Description This function is called to check if an ACL connection exists
+ * to a specific remote BD Address.
+ *
+ * Returns true if connection is up, else false.
+ *
+ ******************************************************************************/
extern bool BTM_IsAclConnectionUp (BD_ADDR remote_bda, tBT_TRANSPORT transport);
/*******************************************************************************
-**
-** Function BTM_GetRole
-**
-** Description This function is called to get the role of the local device
-** for the ACL connection with the specified remote device
-**
-** Returns BTM_SUCCESS if connection exists.
-** BTM_UNKNOWN_ADDR if no active link with bd addr specified
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetRole
+ *
+ * Description This function is called to get the role of the local device
+ * for the ACL connection with the specified remote device
+ *
+ * Returns BTM_SUCCESS if connection exists.
+ * BTM_UNKNOWN_ADDR if no active link with bd addr specified
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_GetRole (BD_ADDR remote_bd_addr, uint8_t *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
-** command was initiated, the callback function is called upon
-** completion.
-**
-** Returns BTM_SUCCESS if already in specified role.
-** BTM_CMD_STARTED if command issued to controller.
-** BTM_NO_RESOURCES if couldn't allocate memory to issue command
-** BTM_UNKNOWN_ADDR if no active link with bd addr specified
-** BTM_MODE_UNSUPPORTED if local device does not support role switching
-**
-*******************************************************************************/
+ *
+ * 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
+ * command was initiated, the callback function is called upon
+ * completion.
+ *
+ * Returns BTM_SUCCESS if already in specified role.
+ * BTM_CMD_STARTED if command issued to controller.
+ * BTM_NO_RESOURCES if couldn't allocate memory to issue command
+ * BTM_UNKNOWN_ADDR if no active link with bd addr specified
+ * BTM_MODE_UNSUPPORTED if local device does not support role switching
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SwitchRole (BD_ADDR remote_bd_addr,
uint8_t new_role,
tBTM_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function BTM_ReadRSSI
-**
-** Description This function is called to read the link policy settings.
-** The address of link policy results are returned in the callback.
-** (tBTM_RSSI_RESULTS)
-**
-** Returns BTM_CMD_STARTED if command issued to controller.
-** BTM_NO_RESOURCES if couldn't allocate memory to issue command
-** BTM_UNKNOWN_ADDR if no active link with bd addr specified
-** BTM_BUSY if command is already in progress
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRSSI
+ *
+ * Description This function is called to read the link policy settings.
+ * The address of link policy results are returned in the callback.
+ * (tBTM_RSSI_RESULTS)
+ *
+ * Returns BTM_CMD_STARTED if command issued to controller.
+ * BTM_NO_RESOURCES if couldn't allocate memory to issue command
+ * BTM_UNKNOWN_ADDR if no active link with bd addr specified
+ * BTM_BUSY if command is already in progress
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadRSSI (const BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function BTM_ReadTxPower
-**
-** 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)
-**
-** Returns BTM_CMD_STARTED if command issued to controller.
-** BTM_NO_RESOURCES if couldn't allocate memory to issue command
-** BTM_UNKNOWN_ADDR if no active link with bd addr specified
-** BTM_BUSY if command is already in progress
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadTxPower
+ *
+ * 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)
+ *
+ * Returns BTM_CMD_STARTED if command issued to controller.
+ * BTM_NO_RESOURCES if couldn't allocate memory to issue command
+ * BTM_UNKNOWN_ADDR if no active link with bd addr specified
+ * BTM_BUSY if command is already in progress
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadTxPower (BD_ADDR remote_bda,
tBT_TRANSPORT transport, tBTM_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function BTM_ReadLinkQuality
-**
-** Description This function is called to read the link quality.
-** The value of the link quality is returned in the callback.
-** (tBTM_LINK_QUALITY_RESULTS)
-**
-** Returns BTM_CMD_STARTED if command issued to controller.
-** BTM_NO_RESOURCES if couldn't allocate memory to issue command
-** BTM_UNKNOWN_ADDR if no active link with bd addr specified
-** BTM_BUSY if command is already in progress
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLinkQuality
+ *
+ * Description This function is called to read the link quality.
+ * The value of the link quality is returned in the callback.
+ * (tBTM_LINK_QUALITY_RESULTS)
+ *
+ * Returns BTM_CMD_STARTED if command issued to controller.
+ * BTM_NO_RESOURCES if couldn't allocate memory to issue command
+ * BTM_UNKNOWN_ADDR if no active link with bd addr specified
+ * BTM_BUSY if command is already in progress
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadLinkQuality (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function BTM_RegBusyLevelNotif
-**
-** Description This function is called to register a callback to receive
-** busy level change events.
-**
-** Returns BTM_SUCCESS if successfully registered, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_RegBusyLevelNotif
+ *
+ * Description This function is called to register a callback to receive
+ * busy level change events.
+ *
+ * Returns BTM_SUCCESS if successfully registered, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_RegBusyLevelNotif (tBTM_BL_CHANGE_CB *p_cb, uint8_t *p_level,
tBTM_BL_EVENT_MASK evt_mask);
/*******************************************************************************
-**
-** Function BTM_AclRegisterForChanges
-**
-** Description This function is called to register a callback to receive
-** ACL database change events, i.e. new connection or removed.
-**
-** Returns BTM_SUCCESS if successfully initiated, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_AclRegisterForChanges
+ *
+ * Description This function is called to register a callback to receive
+ * ACL database change events, i.e. new connection or removed.
+ *
+ * Returns BTM_SUCCESS if successfully initiated, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_AclRegisterForChanges (tBTM_ACL_DB_CHANGE_CB *p_cb);
/*******************************************************************************
-**
-** Function BTM_GetNumAclLinks
-**
-** Description This function is called to count the number of
-** ACL links that are active.
-**
-** Returns uint16_t Number of active ACL links
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetNumAclLinks
+ *
+ * Description This function is called to count the number of
+ * ACL links that are active.
+ *
+ * Returns uint16_t Number of active ACL links
+ *
+ ******************************************************************************/
extern uint16_t BTM_GetNumAclLinks (void);
/*******************************************************************************
-**
-** Function BTM_SetQoS
-**
-** Description This function is called to setup QoS
-**
-** Returns BTM_CMD_STARTED if successfully initiated, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetQoS
+ *
+ * Description This function is called to setup QoS
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetQoS(BD_ADDR bd, FLOW_SPEC *p_flow,
tBTM_CMPL_CB *p_cb);
/*****************************************************************************
-** (e)SCO CHANNEL MANAGEMENT FUNCTIONS
-*****************************************************************************/
+ * (e)SCO CHANNEL MANAGEMENT FUNCTIONS
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function BTM_CreateSco
-**
-** Description This function is called to create an SCO connection. If the
-** "is_orig" flag is true, the connection will be originated,
-** otherwise BTM will wait for the other side to connect.
-**
-** Returns BTM_UNKNOWN_ADDR if the ACL connection is not up
-** BTM_BUSY if another SCO being set up to
-** the same BD address
-** BTM_NO_RESOURCES if the max SCO limit has been reached
-** BTM_CMD_STARTED if the connection establishment is started.
-** In this case, "*p_sco_inx" is filled in
-** with the sco index used for the connection.
-**
-*******************************************************************************/
+ *
+ * Function BTM_CreateSco
+ *
+ * Description This function is called to create an SCO connection. If the
+ * "is_orig" flag is true, the connection will be originated,
+ * otherwise BTM will wait for the other side to connect.
+ *
+ * Returns BTM_UNKNOWN_ADDR if the ACL connection is not up
+ * BTM_BUSY if another SCO being set up to
+ * the same BD address
+ * BTM_NO_RESOURCES if the max SCO limit has been reached
+ * BTM_CMD_STARTED if the connection establishment is started.
+ * In this case, "*p_sco_inx" is filled in
+ * with the sco index used for the connection.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_CreateSco (BD_ADDR remote_bda, bool is_orig,
uint16_t pkt_types, uint16_t *p_sco_inx,
tBTM_SCO_CB *p_conn_cb,
@@ -1010,431 +1010,431 @@
/*******************************************************************************
-**
-** Function BTM_RemoveSco
-**
-** Description This function is called to remove a specific SCO connection.
-**
-** Returns BTM_CMD_STARTED if successfully initiated, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_RemoveSco
+ *
+ * Description This function is called to remove a specific SCO connection.
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_RemoveSco (uint16_t sco_inx);
/*******************************************************************************
-**
-** Function BTM_SetScoPacketTypes
-**
-** Description This function is called to set the packet types used for
-** a specific SCO connection,
-**
-** Parameters pkt_types - One or more of the following
-** BTM_SCO_PKT_TYPES_MASK_HV1
-** BTM_SCO_PKT_TYPES_MASK_HV2
-** BTM_SCO_PKT_TYPES_MASK_HV3
-** BTM_SCO_PKT_TYPES_MASK_EV3
-** BTM_SCO_PKT_TYPES_MASK_EV4
-** BTM_SCO_PKT_TYPES_MASK_EV5
-**
-** BTM_SCO_LINK_ALL_MASK - enables all supported types
-**
-** Returns BTM_CMD_STARTED if successfully initiated, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetScoPacketTypes
+ *
+ * Description This function is called to set the packet types used for
+ * a specific SCO connection,
+ *
+ * Parameters pkt_types - One or more of the following
+ * BTM_SCO_PKT_TYPES_MASK_HV1
+ * BTM_SCO_PKT_TYPES_MASK_HV2
+ * BTM_SCO_PKT_TYPES_MASK_HV3
+ * BTM_SCO_PKT_TYPES_MASK_EV3
+ * BTM_SCO_PKT_TYPES_MASK_EV4
+ * BTM_SCO_PKT_TYPES_MASK_EV5
+ *
+ * BTM_SCO_LINK_ALL_MASK - enables all supported types
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetScoPacketTypes (uint16_t sco_inx, uint16_t pkt_types);
/*******************************************************************************
-**
-** Function BTM_ReadScoPacketTypes
-**
-** Description This function is read the packet types used for a specific
-** SCO connection.
-**
-** Returns One or more of the following (bitmask)
-** BTM_SCO_PKT_TYPES_MASK_HV1
-** BTM_SCO_PKT_TYPES_MASK_HV2
-** BTM_SCO_PKT_TYPES_MASK_HV3
-** BTM_SCO_PKT_TYPES_MASK_EV3
-** BTM_SCO_PKT_TYPES_MASK_EV4
-** BTM_SCO_PKT_TYPES_MASK_EV5
-**
-** Returns packet types supported for the connection
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadScoPacketTypes
+ *
+ * Description This function is read the packet types used for a specific
+ * SCO connection.
+ *
+ * Returns One or more of the following (bitmask)
+ * BTM_SCO_PKT_TYPES_MASK_HV1
+ * BTM_SCO_PKT_TYPES_MASK_HV2
+ * BTM_SCO_PKT_TYPES_MASK_HV3
+ * BTM_SCO_PKT_TYPES_MASK_EV3
+ * BTM_SCO_PKT_TYPES_MASK_EV4
+ * BTM_SCO_PKT_TYPES_MASK_EV5
+ *
+ * Returns packet types supported for the connection
+ *
+ ******************************************************************************/
extern uint16_t BTM_ReadScoPacketTypes (uint16_t sco_inx);
/*******************************************************************************
-**
-** Function BTM_ReadDeviceScoPacketTypes
-**
-** Description This function is read the SCO packet types that
-** the device supports.
-**
-** Returns packet types supported by the device.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadDeviceScoPacketTypes
+ *
+ * Description This function is read the SCO packet types that
+ * the device supports.
+ *
+ * Returns packet types supported by the device.
+ *
+ ******************************************************************************/
extern uint16_t BTM_ReadDeviceScoPacketTypes (void);
/*******************************************************************************
-**
-** Function BTM_ReadScoHandle
-**
-** Description This function is used to read the HCI handle used for a specific
-** SCO connection,
-**
-** Returns handle for the connection, or 0xFFFF if invalid SCO index.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadScoHandle
+ *
+ * Description This function is used to read the HCI handle used for a specific
+ * SCO connection,
+ *
+ * Returns handle for the connection, or 0xFFFF if invalid SCO index.
+ *
+ ******************************************************************************/
extern uint16_t BTM_ReadScoHandle (uint16_t sco_inx);
/*******************************************************************************
-**
-** Function BTM_ReadScoBdAddr
-**
-** Description This function is read the remote BD Address for a specific
-** SCO connection,
-**
-** Returns pointer to BD address or NULL if not known
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadScoBdAddr
+ *
+ * Description This function is read the remote BD Address for a specific
+ * SCO connection,
+ *
+ * Returns pointer to BD address or NULL if not known
+ *
+ ******************************************************************************/
extern uint8_t *BTM_ReadScoBdAddr (uint16_t sco_inx);
/*******************************************************************************
-**
-** Function BTM_ReadScoDiscReason
-**
-** Description This function is returns the reason why an (e)SCO connection
-** has been removed. It contains the value until read, or until
-** another (e)SCO connection has disconnected.
-**
-** Returns HCI reason or BTM_INVALID_SCO_DISC_REASON if not set.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadScoDiscReason
+ *
+ * Description This function is returns the reason why an (e)SCO connection
+ * has been removed. It contains the value until read, or until
+ * another (e)SCO connection has disconnected.
+ *
+ * Returns HCI reason or BTM_INVALID_SCO_DISC_REASON if not set.
+ *
+ ******************************************************************************/
extern uint16_t BTM_ReadScoDiscReason (void);
/*******************************************************************************
-**
-** Function BTM_SetEScoMode
-**
-** Description This function sets up the negotiated parameters for SCO or
-** eSCO, and sets as the default mode used for calls to
-** BTM_CreateSco. It can be called only when there are no
-** active (e)SCO links.
-**
-** Returns BTM_SUCCESS if the successful.
-** BTM_BUSY if there are one or more active (e)SCO links.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetEScoMode
+ *
+ * Description This function sets up the negotiated parameters for SCO or
+ * eSCO, and sets as the default mode used for calls to
+ * BTM_CreateSco. It can be called only when there are no
+ * active (e)SCO links.
+ *
+ * Returns BTM_SUCCESS if the successful.
+ * BTM_BUSY if there are one or more active (e)SCO links.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetEScoMode (tBTM_SCO_TYPE sco_mode,
tBTM_ESCO_PARAMS *p_parms);
/*******************************************************************************
-**
-** Function BTM_SetWBSCodec
-**
-** Description This function sends command to the controller to setup
-** WBS codec for the upcoming eSCO connection.
-**
-** Returns BTM_SUCCESS.
-**
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetWBSCodec
+ *
+ * Description This function sends command to the controller to setup
+ * WBS codec for the upcoming eSCO connection.
+ *
+ * Returns BTM_SUCCESS.
+ *
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
/*******************************************************************************
-**
-** Function BTM_RegForEScoEvts
-**
-** Description This function registers a SCO event callback with the
-** specified instance. It should be used to received
-** connection indication events and change of link parameter
-** events.
-**
-** Returns BTM_SUCCESS if the successful.
-** BTM_ILLEGAL_VALUE if there is an illegal sco_inx
-**
-*******************************************************************************/
+ *
+ * Function BTM_RegForEScoEvts
+ *
+ * Description This function registers a SCO event callback with the
+ * specified instance. It should be used to received
+ * connection indication events and change of link parameter
+ * events.
+ *
+ * Returns BTM_SUCCESS if the successful.
+ * BTM_ILLEGAL_VALUE if there is an illegal sco_inx
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_RegForEScoEvts (uint16_t sco_inx,
tBTM_ESCO_CBACK *p_esco_cback);
/*******************************************************************************
-**
-** Function BTM_ReadEScoLinkParms
-**
-** Description This function returns the current eSCO link parameters for
-** the specified handle. This can be called anytime a connection
-** is active, but is typically called after receiving the SCO
-** opened callback.
-**
-** Note: If called over a 1.1 controller, only the packet types
-** field has meaning.
-** Note: If the upper layer doesn't know the current sco index,
-** BTM_FIRST_ACTIVE_SCO_INDEX can be used as the first parameter to
-** find the first active SCO index
-**
-** Returns BTM_SUCCESS if returned data is valid connection.
-** BTM_ILLEGAL_VALUE if no connection for specified sco_inx.
-** BTM_MODE_UNSUPPORTED if local controller does not support
-** 1.2 specification.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadEScoLinkParms
+ *
+ * Description This function returns the current eSCO link parameters for
+ * the specified handle. This can be called anytime a connection
+ * is active, but is typically called after receiving the SCO
+ * opened callback.
+ *
+ * Note: If called over a 1.1 controller, only the packet types
+ * field has meaning.
+ * Note: If the upper layer doesn't know the current sco index,
+ * BTM_FIRST_ACTIVE_SCO_INDEX can be used as the first parameter to
+ * find the first active SCO index
+ *
+ * Returns BTM_SUCCESS if returned data is valid connection.
+ * BTM_ILLEGAL_VALUE if no connection for specified sco_inx.
+ * BTM_MODE_UNSUPPORTED if local controller does not support
+ * 1.2 specification.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadEScoLinkParms (uint16_t sco_inx,
tBTM_ESCO_DATA *p_parms);
/*******************************************************************************
-**
-** Function BTM_ChangeEScoLinkParms
-**
-** Description This function requests renegotiation of the parameters on
-** the current eSCO Link. If any of the changes are accepted
-** by the controllers, the BTM_ESCO_CHG_EVT event is sent in
-** the tBTM_ESCO_CBACK function with the current settings of
-** the link. The callback is registered through the call to
-** BTM_SetEScoMode.
-**
-**
-** Returns BTM_CMD_STARTED if command is successfully initiated.
-** BTM_ILLEGAL_VALUE if no connection for specified sco_inx.
-** BTM_NO_RESOURCES - not enough resources to initiate command.
-** BTM_MODE_UNSUPPORTED if local controller does not support
-** 1.2 specification.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ChangeEScoLinkParms
+ *
+ * Description This function requests renegotiation of the parameters on
+ * the current eSCO Link. If any of the changes are accepted
+ * by the controllers, the BTM_ESCO_CHG_EVT event is sent in
+ * the tBTM_ESCO_CBACK function with the current settings of
+ * the link. The callback is registered through the call to
+ * BTM_SetEScoMode.
+ *
+ *
+ * Returns BTM_CMD_STARTED if command is successfully initiated.
+ * BTM_ILLEGAL_VALUE if no connection for specified sco_inx.
+ * BTM_NO_RESOURCES - not enough resources to initiate command.
+ * BTM_MODE_UNSUPPORTED if local controller does not support
+ * 1.2 specification.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ChangeEScoLinkParms (uint16_t sco_inx,
tBTM_CHG_ESCO_PARAMS *p_parms);
/*******************************************************************************
-**
-** Function BTM_EScoConnRsp
-**
-** Description This function is called upon receipt of an (e)SCO connection
-** request event (BTM_ESCO_CONN_REQ_EVT) to accept or reject
-** the request. Parameters used to negotiate eSCO links.
-** If p_parms is NULL, then values set through BTM_SetEScoMode
-** are used.
-** If the link type of the incoming request is SCO, then only
-** 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
-**
-*******************************************************************************/
+ *
+ * Function BTM_EScoConnRsp
+ *
+ * Description This function is called upon receipt of an (e)SCO connection
+ * request event (BTM_ESCO_CONN_REQ_EVT) to accept or reject
+ * the request. Parameters used to negotiate eSCO links.
+ * If p_parms is NULL, then values set through BTM_SetEScoMode
+ * are used.
+ * If the link type of the incoming request is SCO, then only
+ * 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
+ *
+ ******************************************************************************/
extern void BTM_EScoConnRsp (uint16_t sco_inx, uint8_t hci_status,
tBTM_ESCO_PARAMS *p_parms);
/*******************************************************************************
-**
-** Function BTM_GetNumScoLinks
-**
-** Description This function returns the number of active SCO links.
-**
-** Returns uint8_t
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetNumScoLinks
+ *
+ * Description This function returns the number of active SCO links.
+ *
+ * Returns uint8_t
+ *
+ ******************************************************************************/
extern uint8_t BTM_GetNumScoLinks (void);
/*****************************************************************************
-** SECURITY MANAGEMENT FUNCTIONS
-*****************************************************************************/
+ * SECURITY MANAGEMENT FUNCTIONS
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function BTM_SecRegister
-**
-** Description Application manager calls this function to register for
-** security services. There can be one and only one application
-** saving link keys. BTM allows only first registration.
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecRegister
+ *
+ * Description Application manager calls this function to register for
+ * security services. There can be one and only one application
+ * saving link keys. BTM allows only first registration.
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
extern bool BTM_SecRegister (tBTM_APPL_INFO *p_cb_info);
/*******************************************************************************
-**
-** Function BTM_SecRegisterLinkKeyNotificationCallback
-**
-** Description Profiles can register to be notified when a new Link Key
-** is generated per connection.
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecRegisterLinkKeyNotificationCallback
+ *
+ * Description Profiles can register to be notified when a new Link Key
+ * is generated per connection.
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
extern bool BTM_SecRegisterLinkKeyNotificationCallback(
tBTM_LINK_KEY_CALLBACK *p_callback);
/*******************************************************************************
-**
-** Function BTM_SecAddRmtNameNotifyCallback
-**
-** Description Profiles can register to be notified when name of the
-** remote device is resolved (up to BTM_SEC_MAX_RMT_NAME_CALLBACKS).
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecAddRmtNameNotifyCallback
+ *
+ * Description Profiles can register to be notified when name of the
+ * remote device is resolved (up to BTM_SEC_MAX_RMT_NAME_CALLBACKS).
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
extern bool BTM_SecAddRmtNameNotifyCallback (tBTM_RMT_NAME_CALLBACK *p_callback);
/*******************************************************************************
-**
-** Function BTM_SecDeleteRmtNameNotifyCallback
-**
-** Description A profile can deregister notification when a new Link Key
-** is generated per connection.
-**
-** Returns true if OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecDeleteRmtNameNotifyCallback
+ *
+ * Description A profile can deregister notification when a new Link Key
+ * is generated per connection.
+ *
+ * Returns true if OK, else false
+ *
+ ******************************************************************************/
extern bool BTM_SecDeleteRmtNameNotifyCallback (tBTM_RMT_NAME_CALLBACK *p_callback);
/*******************************************************************************
-**
-** Function BTM_GetSecurityFlags
-**
-** Description Get security flags for the device
-**
-** Returns bool true or false is device found
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetSecurityFlags
+ *
+ * Description Get security flags for the device
+ *
+ * Returns bool true or false is device found
+ *
+ ******************************************************************************/
extern bool BTM_GetSecurityFlags (BD_ADDR bd_addr, uint8_t * p_sec_flags);
/*******************************************************************************
-**
-** Function BTM_GetSecurityFlagsByTransport
-**
-** Description Get security flags for the device on a particular transport
-**
-** Parameters bd_addr: BD address of remote device
-** p_sec_flags : Out parameter to be filled with security flags for the connection
-** transport : Physical transport of the connection (BR/EDR or LE)
-**
-** Returns bool true or false is device found
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetSecurityFlagsByTransport
+ *
+ * Description Get security flags for the device on a particular transport
+ *
+ * Parameters bd_addr: BD address of remote device
+ * p_sec_flags : Out parameter to be filled with security flags for the connection
+ * transport : Physical transport of the connection (BR/EDR or LE)
+ *
+ * Returns bool true or false is device found
+ *
+ ******************************************************************************/
extern bool BTM_GetSecurityFlagsByTransport (BD_ADDR bd_addr,
uint8_t * p_sec_flags, tBT_TRANSPORT transport);
/*******************************************************************************
-**
-** Function BTM_ReadTrustedMask
-**
-** Description Get trusted mask for the device
-**
-** Returns NULL, if the device record is not found.
-** otherwise, the trusted mask
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadTrustedMask
+ *
+ * Description Get trusted mask for the device
+ *
+ * Returns NULL, if the device record is not found.
+ * otherwise, the trusted mask
+ *
+ ******************************************************************************/
extern uint32_t * BTM_ReadTrustedMask (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_SetPinType
-**
-** Description Set PIN type for the device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPinType
+ *
+ * Description Set PIN type for the device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_SetPinType (uint8_t pin_type, PIN_CODE pin_code, uint8_t pin_code_len);
/*******************************************************************************
-**
-** Function BTM_SetPairableMode
-**
-** Description Enable or disable pairing
-**
-** Parameters allow_pairing - (true or false) whether or not the device
-** allows pairing.
-** connect_only_paired - (true or false) whether or not to
-** only allow paired devices to connect.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPairableMode
+ *
+ * Description Enable or disable pairing
+ *
+ * Parameters allow_pairing - (true or false) whether or not the device
+ * allows pairing.
+ * connect_only_paired - (true or false) whether or not to
+ * only allow paired devices to connect.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_SetPairableMode (bool allow_pairing, bool connect_only_paired);
/*******************************************************************************
-**
-** Function BTM_SetSecureConnectionsOnly
-**
-** Description Enable or disable default treatment for Mode 4 Level 0 services
-**
-** Parameter secure_connections_only_mode - (true or false)
-** true means that the device should treat Mode 4 Level 0 services as
-** services of other levels.
-** false means that the device should provide default treatment for
-** Mode 4 Level 0 services.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetSecureConnectionsOnly
+ *
+ * Description Enable or disable default treatment for Mode 4 Level 0 services
+ *
+ * Parameter secure_connections_only_mode - (true or false)
+ * true means that the device should treat Mode 4 Level 0 services as
+ * services of other levels.
+ * false means that the device should provide default treatment for
+ * Mode 4 Level 0 services.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_SetSecureConnectionsOnly (bool secure_connections_only_mode);
/*******************************************************************************
-**
-** Function BTM_SetSecurityLevel
-**
-** Description Register service security level with Security Manager. Each
-** service must register its requirements regardless of the
-** security level that is used. This API is called once for originators
-** nad again for acceptors of connections.
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetSecurityLevel
+ *
+ * Description Register service security level with Security Manager. Each
+ * service must register its requirements regardless of the
+ * security level that is used. This API is called once for originators
+ * nad again for acceptors of connections.
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
extern bool BTM_SetSecurityLevel (bool is_originator, const char *p_name,
uint8_t service_id, uint16_t sec_level,
uint16_t psm, uint32_t mx_proto_id,
uint32_t mx_chan_id);
/*******************************************************************************
-**
-** Function BTM_SetOutService
-**
-** Description This function is called to set the service for
-** outgoing connection.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetOutService
+ *
+ * Description This function is called to set the service for
+ * outgoing connection.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_SetOutService(BD_ADDR bd_addr, uint8_t service_id, uint32_t mx_chan_id);
/*******************************************************************************
-**
-** Function BTM_SecClrService
-**
-** Description Removes specified service record(s) from the security database.
-** All service records with the specified name are removed.
-** Typically used only by devices with limited RAM so that it can
-** reuse an old security service record.
-** records (except SDP).
-**
-** Returns Number of records that were freed.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecClrService
+ *
+ * Description Removes specified service record(s) from the security database.
+ * All service records with the specified name are removed.
+ * Typically used only by devices with limited RAM so that it can
+ * reuse an old security service record.
+ * records (except SDP).
+ *
+ * Returns Number of records that were freed.
+ *
+ ******************************************************************************/
extern uint8_t BTM_SecClrService (uint8_t service_id);
/*******************************************************************************
-**
-** Function BTM_SecAddDevice
-**
-** Description Add/modify device. This function will be normally called
-** during host startup to restore all required information
-** stored in the NVRAM.
-** dev_class, bd_name, link_key, and features are NULL if unknown
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecAddDevice
+ *
+ * Description Add/modify device. This function will be normally called
+ * during host startup to restore all required information
+ * stored in the NVRAM.
+ * dev_class, bd_name, link_key, and features are NULL if unknown
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
extern bool BTM_SecAddDevice (BD_ADDR bd_addr, DEV_CLASS dev_class,
BD_NAME bd_name, uint8_t *features,
uint32_t trusted_mask[], LINK_KEY link_key,
@@ -1442,652 +1442,652 @@
/*******************************************************************************
-**
-** Function BTM_SecDeleteDevice
-**
-** Description Free resources associated with the device.
-**
-** Returns true if rmoved OK, false if not found
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecDeleteDevice
+ *
+ * Description Free resources associated with the device.
+ *
+ * Returns true if rmoved OK, false if not found
+ *
+ ******************************************************************************/
extern bool BTM_SecDeleteDevice (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_SecClearSecurityFlags
-**
-** Description Reset the security flags (mark as not-paired) for a given
-** remove device.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecClearSecurityFlags
+ *
+ * Description Reset the security flags (mark as not-paired) for a given
+ * remove device.
+ *
+ ******************************************************************************/
extern void BTM_SecClearSecurityFlags (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_SecGetDeviceLinkKey
-**
-** Description This function is called to obtain link key for the device
-** it returns BTM_SUCCESS if link key is available, or
-** BTM_UNKNOWN_ADDR if Security Manager does not know about
-** the device or device record does not contain link key info
-**
-** Returns BTM_SUCCESS if successful, otherwise error code
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecGetDeviceLinkKey
+ *
+ * Description This function is called to obtain link key for the device
+ * it returns BTM_SUCCESS if link key is available, or
+ * BTM_UNKNOWN_ADDR if Security Manager does not know about
+ * the device or device record does not contain link key info
+ *
+ * Returns BTM_SUCCESS if successful, otherwise error code
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SecGetDeviceLinkKey (BD_ADDR bd_addr,
LINK_KEY link_key);
/*******************************************************************************
-**
-** Function BTM_SecGetDeviceLinkKeyType
-**
-** Description This function is called to obtain link key type for the
-** device.
-** it returns BTM_SUCCESS if link key is available, or
-** BTM_UNKNOWN_ADDR if Security Manager does not know about
-** the device or device record does not contain link key info
-**
-** Returns BTM_LKEY_TYPE_IGNORE if link key is unknown, link type
-** otherwise.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecGetDeviceLinkKeyType
+ *
+ * Description This function is called to obtain link key type for the
+ * device.
+ * it returns BTM_SUCCESS if link key is available, or
+ * BTM_UNKNOWN_ADDR if Security Manager does not know about
+ * the device or device record does not contain link key info
+ *
+ * Returns BTM_LKEY_TYPE_IGNORE if link key is unknown, link type
+ * otherwise.
+ *
+ ******************************************************************************/
extern tBTM_LINK_KEY_TYPE BTM_SecGetDeviceLinkKeyType (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_PINCodeReply
-**
-** Description This function is called after Security Manager submitted
-** PIN code request to the UI.
-**
-** Parameters: bd_addr - Address of the device for which PIN was requested
-** res - result of the operation BTM_SUCCESS if success
-** pin_len - length in bytes of the PIN Code
-** p_pin - pointer to array with the PIN Code
-** trusted_mask - bitwise OR of trusted services (array of uint32_t)
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_PINCodeReply
+ *
+ * Description This function is called after Security Manager submitted
+ * PIN code request to the UI.
+ *
+ * Parameters: bd_addr - Address of the device for which PIN was requested
+ * res - result of the operation BTM_SUCCESS if success
+ * pin_len - length in bytes of the PIN Code
+ * p_pin - pointer to array with the PIN Code
+ * trusted_mask - bitwise OR of trusted services (array of uint32_t)
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_PINCodeReply (BD_ADDR bd_addr, uint8_t res, uint8_t pin_len,
uint8_t *p_pin, uint32_t trusted_mask[]);
/*******************************************************************************
-**
-** Function BTM_SecBond
-**
-** Description This function is called to perform bonding with peer device.
-**
-** Parameters: bd_addr - Address of the device to bond
-** pin_len - length in bytes of the PIN Code
-** p_pin - pointer to array with the PIN Code
-** trusted_mask - bitwise OR of trusted services (array of uint32_t)
+ *
+ * Function BTM_SecBond
+ *
+ * Description This function is called to perform bonding with peer device.
+ *
+ * Parameters: bd_addr - Address of the device to bond
+ * pin_len - length in bytes of the PIN Code
+ * p_pin - pointer to array with the PIN Code
+ * trusted_mask - bitwise OR of trusted services (array of uint32_t)
-** Returns BTM_CMD_STARTED if successfully initiated, otherwise error
-**
-*******************************************************************************/
+ * Returns BTM_CMD_STARTED if successfully initiated, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SecBond (BD_ADDR bd_addr,
uint8_t pin_len, uint8_t *p_pin,
uint32_t trusted_mask[]);
/*******************************************************************************
-**
-** Function BTM_SecBondByTransport
-**
-** Description This function is called to perform bonding by designated transport
-**
-** Parameters: bd_addr - Address of the device to bond
-** pin_len - length in bytes of the PIN Code
-** p_pin - pointer to array with the PIN Code
-** trusted_mask - bitwise OR of trusted services (array of uint32_t)
-** transport : Physical transport to use for bonding (BR/EDR or LE)
-**
-** Returns BTM_CMD_STARTED if successfully initiated, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecBondByTransport
+ *
+ * Description This function is called to perform bonding by designated transport
+ *
+ * Parameters: bd_addr - Address of the device to bond
+ * pin_len - length in bytes of the PIN Code
+ * p_pin - pointer to array with the PIN Code
+ * trusted_mask - bitwise OR of trusted services (array of uint32_t)
+ * transport : Physical transport to use for bonding (BR/EDR or LE)
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SecBondByTransport (BD_ADDR bd_addr,
tBT_TRANSPORT transport,
uint8_t pin_len, uint8_t *p_pin,
uint32_t trusted_mask[]);
/*******************************************************************************
-**
-** Function BTM_SecBondCancel
-**
-** Description This function is called to cancel ongoing bonding process
-** with peer device.
-**
-** Returns BTM_CMD_STARTED if successfully initiated, otherwise error
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecBondCancel
+ *
+ * Description This function is called to cancel ongoing bonding process
+ * with peer device.
+ *
+ * Returns BTM_CMD_STARTED if successfully initiated, otherwise error
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SecBondCancel (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_SetEncryption
-**
-** Description This function is called to ensure that 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.
-**
-** Parameters: bd_addr - Address of the peer device
-** transport - Link transport
-** p_callback - Pointer to callback function called if
-** this function returns PENDING after required
-** procedures are completed. Can be set to NULL
-** if status is not desired.
-** p_ref_data - pointer to any data the caller wishes to receive
-** in the callback function upon completion.
-** can be set to NULL if not used.
-** sec_act - LE security action, unused for BR/EDR
-**
-** Returns BTM_SUCCESS - already encrypted
-** BTM_PENDING - command will be returned in the callback
-** BTM_WRONG_MODE- connection not up.
-** BTM_BUSY - security procedures are currently active
-** BTM_MODE_UNSUPPORTED - if security manager not linked in.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetEncryption
+ *
+ * Description This function is called to ensure that 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.
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * transport - Link transport
+ * p_callback - Pointer to callback function called if
+ * this function returns PENDING after required
+ * procedures are completed. Can be set to NULL
+ * if status is not desired.
+ * p_ref_data - pointer to any data the caller wishes to receive
+ * in the callback function upon completion.
+ * can be set to NULL if not used.
+ * sec_act - LE security action, unused for BR/EDR
+ *
+ * Returns BTM_SUCCESS - already encrypted
+ * BTM_PENDING - command will be returned in the callback
+ * BTM_WRONG_MODE- connection not up.
+ * BTM_BUSY - security procedures are currently active
+ * BTM_MODE_UNSUPPORTED - if security manager not linked in.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetEncryption (BD_ADDR bd_addr, tBT_TRANSPORT transport,
tBTM_SEC_CBACK *p_callback,
void *p_ref_data, tBTM_BLE_SEC_ACT sec_act);
/*******************************************************************************
-**
-** Function BTM_ConfirmReqReply
-**
-** Description This function is called to confirm the numeric value for
-** Simple Pairing in response to BTM_SP_CFM_REQ_EVT
-**
-** Parameters: res - result of the operation BTM_SUCCESS if success
-** bd_addr - Address of the peer device
-**
-*******************************************************************************/
+ *
+ * Function BTM_ConfirmReqReply
+ *
+ * Description This function is called to confirm the numeric value for
+ * Simple Pairing in response to BTM_SP_CFM_REQ_EVT
+ *
+ * Parameters: res - result of the operation BTM_SUCCESS if success
+ * bd_addr - Address of the peer device
+ *
+ ******************************************************************************/
extern void BTM_ConfirmReqReply(tBTM_STATUS res, BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_PasskeyReqReply
-**
-** Description This function is called to provide the passkey for
-** Simple Pairing in response to BTM_SP_KEY_REQ_EVT
-**
-** Parameters: res - result of the operation BTM_SUCCESS if success
-** bd_addr - Address of the peer device
-** passkey - numeric value in the range of 0 - 999999(0xF423F).
-**
-*******************************************************************************/
+ *
+ * Function BTM_PasskeyReqReply
+ *
+ * Description This function is called to provide the passkey for
+ * Simple Pairing in response to BTM_SP_KEY_REQ_EVT
+ *
+ * Parameters: res - result of the operation BTM_SUCCESS if success
+ * bd_addr - Address of the peer device
+ * passkey - numeric value in the range of 0 - 999999(0xF423F).
+ *
+ ******************************************************************************/
extern void BTM_PasskeyReqReply(tBTM_STATUS res, BD_ADDR bd_addr, uint32_t passkey);
/*******************************************************************************
-**
-** Function BTM_SendKeypressNotif
-**
-** Description This function is used during the passkey entry model
-** by a device with KeyboardOnly IO capabilities
-** (very likely to be a HID Device).
-** It is called by a HID Device to inform the remote device when
-** a key has been entered or erased.
-**
-** Parameters: bd_addr - Address of the peer device
-** type - notification type
-**
-*******************************************************************************/
+ *
+ * Function BTM_SendKeypressNotif
+ *
+ * Description This function is used during the passkey entry model
+ * by a device with KeyboardOnly IO capabilities
+ * (very likely to be a HID Device).
+ * It is called by a HID Device to inform the remote device when
+ * a key has been entered or erased.
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * type - notification type
+ *
+ ******************************************************************************/
extern void BTM_SendKeypressNotif(BD_ADDR bd_addr, tBTM_SP_KEY_TYPE type);
/*******************************************************************************
-**
-** Function BTM_IoCapRsp
-**
-** Description This function is called in response to BTM_SP_IO_REQ_EVT
-** When the event data io_req.oob_data is set to BTM_OOB_UNKNOWN
-** by the tBTM_SP_CALLBACK implementation, this function is
-** called to provide the actual response
-**
-** Parameters: bd_addr - Address of the peer device
-** io_cap - The IO capability of local device.
-** oob - BTM_OOB_NONE or BTM_OOB_PRESENT.
-** auth_req- MITM protection required or not.
-**
-*******************************************************************************/
+ *
+ * Function BTM_IoCapRsp
+ *
+ * Description This function is called in response to BTM_SP_IO_REQ_EVT
+ * When the event data io_req.oob_data is set to BTM_OOB_UNKNOWN
+ * by the tBTM_SP_CALLBACK implementation, this function is
+ * called to provide the actual response
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * io_cap - The IO capability of local device.
+ * oob - BTM_OOB_NONE or BTM_OOB_PRESENT.
+ * auth_req- MITM protection required or not.
+ *
+ ******************************************************************************/
extern void BTM_IoCapRsp(BD_ADDR bd_addr, tBTM_IO_CAP io_cap,
tBTM_OOB_DATA oob, tBTM_AUTH_REQ auth_req);
/*******************************************************************************
-**
-** Function BTM_ReadLocalOobData
-**
-** Description This function is called to read the local OOB data from
-** LM
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadLocalOobData
+ *
+ * Description This function is called to read the local OOB data from
+ * LM
+ *
+ ******************************************************************************/
extern void BTM_ReadLocalOobData(void);
/*******************************************************************************
-**
-** Function BTM_RemoteOobDataReply
-**
-** Description This function is called to provide the remote OOB data for
-** Simple Pairing in response to BTM_SP_RMT_OOB_EVT
-**
-** Parameters: bd_addr - Address of the peer device
-** c - simple pairing Hash C.
-** r - simple pairing Randomizer C.
-**
-*******************************************************************************/
+ *
+ * Function BTM_RemoteOobDataReply
+ *
+ * Description This function is called to provide the remote OOB data for
+ * Simple Pairing in response to BTM_SP_RMT_OOB_EVT
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * c - simple pairing Hash C.
+ * r - simple pairing Randomizer C.
+ *
+ ******************************************************************************/
extern void BTM_RemoteOobDataReply(tBTM_STATUS res, BD_ADDR bd_addr,
BT_OCTET16 c, BT_OCTET16 r);
/*******************************************************************************
-**
-** Function BTM_BuildOobData
-**
-** Description This function is called to build the OOB data payload to
-** be sent over OOB (non-Bluetooth) link
-**
-** Parameters: p_data - the location for OOB data
-** max_len - p_data size.
-** c - simple pairing Hash C.
-** r - simple pairing Randomizer C.
-** name_len- 0, local device name would not be included.
-** otherwise, the local device name is included for
-** up to this specified length
-**
-** Returns Number of bytes in p_data.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BuildOobData
+ *
+ * Description This function is called to build the OOB data payload to
+ * be sent over OOB (non-Bluetooth) link
+ *
+ * Parameters: p_data - the location for OOB data
+ * max_len - p_data size.
+ * c - simple pairing Hash C.
+ * r - simple pairing Randomizer C.
+ * name_len- 0, local device name would not be included.
+ * otherwise, the local device name is included for
+ * up to this specified length
+ *
+ * Returns Number of bytes in p_data.
+ *
+ ******************************************************************************/
extern uint16_t BTM_BuildOobData(uint8_t *p_data, uint16_t max_len, BT_OCTET16 c,
BT_OCTET16 r, uint8_t name_len);
/*******************************************************************************
-**
-** Function BTM_BothEndsSupportSecureConnections
-**
-** Description This function is called to check if both the local device and the peer device
-** specified by bd_addr support BR/EDR Secure Connections.
-**
-** Parameters: bd_addr - address of the peer
-**
-** Returns true if BR/EDR Secure Connections are supported by both local
-** and the remote device.
-** else false.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BothEndsSupportSecureConnections
+ *
+ * Description This function is called to check if both the local device and the peer device
+ * specified by bd_addr support BR/EDR Secure Connections.
+ *
+ * Parameters: bd_addr - address of the peer
+ *
+ * Returns true if BR/EDR Secure Connections are supported by both local
+ * and the remote device.
+ * else false.
+ *
+ ******************************************************************************/
extern bool BTM_BothEndsSupportSecureConnections(BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_PeerSupportsSecureConnections
-**
-** Description This function is called to check if the peer supports
-** BR/EDR Secure Connections.
-**
-** Parameters: bd_addr - address of the peer
-**
-** Returns true if BR/EDR Secure Connections are supported by the peer,
-** else false.
-**
-*******************************************************************************/
+ *
+ * Function BTM_PeerSupportsSecureConnections
+ *
+ * Description This function is called to check if the peer supports
+ * BR/EDR Secure Connections.
+ *
+ * Parameters: bd_addr - address of the peer
+ *
+ * Returns true if BR/EDR Secure Connections are supported by the peer,
+ * else false.
+ *
+ ******************************************************************************/
extern bool BTM_PeerSupportsSecureConnections(BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_ReadOobData
-**
-** 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
-** eir_tag - The associated EIR tag to read the data.
-** *p_len(output) - the length of the data with the given tag.
-**
-** Returns the beginning of the data with the given tag.
-** NULL, if the tag is not found.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadOobData
+ *
+ * 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
+ * eir_tag - The associated EIR tag to read the data.
+ * *p_len(output) - the length of the data with the given tag.
+ *
+ * Returns the beginning of the data with the given tag.
+ * NULL, if the tag is not found.
+ *
+ ******************************************************************************/
extern uint8_t * BTM_ReadOobData(uint8_t *p_data, uint8_t eir_tag, uint8_t *p_len);
/*******************************************************************************
-**
-** Function BTM_SecReadDevName
-**
-** Description Looks for the device name in the security database for the
-** specified BD address.
-**
-** Returns Pointer to the name or NULL
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecReadDevName
+ *
+ * Description Looks for the device name in the security database for the
+ * specified BD address.
+ *
+ * Returns Pointer to the name or NULL
+ *
+ ******************************************************************************/
extern char *BTM_SecReadDevName (BD_ADDR bd_addr);
/*****************************************************************************
-** POWER MANAGEMENT FUNCTIONS
-*****************************************************************************/
+ * POWER MANAGEMENT FUNCTIONS
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function BTM_PmRegister
-**
-** Description register or deregister with power manager
-**
-** Returns BTM_SUCCESS if successful,
-** BTM_NO_RESOURCES if no room to hold registration
-** BTM_ILLEGAL_VALUE
-**
-*******************************************************************************/
+ *
+ * Function BTM_PmRegister
+ *
+ * Description register or deregister with power manager
+ *
+ * Returns BTM_SUCCESS if successful,
+ * BTM_NO_RESOURCES if no room to hold registration
+ * BTM_ILLEGAL_VALUE
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_PmRegister (uint8_t mask, uint8_t *p_pm_id,
tBTM_PM_STATUS_CBACK *p_cb);
/*******************************************************************************
-**
-** Function BTM_SetPowerMode
-**
-** Description store the mode in control block or
-** alter ACL connection behavior.
-**
-** Returns BTM_SUCCESS if successful,
-** BTM_UNKNOWN_ADDR if bd addr is not active or bad
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetPowerMode
+ *
+ * Description store the mode in control block or
+ * alter ACL connection behavior.
+ *
+ * Returns BTM_SUCCESS if successful,
+ * BTM_UNKNOWN_ADDR if bd addr is not active or bad
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetPowerMode (uint8_t pm_id, BD_ADDR remote_bda,
tBTM_PM_PWR_MD *p_mode);
/*******************************************************************************
-**
-** Function BTM_ReadPowerMode
-**
-** Description This returns the current mode for a specific
-** ACL connection.
-**
-** Input Param remote_bda - device address of desired ACL connection
-**
-** Output Param p_mode - address where the current mode is copied into.
-** BTM_ACL_MODE_NORMAL
-** BTM_ACL_MODE_HOLD
-** BTM_ACL_MODE_SNIFF
-** BTM_ACL_MODE_PARK
-** (valid only if return code is BTM_SUCCESS)
-**
-** Returns BTM_SUCCESS if successful,
-** BTM_UNKNOWN_ADDR if bd addr is not active or bad
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadPowerMode
+ *
+ * Description This returns the current mode for a specific
+ * ACL connection.
+ *
+ * Input Param remote_bda - device address of desired ACL connection
+ *
+ * Output Param p_mode - address where the current mode is copied into.
+ * BTM_ACL_MODE_NORMAL
+ * BTM_ACL_MODE_HOLD
+ * BTM_ACL_MODE_SNIFF
+ * BTM_ACL_MODE_PARK
+ * (valid only if return code is BTM_SUCCESS)
+ *
+ * Returns BTM_SUCCESS if successful,
+ * BTM_UNKNOWN_ADDR if bd addr is not active or bad
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_ReadPowerMode (BD_ADDR remote_bda,
tBTM_PM_MODE *p_mode);
/*******************************************************************************
-**
-** Function BTM_SetSsrParams
-**
-** Description This sends the given SSR parameters for the given ACL
-** connection if it is in ACTIVE mode.
-**
-** Input Param remote_bda - device address of desired ACL connection
-** max_lat - maximum latency (in 0.625ms)(0-0xFFFE)
-** min_rmt_to - minimum remote timeout
-** min_loc_to - minimum local timeout
-**
-**
-** Returns BTM_SUCCESS if the HCI command is issued successful,
-** BTM_UNKNOWN_ADDR if bd addr is not active or bad
-** BTM_CMD_STORED if the command is stored
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetSsrParams
+ *
+ * Description This sends the given SSR parameters for the given ACL
+ * connection if it is in ACTIVE mode.
+ *
+ * Input Param remote_bda - device address of desired ACL connection
+ * max_lat - maximum latency (in 0.625ms)(0-0xFFFE)
+ * min_rmt_to - minimum remote timeout
+ * min_loc_to - minimum local timeout
+ *
+ *
+ * Returns BTM_SUCCESS if the HCI command is issued successful,
+ * BTM_UNKNOWN_ADDR if bd addr is not active or bad
+ * BTM_CMD_STORED if the command is stored
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetSsrParams (BD_ADDR remote_bda, uint16_t max_lat,
uint16_t min_rmt_to, uint16_t min_loc_to);
/*******************************************************************************
-**
-** Function BTM_GetHCIConnHandle
-**
-** Description This function is called to get the handle for an ACL connection
-** to a specific remote BD Address.
-**
-** Returns the handle of the connection, or 0xFFFF if none.
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetHCIConnHandle
+ *
+ * Description This function is called to get the handle for an ACL connection
+ * to a specific remote BD Address.
+ *
+ * Returns the handle of the connection, or 0xFFFF if none.
+ *
+ ******************************************************************************/
extern uint16_t BTM_GetHCIConnHandle (const BD_ADDR remote_bda, tBT_TRANSPORT transport);
/*******************************************************************************
-**
-** Function BTM_DeleteStoredLinkKey
-**
-** Description This function is called to delete link key for the specified
-** device addresses from the NVRAM storage attached to the Bluetooth
-** controller.
-**
-** Parameters: bd_addr - Addresses of the devices
-** p_cb - Call back function to be called to return
-** the results
-**
-*******************************************************************************/
+ *
+ * Function BTM_DeleteStoredLinkKey
+ *
+ * Description This function is called to delete link key for the specified
+ * device addresses from the NVRAM storage attached to the Bluetooth
+ * controller.
+ *
+ * Parameters: bd_addr - Addresses of the devices
+ * p_cb - Call back function to be called to return
+ * the results
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_DeleteStoredLinkKey(BD_ADDR bd_addr, tBTM_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function BTM_WriteEIR
-**
-** Description This function is called to write EIR data to controller.
-**
-** Parameters p_buff - allocated HCI command buffer including extended
-** inquriry response
-**
-** Returns BTM_SUCCESS - if successful
-** BTM_MODE_UNSUPPORTED - if local device cannot support it
-**
-*******************************************************************************/
+ *
+ * Function BTM_WriteEIR
+ *
+ * Description This function is called to write EIR data to controller.
+ *
+ * Parameters p_buff - allocated HCI command buffer including extended
+ * inquriry response
+ *
+ * Returns BTM_SUCCESS - if successful
+ * BTM_MODE_UNSUPPORTED - if local device cannot support it
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_WriteEIR( BT_HDR * p_buff );
/*******************************************************************************
-**
-** Function BTM_CheckEirData
-**
-** Description This function is called to get EIR data from significant part.
-**
-** Parameters p_eir - pointer of EIR significant part
-** type - finding EIR data type
-** p_length - return the length of EIR data
-**
-** Returns pointer of EIR data
-**
-*******************************************************************************/
+ *
+ * Function BTM_CheckEirData
+ *
+ * Description This function is called to get EIR data from significant part.
+ *
+ * Parameters p_eir - pointer of EIR significant part
+ * type - finding EIR data type
+ * p_length - return the length of EIR data
+ *
+ * Returns pointer of EIR data
+ *
+ ******************************************************************************/
extern uint8_t *BTM_CheckEirData( uint8_t *p_eir, uint8_t type, uint8_t *p_length );
/*******************************************************************************
-**
-** Function BTM_HasEirService
-**
-** Description This function is called to know if UUID in bit map of UUID.
-**
-** Parameters p_eir_uuid - bit map of UUID list
-** uuid16 - UUID 16-bit
-**
-** Returns true - if found
-** false - if not found
-**
-*******************************************************************************/
+ *
+ * Function BTM_HasEirService
+ *
+ * Description This function is called to know if UUID in bit map of UUID.
+ *
+ * Parameters p_eir_uuid - bit map of UUID list
+ * uuid16 - UUID 16-bit
+ *
+ * Returns true - if found
+ * false - if not found
+ *
+ ******************************************************************************/
extern bool BTM_HasEirService( uint32_t *p_eir_uuid, uint16_t uuid16 );
/*******************************************************************************
-**
-** Function BTM_HasInquiryEirService
-**
-** Description This function is called to know if UUID in bit map of UUID list.
-**
-** Parameters p_results - inquiry results
-** uuid16 - UUID 16-bit
-**
-** Returns BTM_EIR_FOUND - if found
-** BTM_EIR_NOT_FOUND - if not found and it is complete list
-** BTM_EIR_UNKNOWN - if not found and it is not complete list
-**
-*******************************************************************************/
+ *
+ * Function BTM_HasInquiryEirService
+ *
+ * Description This function is called to know if UUID in bit map of UUID list.
+ *
+ * Parameters p_results - inquiry results
+ * uuid16 - UUID 16-bit
+ *
+ * Returns BTM_EIR_FOUND - if found
+ * BTM_EIR_NOT_FOUND - if not found and it is complete list
+ * BTM_EIR_UNKNOWN - if not found and it is not complete list
+ *
+ ******************************************************************************/
extern tBTM_EIR_SEARCH_RESULT BTM_HasInquiryEirService( tBTM_INQ_RESULTS *p_results,
uint16_t uuid16 );
/*******************************************************************************
-**
-** Function BTM_AddEirService
-**
-** Description This function is called to add a service in bit map of UUID list.
-**
-** Parameters p_eir_uuid - bit mask of UUID list for EIR
-** uuid16 - UUID 16-bit
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function BTM_AddEirService
+ *
+ * Description This function is called to add a service in bit map of UUID list.
+ *
+ * Parameters p_eir_uuid - bit mask of UUID list for EIR
+ * uuid16 - UUID 16-bit
+ *
+ * Returns None
+ *
+ ******************************************************************************/
extern void BTM_AddEirService( uint32_t *p_eir_uuid, uint16_t uuid16 );
/*******************************************************************************
-**
-** Function BTM_RemoveEirService
-**
-** Description This function is called to remove a service in bit map of UUID list.
-**
-** Parameters p_eir_uuid - bit mask of UUID list for EIR
-** uuid16 - UUID 16-bit
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function BTM_RemoveEirService
+ *
+ * Description This function is called to remove a service in bit map of UUID list.
+ *
+ * Parameters p_eir_uuid - bit mask of UUID list for EIR
+ * uuid16 - UUID 16-bit
+ *
+ * Returns None
+ *
+ ******************************************************************************/
extern void BTM_RemoveEirService( uint32_t *p_eir_uuid, uint16_t uuid16 );
/*******************************************************************************
-**
-** Function BTM_GetEirSupportedServices
-**
-** Description This function is called to get UUID list from bit map of UUID list.
-**
-** Parameters p_eir_uuid - bit mask of UUID list for EIR
-** p - reference of current pointer of EIR
-** max_num_uuid16 - max number of UUID can be written in EIR
-** num_uuid16 - number of UUID have been written in EIR
-**
-** Returns BTM_EIR_MORE_16BITS_UUID_TYPE, if it has more than max
-** BTM_EIR_COMPLETE_16BITS_UUID_TYPE, otherwise
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetEirSupportedServices
+ *
+ * Description This function is called to get UUID list from bit map of UUID list.
+ *
+ * Parameters p_eir_uuid - bit mask of UUID list for EIR
+ * p - reference of current pointer of EIR
+ * max_num_uuid16 - max number of UUID can be written in EIR
+ * num_uuid16 - number of UUID have been written in EIR
+ *
+ * Returns BTM_EIR_MORE_16BITS_UUID_TYPE, if it has more than max
+ * BTM_EIR_COMPLETE_16BITS_UUID_TYPE, otherwise
+ *
+ ******************************************************************************/
extern uint8_t BTM_GetEirSupportedServices( uint32_t *p_eir_uuid, uint8_t **p,
uint8_t max_num_uuid16, uint8_t *p_num_uuid16);
/*******************************************************************************
-**
-** Function BTM_GetEirUuidList
-**
-** Description This function parses EIR and returns UUID list.
-**
-** Parameters p_eir - EIR
-** uuid_size - LEN_UUID_16, LEN_UUID_32, LEN_UUID_128
-** p_num_uuid - return number of UUID in found list
-** p_uuid_list - return UUID 16-bit list
-** max_num_uuid - maximum number of UUID to be returned
-**
-** Returns 0 - if not found
-** BTM_EIR_COMPLETE_16BITS_UUID_TYPE
-** BTM_EIR_MORE_16BITS_UUID_TYPE
-** BTM_EIR_COMPLETE_32BITS_UUID_TYPE
-** BTM_EIR_MORE_32BITS_UUID_TYPE
-** BTM_EIR_COMPLETE_128BITS_UUID_TYPE
-** BTM_EIR_MORE_128BITS_UUID_TYPE
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetEirUuidList
+ *
+ * Description This function parses EIR and returns UUID list.
+ *
+ * Parameters p_eir - EIR
+ * uuid_size - LEN_UUID_16, LEN_UUID_32, LEN_UUID_128
+ * p_num_uuid - return number of UUID in found list
+ * p_uuid_list - return UUID 16-bit list
+ * max_num_uuid - maximum number of UUID to be returned
+ *
+ * Returns 0 - if not found
+ * BTM_EIR_COMPLETE_16BITS_UUID_TYPE
+ * BTM_EIR_MORE_16BITS_UUID_TYPE
+ * BTM_EIR_COMPLETE_32BITS_UUID_TYPE
+ * BTM_EIR_MORE_32BITS_UUID_TYPE
+ * BTM_EIR_COMPLETE_128BITS_UUID_TYPE
+ * BTM_EIR_MORE_128BITS_UUID_TYPE
+ *
+ ******************************************************************************/
extern uint8_t BTM_GetEirUuidList( uint8_t *p_eir, uint8_t uuid_size, uint8_t *p_num_uuid,
uint8_t *p_uuid_list, uint8_t max_num_uuid);
/*****************************************************************************
-** SCO OVER HCI
-*****************************************************************************/
+ * SCO OVER HCI
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function BTM_ConfigScoPath
-**
-** 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
-** to transport.
-** p_pcm_param: pointer to the PCM interface parameter. If a NULL
-** 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
-** or not.
-**
-** Returns BTM_SUCCESS if the successful.
-** 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.
-**
-**
-*******************************************************************************/
+ *
+ * Function BTM_ConfigScoPath
+ *
+ * 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
+ * to transport.
+ * p_pcm_param: pointer to the PCM interface parameter. If a NULL
+ * 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
+ * or not.
+ *
+ * Returns BTM_SUCCESS if the successful.
+ * 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.
+ *
+ *
+ ******************************************************************************/
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,
bool err_data_rpt);
/*******************************************************************************
-**
-** 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
-** 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.
-**
-** 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_NO_RESOURCES: no resources.
-** BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is not
-** routed via HCI.
-**
-**
-*******************************************************************************/
+ *
+ * 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
+ * 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.
+ *
+ * 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_NO_RESOURCES: no resources.
+ * BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is not
+ * routed via HCI.
+ *
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_WriteScoData (uint16_t sco_inx, BT_HDR *p_buf);
/*******************************************************************************
-**
-** Function BTM_SetARCMode
-**
-** Description Send Audio Routing Control command.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetARCMode
+ *
+ * Description Send Audio Routing Control command.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_SetARCMode (uint8_t iface, uint8_t arc_mode, tBTM_VSC_CMPL_CB *p_arc_cb);
/*******************************************************************************
-**
-** Function BTM_PCM2Setup_Write
-**
-** Description Send PCM2_Setup write command.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_PCM2Setup_Write
+ *
+ * Description Send PCM2_Setup write command.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_PCM2Setup_Write (bool clk_master, tBTM_VSC_CMPL_CB *p_arc_cb);
/*******************************************************************************
-**
-** Function BTM_PM_ReadControllerState
-**
-** Description This function is called to obtain the controller state
-**
-** Returns Controller state (BTM_CONTRL_ACTIVE, BTM_CONTRL_SCAN, and BTM_CONTRL_IDLE)
-**
-*******************************************************************************/
+ *
+ * Function BTM_PM_ReadControllerState
+ *
+ * Description This function is called to obtain the controller state
+ *
+ * Returns Controller state (BTM_CONTRL_ACTIVE, BTM_CONTRL_SCAN, and BTM_CONTRL_IDLE)
+ *
+ ******************************************************************************/
extern tBTM_CONTRL_STATE BTM_PM_ReadControllerState(void);
#ifdef __cplusplus
diff --git a/stack/include/btm_api_types.h b/stack/include/btm_api_types.h
index d61d326..e961fa1 100644
--- a/stack/include/btm_api_types.h
+++ b/stack/include/btm_api_types.h
@@ -69,8 +69,8 @@
/*************************
-** Device Control Types
-**************************/
+ * Device Control Types
+ *************************/
#define BTM_DEVICE_ROLE_BR 0x01
#define BTM_DEVICE_ROLE_DUAL 0x02
#define BTM_MAX_DEVICE_ROLE BTM_DEVICE_ROLE_DUAL
@@ -99,12 +99,12 @@
#define BTM_VSC_CMPL_DATA_SIZE (BTM_MAX_VENDOR_SPECIFIC_LEN + sizeof(tBTM_VSC_CMPL))
/**************************************************
-** Device Control and General Callback Functions
-***************************************************/
+ * Device Control and General Callback Functions
+ **************************************************/
/* Callback function for when device status changes. Appl must poll for
-** what the new state is (BTM_IsDeviceUp). The event occurs whenever the stack
-** has detected that the controller status has changed. This asynchronous event
-** is enabled/disabled by calling BTM_RegisterForDeviceStatusNotif().
+ * what the new state is (BTM_IsDeviceUp). The event occurs whenever the stack
+ * has detected that the controller status has changed. This asynchronous event
+ * is enabled/disabled by calling BTM_RegisterForDeviceStatusNotif().
*/
enum
{
@@ -120,34 +120,34 @@
/* Callback function for when a vendor specific event occurs. The length and
-** array of returned parameter bytes are included. This asynchronous event
-** is enabled/disabled by calling BTM_RegisterForVSEvents().
+ * array of returned parameter bytes are included. This asynchronous event
+ * is enabled/disabled by calling BTM_RegisterForVSEvents().
*/
typedef void (tBTM_VS_EVT_CB) (uint8_t len, uint8_t *p);
/* General callback function for notifying an application that a synchronous
-** BTM function is complete. The pointer contains the address of any returned data.
+ * BTM function is complete. The pointer contains the address of any returned data.
*/
typedef void (tBTM_CMPL_CB) (void *p1);
/* VSC callback function for notifying an application that a synchronous
-** BTM function is complete. The pointer contains the address of any returned data.
+ * BTM function is complete. The pointer contains the address of any returned data.
*/
typedef void (tBTM_VSC_CMPL_CB) (tBTM_VSC_CMPL *p1);
/* Callback for apps to check connection and inquiry filters.
-** Parameters are the BD Address of remote and the Dev Class of remote.
-** If the app returns none zero, the connection or inquiry result will be dropped.
+ * Parameters are the BD Address of remote and the Dev Class of remote.
+ * If the app returns none zero, the connection or inquiry result will be dropped.
*/
typedef uint8_t (tBTM_FILTER_CB) (BD_ADDR bd_addr, DEV_CLASS dc);
/*****************************************************************************
-** DEVICE DISCOVERY - Inquiry, Remote Name, Discovery, Class of Device
-*****************************************************************************/
+ * DEVICE DISCOVERY - Inquiry, Remote Name, Discovery, Class of Device
+ ****************************************************************************/
/*******************************
-** Device Discovery Constants
-********************************/
+ * Device Discovery Constants
+ *******************************/
/* Discoverable modes */
#define BTM_NON_DISCOVERABLE 0
#define BTM_LIMITED_DISCOVERABLE 1
@@ -217,10 +217,10 @@
#define BTM_FILTER_COND_BD_ADDR HCI_FILTER_COND_BD_ADDR /* Filter on device addr */
/* State of the remote name retrieval during inquiry operations.
-** Used in the tBTM_INQ_INFO structure, and returned in the
-** BTM_InqDbRead, BTM_InqDbFirst, and BTM_InqDbNext functions.
-** The name field is valid when the state returned is
-** BTM_INQ_RMT_NAME_DONE */
+ * Used in the tBTM_INQ_INFO structure, and returned in the
+ * BTM_InqDbRead, BTM_InqDbFirst, and BTM_InqDbNext functions.
+ * The name field is valid when the state returned is
+ * BTM_INQ_RMT_NAME_DONE */
#define BTM_INQ_RMT_NAME_EMPTY 0
#define BTM_INQ_RMT_NAME_PENDING 1
#define BTM_INQ_RMT_NAME_DONE 2
@@ -232,8 +232,8 @@
#define BTM_FORMAT_TYPE_1 0x00
/****************************
-** minor device class field
-*****************************/
+ * minor device class field
+ ****************************/
/* 0x00 is used as unclassified for all minor device classes */
#define BTM_COD_MINOR_UNCLASSIFIED 0x00
@@ -347,8 +347,8 @@
/***************************
-** major device class field
-****************************/
+ * major device class field
+ ***************************/
#define BTM_COD_MAJOR_MISCELLANEOUS 0x00
#define BTM_COD_MAJOR_COMPUTER 0x01
#define BTM_COD_MAJOR_PHONE 0x02
@@ -362,8 +362,8 @@
#define BTM_COD_MAJOR_UNCLASSIFIED 0x1F
/***************************
-** service class fields
-****************************/
+ * service class fields
+ ***************************/
#define BTM_COD_SERVICE_LMTD_DISCOVER 0x0020
#define BTM_COD_SERVICE_POSITIONING 0x0100
#define BTM_COD_SERVICE_NETWORKING 0x0200
@@ -394,7 +394,7 @@
/* BTM service definitions
-** Used for storing EIR data to bit mask
+ * Used for storing EIR data to bit mask
*/
enum
{
@@ -511,9 +511,9 @@
#define BTM_BLE_SEC_ENCRYPT_MITM 3
typedef uint8_t tBTM_BLE_SEC_ACT;
-/************************************************************************************************
-** BTM Services MACROS handle array of uint32_t bits for more than 32 services
-*************************************************************************************************/
+/*******************************************************************************
+ * BTM Services MACROS handle array of uint32_t bits for more than 32 services
+ ******************************************************************************/
/* Determine the number of uint32_t's necessary for services */
#define BTM_EIR_ARRAY_BITS 32 /* Number of bits in each array element */
#define BTM_EIR_SERVICE_ARRAY_SIZE (((uint32_t)BTM_EIR_MAX_SERVICES / BTM_EIR_ARRAY_BITS) + \
@@ -536,10 +536,10 @@
#define BTM_HCI_EIR_OFFSET (BT_HDR_SIZE + 4)
/***************************
-** Device Discovery Types
-****************************/
+ * Device Discovery Types
+ ***************************/
/* Definitions of the parameters passed to BTM_StartInquiry and
-** BTM_SetPeriodicInquiryMode.
+ * BTM_SetPeriodicInquiryMode.
*/
typedef struct /* contains the two device class condition fields */
{
@@ -579,7 +579,7 @@
typedef uint8_t tBTM_BLE_EVT_TYPE;
/* These are the fields returned in each device's response to the inquiry. It
-** is returned in the results callback if registered.
+ * is returned in the results callback if registered.
*/
typedef struct
{
@@ -601,7 +601,7 @@
/* This is the inquiry response information held in its database by BTM, and available
-** to applications via BTM_InqDbRead, BTM_InqDbFirst, and BTM_InqDbNext.
+ * to applications via BTM_InqDbRead, BTM_InqDbFirst, and BTM_InqDbNext.
*/
typedef struct
{
@@ -646,25 +646,25 @@
}tBTM_SCO_PCM_PARAM;
/****************************************
-** Device Discovery Callback Functions
-*****************************************/
+ * Device Discovery Callback Functions
+ ****************************************/
/* Callback function for asynchronous notifications when the BTM inquiry DB
-** changes. First param is inquiry database, second is if added to or removed
-** from the inquiry database.
+ * changes. First param is inquiry database, second is if added to or removed
+ * from the inquiry database.
*/
typedef void (tBTM_INQ_DB_CHANGE_CB) (void *p1, bool is_new);
/* Callback function for notifications when the BTM gets inquiry response.
-** First param is inquiry results database, second is pointer of EIR.
+ * First param is inquiry results database, second is pointer of EIR.
*/
typedef void (tBTM_INQ_RESULTS_CB) (tBTM_INQ_RESULTS *p_inq_results, uint8_t *p_eir);
/*****************************************************************************
-** ACL CHANNEL MANAGEMENT
-*****************************************************************************/
+ * ACL CHANNEL MANAGEMENT
+ ****************************************************************************/
/******************
-** ACL Constants
-*******************/
+ * ACL Constants
+ ******************/
/* ACL modes */
#define BTM_ACL_MODE_NORMAL HCI_MODE_ACTIVE
@@ -692,11 +692,11 @@
#define BTM_ACL_PKT_TYPES_MASK_NO_3_DH5 HCI_PKT_TYPES_MASK_NO_3_DH5
/***************
-** ACL Types
-****************/
+ * ACL Types
+ ***************/
/* Structure returned with Role Switch information (in tBTM_CMPL_CB callback function)
-** in response to BTM_SwitchRole call.
+ * in response to BTM_SwitchRole call.
*/
typedef struct
{
@@ -706,7 +706,7 @@
} tBTM_ROLE_SWITCH_CMPL;
/* Structure returned with QoS information (in tBTM_CMPL_CB callback function)
-** in response to BTM_SetQoS call.
+ * in response to BTM_SetQoS call.
*/
typedef struct
{
@@ -717,7 +717,7 @@
/* Structure returned with read RSSI event (in tBTM_CMPL_CB callback function)
-** in response to BTM_ReadRSSI call.
+ * in response to BTM_ReadRSSI call.
*/
typedef struct
{
@@ -728,7 +728,7 @@
} tBTM_RSSI_RESULTS;
/* Structure returned with read current TX power event (in tBTM_CMPL_CB callback function)
-** in response to BTM_ReadTxPower call.
+ * in response to BTM_ReadTxPower call.
*/
typedef struct
{
@@ -739,7 +739,7 @@
} tBTM_TX_POWER_RESULTS;
/* Structure returned with read link quality event (in tBTM_CMPL_CB callback function)
-** in response to BTM_ReadLinkQuality call.
+ * in response to BTM_ReadLinkQuality call.
*/
typedef struct
{
@@ -750,7 +750,7 @@
} tBTM_LINK_QUALITY_RESULTS;
/* Structure returned with read inq tx power quality event (in tBTM_CMPL_CB callback function)
-** in response to BTM_ReadInquiryRspTxPower call.
+ * in response to BTM_ReadInquiryRspTxPower call.
*/
typedef struct
{
@@ -836,27 +836,27 @@
} tBTM_BL_EVENT_DATA;
/* Callback function for notifications when the BTM busy level
-** changes.
+ * changes.
*/
typedef void (tBTM_BL_CHANGE_CB) (tBTM_BL_EVENT_DATA *p_data);
/***************************
-** ACL Callback Functions
-****************************/
+ * ACL Callback Functions
+ ***************************/
/* Callback function for notifications when the BTM ACL connection DB
-** changes. First param is BD address, second is if added or removed.
-** Registered through BTM_AclRegisterForChanges call.
+ * changes. First param is BD address, second is if added or removed.
+ * Registered through BTM_AclRegisterForChanges call.
*/
typedef void (tBTM_ACL_DB_CHANGE_CB) (BD_ADDR p_bda, DEV_CLASS p_dc,
BD_NAME p_bdn, uint8_t *features,
bool is_new, uint16_t handle,
tBT_TRANSPORT transport);
/*****************************************************************************
-** SCO CHANNEL MANAGEMENT
-*****************************************************************************/
+ * SCO CHANNEL MANAGEMENT
+ ****************************************************************************/
/******************
-** SCO Constants
-*******************/
+ * SCO Constants
+ ******************/
/* Define an invalid SCO index and an invalid HCI handle */
#define BTM_INVALID_SCO_INDEX 0xFFFF
@@ -897,24 +897,24 @@
#define BTM_IGNORE_SCO_PKT_TYPE 0
/***************
-** SCO Types
-****************/
+ * SCO Types
+ ***************/
#define BTM_LINK_TYPE_SCO HCI_LINK_TYPE_SCO
#define BTM_LINK_TYPE_ESCO HCI_LINK_TYPE_ESCO
typedef uint8_t 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
typedef uint8_t tBTM_SCO_ROUTE_TYPE;
/*******************
-** SCO Codec Types
-********************/
+ * SCO Codec Types
+ *******************/
// TODO(google) This should use common definitions
// in hci/include/hci_audio.h
#define BTM_SCO_CODEC_NONE 0x0000
@@ -925,8 +925,8 @@
/*******************
-** SCO Air Mode Types
-********************/
+ * SCO Air Mode Types
+ *******************/
#define BTM_SCO_AIR_MODE_U_LAW 0
#define BTM_SCO_AIR_MODE_A_LAW 1
#define BTM_SCO_AIR_MODE_CVSD 2
@@ -934,8 +934,8 @@
typedef uint8_t tBTM_SCO_AIR_MODE_TYPE;
/*******************
-** SCO Voice Settings
-********************/
+ * SCO Voice Settings
+ *******************/
#define BTM_VOICE_SETTING_CVSD ((uint16_t) (HCI_INP_CODING_LINEAR | \
HCI_INP_DATA_FMT_2S_COMPLEMENT | \
HCI_INP_SAMPLE_SIZE_16BIT | \
@@ -947,8 +947,8 @@
HCI_AIR_CODING_FORMAT_TRANSPNT))
/*******************
-** SCO Data Status
-********************/
+ * SCO Data Status
+ *******************/
enum
{
BTM_SCO_DATA_CORRECT,
@@ -959,14 +959,14 @@
typedef uint8_t tBTM_SCO_DATA_FLAG;
/***************************
-** SCO Callback Functions
-****************************/
+ * SCO Callback Functions
+ ***************************/
typedef void (tBTM_SCO_CB) (uint16_t sco_inx);
typedef void (tBTM_SCO_DATA_CB) (uint16_t sco_inx, BT_HDR *p_data, tBTM_SCO_DATA_FLAG status);
/******************
-** eSCO Constants
-*******************/
+ * eSCO Constants
+ ******************/
#define BTM_64KBITS_RATE 0x00001f40 /* 64 kbits/sec data rate */
/* Retransmission effort */
@@ -979,8 +979,8 @@
#define BTM_ESCO_MAX_LAT_DONTCARE 0xffff
/***************
-** eSCO Types
-****************/
+ * eSCO Types
+ ***************/
/* tBTM_ESCO_CBACK event types */
#define BTM_ESCO_CHG_EVT 1
#define BTM_ESCO_CONN_REQ_EVT 2
@@ -1042,17 +1042,17 @@
} tBTM_ESCO_EVT_DATA;
/***************************
-** eSCO Callback Functions
-****************************/
+ * eSCO Callback Functions
+ ***************************/
typedef void (tBTM_ESCO_CBACK) (tBTM_ESCO_EVT event, tBTM_ESCO_EVT_DATA *p_data);
/*****************************************************************************
-** SECURITY MANAGEMENT
-*****************************************************************************/
+ * SECURITY MANAGEMENT
+ ****************************************************************************/
/*******************************
-** Security Manager Constants
-********************************/
+ * Security Manager Constants
+ *******************************/
/* Security Mode (BTM_SetSecurityMode) */
#define BTM_SEC_MODE_UNDEFINED 0
@@ -1067,7 +1067,7 @@
#define BTM_SEC_MODES_MAX 7
/* Security Service Levels [bit mask] (BTM_SetSecurityLevel)
-** Encryption should not be used without authentication
+ * Encryption should not be used without authentication
*/
#define BTM_SEC_NONE 0x0000 /* Nothing required */
#define BTM_SEC_IN_AUTHORIZE 0x0001 /* Inbound call requires authorization */
@@ -1098,7 +1098,7 @@
#define BTM_PIN_TYPE_FIXED HCI_PIN_TYPE_FIXED
/* Link Key types used to generate the new link key.
-** returned in link key notification callback function
+ * returned in link key notification callback function
*/
#define BTM_LKEY_TYPE_COMBINATION HCI_LKEY_TYPE_COMBINATION
#define BTM_LKEY_TYPE_LOCAL_UNIT HCI_LKEY_TYPE_LOCAL_UNIT
@@ -1134,7 +1134,7 @@
(((uint32_t)BTM_SEC_MAX_SERVICES % BTM_SEC_ARRAY_BITS) ? 1 : 0))
/* Security service definitions (BTM_SetSecurityLevel)
-** Used for Authorization APIs
+ * Used for Authorization APIs
*/
#define BTM_SEC_SERVICE_SDP_SERVER 0
#define BTM_SEC_SERVICE_SERIAL_PORT 1
@@ -1196,9 +1196,9 @@
#define BTM_SEC_MAX_SERVICES 75
#endif
-/************************************************************************************************
-** Security Services MACROS handle array of uint32_t bits for more than 32 trusted services
-*************************************************************************************************/
+/*******************************************************************************
+ * Security Services MACROS handle array of uint32_t bits for more than 32 trusted services
+ ******************************************************************************/
/* MACRO to set the security service bit mask in a bit stream */
#define BTM_SEC_SET_SERVICE(p, service) (((uint32_t *)(p))[(((uint32_t)(service)) / BTM_SEC_ARRAY_BITS)] |= \
((uint32_t)1 << (((uint32_t)(service)) % BTM_SEC_ARRAY_BITS)))
@@ -1278,35 +1278,35 @@
#define BTM_SEC_TRUST_ALL 0xFFFFFFFF /* for each array element */
/****************************************
-** Security Manager Callback Functions
-*****************************************/
+ * Security Manager Callback Functions
+ ****************************************/
/* Authorize device for service. Parameters are
-** BD Address of remote
-** Device Class of remote
-** BD Name of remote
-** Service name
-** Service Id (NULL - unknown service or unused
-** [BTM_SEC_SERVICE_NAME_LEN set to 0])
-** Is originator of the connection
-** Result of the operation
+ * BD Address of remote
+ * Device Class of remote
+ * BD Name of remote
+ * Service name
+ * Service Id (NULL - unknown service or unused
+ * [BTM_SEC_SERVICE_NAME_LEN set to 0])
+ * Is originator of the connection
+ * Result of the operation
*/
typedef uint8_t (tBTM_AUTHORIZE_CALLBACK) (BD_ADDR bd_addr, DEV_CLASS dev_class,
tBTM_BD_NAME bd_name, uint8_t *service_name,
uint8_t service_id, bool is_originator);
/* Get PIN for the connection. Parameters are
-** BD Address of remote
-** Device Class of remote
-** BD Name of remote
-** Flag indicating the minimum pin code length to be 16 digits
+ * BD Address of remote
+ * Device Class of remote
+ * BD Name of remote
+ * Flag indicating the minimum pin code length to be 16 digits
*/
typedef uint8_t (tBTM_PIN_CALLBACK) (BD_ADDR bd_addr, DEV_CLASS dev_class,
tBTM_BD_NAME bd_name, bool min_16_digit);
/* New Link Key for the connection. Parameters are
-** BD Address of remote
-** Link Key
-** Key Type: Combination, Local Unit, or Remote Unit
+ * BD Address of remote
+ * Link Key
+ * Key Type: Combination, Local Unit, or Remote Unit
*/
typedef uint8_t (tBTM_LINK_KEY_CALLBACK) (BD_ADDR bd_addr, DEV_CLASS dev_class,
tBTM_BD_NAME bd_name, uint8_t *key,
@@ -1314,18 +1314,18 @@
/* Remote Name Resolved. Parameters are
-** BD Address of remote
-** BD Name of remote
+ * BD Address of remote
+ * BD Name of remote
*/
typedef void (tBTM_RMT_NAME_CALLBACK) (BD_ADDR bd_addr, DEV_CLASS dc,
tBTM_BD_NAME bd_name);
/* Authentication complete for the connection. Parameters are
-** BD Address of remote
-** Device Class of remote
-** BD Name of remote
-**
+ * BD Address of remote
+ * Device Class of remote
+ * BD Name of remote
+ *
*/
typedef uint8_t (tBTM_AUTH_COMPLETE_CALLBACK) (BD_ADDR bd_addr, DEV_CLASS dev_class,
tBTM_BD_NAME bd_name, int result);
@@ -1504,7 +1504,7 @@
} tBTM_SP_EVT_DATA;
/* Simple Pairing Events. Called by the stack when Simple Pairing related
-** events occur.
+ * events occur.
*/
typedef uint8_t (tBTM_SP_CALLBACK) (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data);
@@ -1512,17 +1512,17 @@
typedef void (tBTM_MKEY_CALLBACK) (BD_ADDR bd_addr, uint8_t status, uint8_t key_flag) ;
/* Encryption enabled/disabled complete: Optionally passed with BTM_SetEncryption.
-** Parameters are
-** BD Address of remote
-** optional data passed in by BTM_SetEncryption
-** tBTM_STATUS - result of the operation
+ * Parameters are
+ * BD Address of remote
+ * optional data passed in by BTM_SetEncryption
+ * tBTM_STATUS - result of the operation
*/
typedef void (tBTM_SEC_CBACK) (BD_ADDR bd_addr, tBT_TRANSPORT trasnport,
void *p_ref_data, tBTM_STATUS result);
/* Bond Cancel complete. Parameters are
-** Result of the cancel operation
-**
+ * Result of the cancel operation
+ *
*/
typedef void (tBTM_BOND_CANCEL_CMPL_CALLBACK) (tBTM_STATUS result);
@@ -1666,7 +1666,7 @@
} tBTM_LE_EVT_DATA;
/* Simple Pairing Events. Called by the stack when Simple Pairing related
-** events occur.
+ * events occur.
*/
typedef uint8_t (tBTM_LE_CALLBACK) (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_DATA *p_data);
@@ -1695,8 +1695,8 @@
/***************************
-** Security Manager Types
-****************************/
+ * Security Manager Types
+ ***************************/
/* Structure that applications use to register with BTM_SecRegister */
typedef struct
{
@@ -1711,16 +1711,16 @@
} tBTM_APPL_INFO;
/* Callback function for when a link supervision timeout event occurs.
-** This asynchronous event is enabled/disabled by calling BTM_RegForLstoEvt().
+ * This asynchronous event is enabled/disabled by calling BTM_RegForLstoEvt().
*/
typedef void (tBTM_LSTO_CBACK) (BD_ADDR remote_bda, uint16_t timeout);
/*****************************************************************************
-** POWER MANAGEMENT
-*****************************************************************************/
+ * POWER MANAGEMENT
+ ****************************************************************************/
/****************************
-** Power Manager Constants
-*****************************/
+ * Power Manager Constants
+ ****************************/
/* BTM Power manager status codes */
enum
{
@@ -1753,8 +1753,8 @@
#define BTM_PM_DEREG 4 /* The module does not want to involve with PM anymore */
/************************
-** Power Manager Types
-*************************/
+ * Power Manager Types
+ ************************/
typedef struct
{
uint16_t max;
@@ -1765,15 +1765,15 @@
} tBTM_PM_PWR_MD;
/*************************************
-** Power Manager Callback Functions
-**************************************/
+ * Power Manager Callback Functions
+ *************************************/
typedef void (tBTM_PM_STATUS_CBACK) (BD_ADDR p_bda, tBTM_PM_STATUS status,
uint16_t value, uint8_t hci_status);
/************************
-** Stored Linkkey Types
-*************************/
+ * Stored Linkkey Types
+ ************************/
#define BTM_CB_EVT_DELETE_STORED_LINK_KEYS 4
typedef struct
diff --git a/stack/include/btm_ble_api.h b/stack/include/btm_ble_api.h
index 2416b63..734e21f 100644
--- a/stack/include/btm_ble_api.h
+++ b/stack/include/btm_ble_api.h
@@ -38,119 +38,119 @@
tBTM_BLE_SCAN_SETUP_CBACK bta_ble_scan_setup_cb;
/*****************************************************************************
-** EXTERNAL FUNCTION DECLARATIONS
-*****************************************************************************/
+ * EXTERNAL FUNCTION DECLARATIONS
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function BTM_SecAddBleDevice
-**
-** Description Add/modify device. This function will be normally called
-** during host startup to restore all required information
-** for a LE device stored in the NVRAM.
-**
-** Parameters: bd_addr - BD address of the peer
-** bd_name - Name of the peer device. NULL if unknown.
-** dev_type - Remote device's device type.
-** addr_type - LE device address type.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecAddBleDevice
+ *
+ * Description Add/modify device. This function will be normally called
+ * during host startup to restore all required information
+ * for a LE device stored in the NVRAM.
+ *
+ * Parameters: bd_addr - BD address of the peer
+ * bd_name - Name of the peer device. NULL if unknown.
+ * dev_type - Remote device's device type.
+ * addr_type - LE device address type.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
extern bool BTM_SecAddBleDevice (const 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
-** information stored in the NVRAM.
-**
-** Parameters: bd_addr - BD address of the peer
-** p_le_key - LE key values.
-** key_type - LE SMP key type.
+ *
+ * Function BTM_SecAddBleKey
+ *
+ * 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
+ * p_le_key - LE key values.
+ * key_type - LE SMP key type.
*
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
extern bool BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key,
tBTM_LE_KEY_TYPE key_type);
/*******************************************************************************
-**
-** Function BTM_BleSetAdvParams
-**
-** Description This function is called to set advertising parameters.
-**
-** Parameters: None.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetAdvParams
+ *
+ * Description This function is called to set advertising parameters.
+ *
+ * Parameters: None.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleSetAdvParams(uint16_t adv_int_min, uint16_t adv_int_max,
tBLE_BD_ADDR *p_dir_bda, tBTM_BLE_ADV_CHNL_MAP chnl_map);
/*******************************************************************************
-**
-** Function BTM_BleObtainVendorCapabilities
-**
-** Description This function is called to obatin vendor capabilties
-**
-** Parameters p_cmn_vsc_cb - Returns the vednor capabilities
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleObtainVendorCapabilities
+ *
+ * Description This function is called to obatin vendor capabilties
+ *
+ * Parameters p_cmn_vsc_cb - Returns the vednor capabilities
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleObtainVendorCapabilities(tBTM_BLE_VSC_CB *p_cmn_vsc_cb);
/*******************************************************************************
-**
-** Function BTM_BleSetScanParams
-**
-** Description This function is called to set Scan parameters.
-**
-** Parameters client_if - Client IF value
-** scan_interval - Scan interval
-** scan_window - Scan window
-** scan_type - Scan type
-** scan_setup_status_cback - Scan setup status callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetScanParams
+ *
+ * Description This function is called to set Scan parameters.
+ *
+ * Parameters client_if - Client IF value
+ * scan_interval - Scan interval
+ * scan_window - Scan window
+ * scan_type - Scan type
+ * scan_setup_status_cback - Scan setup status callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleSetScanParams(tGATT_IF client_if, uint32_t scan_interval,
uint32_t scan_window, tBLE_SCAN_MODE scan_type,
tBLE_SCAN_PARAM_SETUP_CBACK scan_setup_status_cback);
/*******************************************************************************
-**
-** Function BTM_BleGetVendorCapabilities
-**
-** Description This function reads local LE features
-**
-** Parameters p_cmn_vsc_cb : Locala LE capability structure
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleGetVendorCapabilities
+ *
+ * Description This function reads local LE features
+ *
+ * Parameters p_cmn_vsc_cb : Locala LE capability structure
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB *p_cmn_vsc_cb);
/*******************************************************************************
-**
-** Function BTM_BleSetStorageConfig
-**
-** Description This function is called to setup storage configuration and setup callbacks.
-**
-** Parameters uint8_t batch_scan_full_max -Batch scan full maximum
+ *
+ * Function BTM_BleSetStorageConfig
+ *
+ * Description This function is called to setup storage configuration and setup callbacks.
+ *
+ * Parameters uint8_t batch_scan_full_max -Batch scan full maximum
uint8_t batch_scan_trunc_max - Batch scan truncated value maximum
uint8_t batch_scan_notify_threshold - Threshold value
tBTM_BLE_SCAN_SETUP_CBACK *p_setup_cback - Setup callback
tBTM_BLE_SCAN_THRESHOLD_CBACK *p_thres_cback -Threshold callback
void *p_ref - Reference value
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleSetStorageConfig(uint8_t batch_scan_full_max,
uint8_t batch_scan_trunc_max,
uint8_t batch_scan_notify_threshold,
@@ -160,20 +160,20 @@
tBTM_BLE_REF_VALUE ref_value);
/*******************************************************************************
-**
-** Function BTM_BleEnableBatchScan
-**
-** Description This function is called to enable batch scan
-**
-** Parameters tBTM_BLE_BATCH_SCAN_MODE scan_mode - Batch scan mode
+ *
+ * Function BTM_BleEnableBatchScan
+ *
+ * Description This function is called to enable batch scan
+ *
+ * Parameters tBTM_BLE_BATCH_SCAN_MODE scan_mode - Batch scan mode
uint32_t scan_interval -Scan interval
uint32_t scan_window - Scan window value
tBLE_ADDR_TYPE addr_type - Address type
tBTM_BLE_DISCARD_RULE discard_rule - Data discard rules
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleEnableBatchScan(tBTM_BLE_BATCH_SCAN_MODE scan_mode,
uint32_t scan_interval, uint32_t scan_window,
tBTM_BLE_DISCARD_RULE discard_rule,
@@ -181,654 +181,654 @@
tBTM_BLE_REF_VALUE ref_value);
/*******************************************************************************
-**
-** Function BTM_BleDisableBatchScan
-**
-** Description This function is called to disable batch scanning
-**
-** Parameters void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleDisableBatchScan
+ *
+ * Description This function is called to disable batch scanning
+ *
+ * Parameters void
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleDisableBatchScan(tBTM_BLE_REF_VALUE ref_value);
/*******************************************************************************
-**
-** Function BTM_BleReadScanReports
-**
-** Description This function is called to read batch scan reports
-**
-** Parameters tBLE_SCAN_MODE scan_mode - Scan mode report to be read out
+ *
+ * Function BTM_BleReadScanReports
+ *
+ * Description This function is called to read batch scan reports
+ *
+ * Parameters tBLE_SCAN_MODE scan_mode - Scan mode report to be read out
tBTM_BLE_SCAN_REP_CBACK* p_cback - Reports callback
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleReadScanReports(tBLE_SCAN_MODE scan_mode,
tBTM_BLE_REF_VALUE ref_value);
/*******************************************************************************
-**
-** Function BTM_BleTrackAdvertiser
-**
-** Description This function is called to read batch scan reports
-**
-** Parameters p_track_cback - Tracking callback
-** ref_value - Reference value
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleTrackAdvertiser
+ *
+ * Description This function is called to read batch scan reports
+ *
+ * Parameters p_track_cback - Tracking callback
+ * ref_value - Reference value
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleTrackAdvertiser(tBTM_BLE_TRACK_ADV_CBACK *p_track_cback,
tBTM_BLE_REF_VALUE ref_value);
/*******************************************************************************
-**
-** Function BTM_BleWriteScanRsp
-**
-** Description This function is called to write LE scan response.
-**
-** Parameters: p_scan_rsp: scan response.
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleWriteScanRsp
+ *
+ * Description This function is called to write LE scan response.
+ *
+ * Parameters: p_scan_rsp: scan response.
+ *
+ * Returns status
+ *
+ ******************************************************************************/
extern void BTM_BleWriteScanRsp(uint8_t* data, uint8_t length,
tBTM_BLE_ADV_DATA_CMPL_CBACK *p_adv_data_cback);
/*******************************************************************************
-**
-** Function BTM_BleObserve
-**
-** Description This procedure keep the device listening for advertising
-** events from a broadcast device.
-**
-** Parameters start: start or stop observe.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleObserve
+ *
+ * Description This procedure keep the device listening for advertising
+ * events from a broadcast device.
+ *
+ * Parameters start: start or stop observe.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleObserve(bool start, uint8_t duration,
tBTM_INQ_RESULTS_CB *p_results_cb, tBTM_CMPL_CB *p_cmpl_cb);
/*******************************************************************************
-**
-** Function BTM_GetDeviceIDRoot
-**
-** Description This function is called to read the local device identity
-** root.
-**
-** Returns void
-** the local device ER is copied into er
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetDeviceIDRoot
+ *
+ * Description This function is called to read the local device identity
+ * root.
+ *
+ * Returns void
+ * the local device ER is copied into er
+ *
+ ******************************************************************************/
extern void BTM_GetDeviceIDRoot (BT_OCTET16 ir);
/*******************************************************************************
-**
-** Function BTM_GetDeviceEncRoot
-**
-** Description This function is called to read the local device encryption
-** root.
-**
-** Returns void
-** the local device ER is copied into er
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetDeviceEncRoot
+ *
+ * Description This function is called to read the local device encryption
+ * root.
+ *
+ * Returns void
+ * the local device ER is copied into er
+ *
+ ******************************************************************************/
extern void BTM_GetDeviceEncRoot (BT_OCTET16 er);
/*******************************************************************************
-**
-** Function BTM_GetDeviceDHK
-**
-** Description This function is called to read the local device DHK.
-**
-** Returns void
-** the local device DHK is copied into dhk
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetDeviceDHK
+ *
+ * Description This function is called to read the local device DHK.
+ *
+ * Returns void
+ * the local device DHK is copied into dhk
+ *
+ ******************************************************************************/
extern void BTM_GetDeviceDHK (BT_OCTET16 dhk);
/*******************************************************************************
-**
-** Function BTM_SecurityGrant
-**
-** 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.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function BTM_SecurityGrant
+ *
+ * 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.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
extern void BTM_SecurityGrant(BD_ADDR bd_addr, uint8_t res);
/*******************************************************************************
-**
-** Function BTM_BlePasskeyReply
-**
-** Description This function is called after Security Manager submitted
-** 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
-** passkey - numeric value in the range of
-** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
-**
-*******************************************************************************/
+ *
+ * Function BTM_BlePasskeyReply
+ *
+ * Description This function is called after Security Manager submitted
+ * 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
+ * passkey - numeric value in the range of
+ * BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
+ *
+ ******************************************************************************/
extern void BTM_BlePasskeyReply (BD_ADDR bd_addr, uint8_t res, uint32_t passkey);
/*******************************************************************************
-**
-** Function BTM_BleConfirmReply
-**
-** Description This function is called after Security Manager submitted
-** numeric comparison request to the application.
-**
-** Parameters: bd_addr - Address of the device with which numeric
-** comparison was requested
-** res - comparison result BTM_SUCCESS if success
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleConfirmReply
+ *
+ * Description This function is called after Security Manager submitted
+ * numeric comparison request to the application.
+ *
+ * Parameters: bd_addr - Address of the device with which numeric
+ * comparison was requested
+ * res - comparison result BTM_SUCCESS if success
+ *
+ ******************************************************************************/
extern void BTM_BleConfirmReply (BD_ADDR bd_addr, uint8_t res);
/*******************************************************************************
-**
-** Function BTM_LeOobDataReply
-**
-** Description This function is called to provide the OOB data for
-** 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
-** p_data - simple pairing Randomizer C.
-**
-*******************************************************************************/
+ *
+ * Function BTM_LeOobDataReply
+ *
+ * Description This function is called to provide the OOB data for
+ * 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
+ * p_data - simple pairing Randomizer C.
+ *
+ ******************************************************************************/
extern void BTM_BleOobDataReply(BD_ADDR bd_addr, uint8_t res, uint8_t len, uint8_t *p_data);
/*******************************************************************************
-**
-** Function BTM_BleSecureConnectionOobDataReply
-**
-** Description This function is called to provide the OOB data for
-** SMP in response to BTM_LE_OOB_REQ_EVT when secure connection
-** data is available
-**
-** Parameters: bd_addr - Address of the peer device
-** p_c - pointer to Confirmation
-** p_r - pointer to Randomizer.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSecureConnectionOobDataReply
+ *
+ * Description This function is called to provide the OOB data for
+ * SMP in response to BTM_LE_OOB_REQ_EVT when secure connection
+ * data is available
+ *
+ * Parameters: bd_addr - Address of the peer device
+ * p_c - pointer to Confirmation
+ * p_r - pointer to Randomizer.
+ *
+ ******************************************************************************/
extern void BTM_BleSecureConnectionOobDataReply(BD_ADDR bd_addr,
uint8_t *p_c, uint8_t *p_r);
/*******************************************************************************
-**
-** Function BTM_BleDataSignature
-**
-** Description This function is called to sign the data using AES128 CMAC
-** algorith.
-**
-** 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.
-**
-** Returns true if signing sucessul, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleDataSignature
+ *
+ * Description This function is called to sign the data using AES128 CMAC
+ * algorith.
+ *
+ * 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.
+ *
+ * Returns true if signing sucessul, otherwise false.
+ *
+ ******************************************************************************/
extern bool BTM_BleDataSignature (BD_ADDR bd_addr, uint8_t *p_text, uint16_t len,
BLE_SIGNATURE signature);
/*******************************************************************************
-**
-** Function BTM_BleVerifySignature
-**
-** Description This function is called to verify the data signature
-**
-** Parameter bd_addr: target device the data to be signed for.
-** p_orig: original data before signature.
-** len: length of the signing data
-** counter: counter used when doing data signing
-** p_comp: signature to be compared against.
+ *
+ * Function BTM_BleVerifySignature
+ *
+ * Description This function is called to verify the data signature
+ *
+ * Parameter bd_addr: target device the data to be signed for.
+ * p_orig: original data before signature.
+ * len: length of the signing data
+ * counter: counter used when doing data signing
+ * p_comp: signature to be compared against.
-** Returns true if signature verified correctly; otherwise false.
-**
-*******************************************************************************/
+ * Returns true if signature verified correctly; otherwise false.
+ *
+ ******************************************************************************/
extern bool BTM_BleVerifySignature (BD_ADDR bd_addr, uint8_t *p_orig,
uint16_t len, uint32_t counter,
uint8_t *p_comp);
/*******************************************************************************
-**
-** Function BTM_ReadConnectionAddr
-**
-** Description This function is called to set the local device random address
-** .
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadConnectionAddr
+ *
+ * Description This function is called to set the local device random address
+ * .
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_ReadConnectionAddr (BD_ADDR remote_bda, BD_ADDR local_conn_addr,
tBLE_ADDR_TYPE *p_addr_type);
/*******************************************************************************
-**
-** Function BTM_ReadRemoteConnectionAddr
-**
-** Description This function is read the remote device address currently used
-** .
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadRemoteConnectionAddr
+ *
+ * Description This function is read the remote device address currently used
+ * .
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern bool BTM_ReadRemoteConnectionAddr(BD_ADDR pseudo_addr,
BD_ADDR conn_addr,
tBLE_ADDR_TYPE *p_addr_type);
/*******************************************************************************
-**
-** Function BTM_BleLoadLocalKeys
-**
-** Description Local local identity key, encryption root or sign counter.
-**
-** Parameters: key_type: type of key, can be BTM_BLE_KEY_TYPE_ID, BTM_BLE_KEY_TYPE_ER
-** or BTM_BLE_KEY_TYPE_COUNTER.
-** p_key: pointer to the key.
+ *
+ * Function BTM_BleLoadLocalKeys
+ *
+ * Description Local local identity key, encryption root or sign counter.
+ *
+ * Parameters: key_type: type of key, can be BTM_BLE_KEY_TYPE_ID, BTM_BLE_KEY_TYPE_ER
+ * or BTM_BLE_KEY_TYPE_COUNTER.
+ * p_key: pointer to the key.
*
-** Returns non2.
-**
-*******************************************************************************/
+ * Returns non2.
+ *
+ ******************************************************************************/
extern void BTM_BleLoadLocalKeys(uint8_t key_type, tBTM_BLE_LOCAL_KEYS *p_key);
/*******************************************************************************
-**
-** Function BTM_BleSetBgConnType
-**
-** 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.
-** p_select_cback: callback function when selective connection procedure
-** is being used.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetBgConnType
+ *
+ * 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.
+ * p_select_cback: callback function when selective connection procedure
+ * is being used.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern bool BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type,
tBTM_BLE_SEL_CBACK *p_select_cback);
/*******************************************************************************
-**
-** Function BTM_BleUpdateBgConnDev
-**
-** Description This function is called to add or remove a device into/from
-** background connection procedure. The background connection
+ *
+ * Function BTM_BleUpdateBgConnDev
+ *
+ * Description This function is called to add or remove a device into/from
+ * background connection procedure. The background connection
* procedure is decided by the background connection type, it can be
* auto connection, or selective connection.
-**
-** Parameters add_remove: true to add; false to remove.
-** remote_bda: device address to add/remove.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Parameters add_remove: true to add; false to remove.
+ * remote_bda: device address to add/remove.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern bool BTM_BleUpdateBgConnDev(bool add_remove, BD_ADDR remote_bda);
/*******************************************************************************
-**
-** Function BTM_BleClearBgConnDev
-**
-** Description This function is called to clear the whitelist,
-** end any pending whitelist connections,
-** and reset the local bg device list.
-**
-** Parameters void
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleClearBgConnDev
+ *
+ * Description This function is called to clear the whitelist,
+ * end any pending whitelist connections,
+ * and reset the local bg device list.
+ *
+ * Parameters void
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleClearBgConnDev(void);
/********************************************************
-**
-** Function BTM_BleSetPrefConnParams
-**
-** 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
-** leave untouched.
-**
-** Parameters: bd_addr - BD address of the peripheral
-** min_conn_int - minimum preferred connection interval
-** max_conn_int - maximum preferred connection interval
-** slave_latency - preferred slave latency
-** supervision_tout - preferred supervision timeout
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetPrefConnParams
+ *
+ * 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
+ * leave untouched.
+ *
+ * Parameters: bd_addr - BD address of the peripheral
+ * min_conn_int - minimum preferred connection interval
+ * max_conn_int - maximum preferred connection interval
+ * slave_latency - preferred slave latency
+ * supervision_tout - preferred supervision timeout
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleSetPrefConnParams (BD_ADDR bd_addr,
uint16_t min_conn_int, uint16_t max_conn_int,
uint16_t slave_latency, uint16_t supervision_tout);
/******************************************************************************
-**
-** Function BTM_BleSetConnScanParams
-**
-** Description Set scan parameters used in BLE connection request
-**
-** Parameters: scan_interval - scan interval
-** scan_window - scan window
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetConnScanParams
+ *
+ * Description Set scan parameters used in BLE connection request
+ *
+ * Parameters: scan_interval - scan interval
+ * scan_window - scan window
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleSetConnScanParams (uint32_t scan_interval, uint32_t scan_window);
/******************************************************************************
-**
-** Function BTM_BleReadControllerFeatures
-**
-** Description Reads BLE specific controller features
-**
-** Parameters: tBTM_BLE_CTRL_FEATURES_CBACK : Callback to notify when features are read
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleReadControllerFeatures
+ *
+ * Description Reads BLE specific controller features
+ *
+ * Parameters: tBTM_BLE_CTRL_FEATURES_CBACK : Callback to notify when features are read
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleReadControllerFeatures(tBTM_BLE_CTRL_FEATURES_CBACK *p_vsc_cback);
/*******************************************************************************
-**
-** Function BTM_CheckAdvData
-**
-** Description This function is called to get ADV data for a specific type.
-**
-** Parameters p_adv - pointer of ADV data
-** type - finding ADV data type
-** p_length - return the length of ADV data not including type
-**
-** Returns pointer of ADV data
-**
-*******************************************************************************/
+ *
+ * Function BTM_CheckAdvData
+ *
+ * Description This function is called to get ADV data for a specific type.
+ *
+ * Parameters p_adv - pointer of ADV data
+ * type - finding ADV data type
+ * p_length - return the length of ADV data not including type
+ *
+ * Returns pointer of ADV data
+ *
+ ******************************************************************************/
extern uint8_t *BTM_CheckAdvData( uint8_t *p_adv, uint8_t type, uint8_t *p_length);
/*******************************************************************************
-**
-** Function BTM__BLEReadDiscoverability
-**
-** Description This function is called to read the current LE discoverability
-** mode of the device.
-**
-** Returns BTM_BLE_NON_DISCOVERABLE ,BTM_BLE_LIMITED_DISCOVERABLE or
-** BTM_BLE_GENRAL_DISCOVERABLE
-**
-*******************************************************************************/
+ *
+ * Function BTM__BLEReadDiscoverability
+ *
+ * Description This function is called to read the current LE discoverability
+ * mode of the device.
+ *
+ * Returns BTM_BLE_NON_DISCOVERABLE ,BTM_BLE_LIMITED_DISCOVERABLE or
+ * BTM_BLE_GENRAL_DISCOVERABLE
+ *
+ ******************************************************************************/
uint16_t BTM_BleReadDiscoverability();
/*******************************************************************************
-**
-** Function BTM__BLEReadConnectability
-**
-** Description This function is called to read the current LE connectibility
-** mode of the device.
-**
-** Returns BTM_BLE_NON_CONNECTABLE or BTM_BLE_CONNECTABLE
-**
-*******************************************************************************/
+ *
+ * Function BTM__BLEReadConnectability
+ *
+ * Description This function is called to read the current LE connectibility
+ * mode of the device.
+ *
+ * Returns BTM_BLE_NON_CONNECTABLE or BTM_BLE_CONNECTABLE
+ *
+ ******************************************************************************/
extern uint16_t BTM_BleReadConnectability ();
/*******************************************************************************
-**
-** Function BTM_ReadDevInfo
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadDevInfo
+ *
+ * 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.
+ *
+ ******************************************************************************/
extern void BTM_ReadDevInfo (const BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type,
tBLE_ADDR_TYPE *p_addr_type);
/*******************************************************************************
-**
-** Function BTM_ReadConnectedTransportAddress
-**
-** Description This function is called to read the paired device/address type of other device paired
-** corresponding to the BD_address
-**
-** Parameter remote_bda: remote device address, carry out the transport address
-** transport: active transport
-**
-** Return true if an active link is identified; false otherwise
-**
-*******************************************************************************/
+ *
+ * Function BTM_ReadConnectedTransportAddress
+ *
+ * Description This function is called to read the paired device/address type of other device paired
+ * corresponding to the BD_address
+ *
+ * Parameter remote_bda: remote device address, carry out the transport address
+ * transport: active transport
+ *
+ * Return true if an active link is identified; false otherwise
+ *
+ ******************************************************************************/
extern bool BTM_ReadConnectedTransportAddress(BD_ADDR remote_bda,
tBT_TRANSPORT transport);
/*******************************************************************************
-**
-** Function BTM_BleConfigPrivacy
-**
-** 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.
-**
-** Returns bool privacy mode set success; otherwise failed.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleConfigPrivacy
+ *
+ * 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.
+ *
+ * Returns bool privacy mode set success; otherwise failed.
+ *
+ ******************************************************************************/
extern bool BTM_BleConfigPrivacy(bool enable);
/*******************************************************************************
-**
-** Function BTM_BleLocalPrivacyEnabled
-**
-** Description Checks if local device supports private address
-**
-** Returns Return true if local privacy is enabled else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleLocalPrivacyEnabled
+ *
+ * Description Checks if local device supports private address
+ *
+ * Returns Return true if local privacy is enabled else false
+ *
+ ******************************************************************************/
extern bool BTM_BleLocalPrivacyEnabled(void);
/*******************************************************************************
-**
-** Function BTM_BleEnableMixedPrivacyMode
-**
-** Description This function is called to enabled Mixed mode if privacy 1.2
-** is applicable in controller.
-**
-** Parameters mixed_on: mixed mode to be used or not.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleEnableMixedPrivacyMode
+ *
+ * Description This function is called to enabled Mixed mode if privacy 1.2
+ * is applicable in controller.
+ *
+ * Parameters mixed_on: mixed mode to be used or not.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleEnableMixedPrivacyMode(bool mixed_on);
/*******************************************************************************
-**
-** Function BTM_BleMaxMultiAdvInstanceCount
-**
-** Description Returns max number of multi adv instances supported by controller
-**
-** Returns Max multi adv instance count
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleMaxMultiAdvInstanceCount
+ *
+ * Description Returns max number of multi adv instances supported by controller
+ *
+ * Returns Max multi adv instance count
+ *
+ ******************************************************************************/
extern uint8_t BTM_BleMaxMultiAdvInstanceCount();
/*******************************************************************************
-**
-** Function BTM_BleSetConnectableMode
-**
-** Description This function is called to set BLE connectable mode for a
-** peripheral device.
-**
-** Parameters connectable_mode: directed connectable mode, or non-directed.It can
-** be BTM_BLE_CONNECT_EVT, BTM_BLE_CONNECT_DIR_EVT or
-** BTM_BLE_CONNECT_LO_DUTY_DIR_EVT
-**
-** Returns BTM_ILLEGAL_VALUE if controller does not support BLE.
-** BTM_SUCCESS is status set successfully; otherwise failure.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSetConnectableMode
+ *
+ * Description This function is called to set BLE connectable mode for a
+ * peripheral device.
+ *
+ * Parameters connectable_mode: directed connectable mode, or non-directed.It can
+ * be BTM_BLE_CONNECT_EVT, BTM_BLE_CONNECT_DIR_EVT or
+ * BTM_BLE_CONNECT_LO_DUTY_DIR_EVT
+ *
+ * Returns BTM_ILLEGAL_VALUE if controller does not support BLE.
+ * BTM_SUCCESS is status set successfully; otherwise failure.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleSetConnectableMode(tBTM_BLE_CONN_MODE connectable_mode);
/*******************************************************************************
-**
-** Function BTM_BleTurnOnPrivacyOnRemote
-**
-** Description This function is called to enable or disable the privacy on the
-** remote device.
-**
-** Parameters bd_addr: remote device address.
-** privacy_on: true to enable it; false to disable it.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleTurnOnPrivacyOnRemote
+ *
+ * Description This function is called to enable or disable the privacy on the
+ * remote device.
+ *
+ * Parameters bd_addr: remote device address.
+ * privacy_on: true to enable it; false to disable it.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void BTM_BleTurnOnPrivacyOnRemote(BD_ADDR bd_addr,
bool privacy_on);
/*******************************************************************************
-**
-** Function BTM_BleUpdateAdvFilterPolicy
-**
-** Description This function update the filter policy of advertiser.
-**
-** Parameter adv_policy: advertising filter policy
-**
-** Return void
-*******************************************************************************/
+ *
+ * Function BTM_BleUpdateAdvFilterPolicy
+ *
+ * Description This function update the filter policy of advertiser.
+ *
+ * Parameter adv_policy: advertising filter policy
+ *
+ * Return void
+ ******************************************************************************/
extern void BTM_BleUpdateAdvFilterPolicy(tBTM_BLE_AFP adv_policy);
/*******************************************************************************
-**
-** Function BTM_BleReceiverTest
-**
-** Description This function is called to start the LE Receiver test
-**
-** Parameter rx_freq - Frequency Range
-** p_cmd_cmpl_cback - Command Complete callback
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleReceiverTest
+ *
+ * Description This function is called to start the LE Receiver test
+ *
+ * Parameter rx_freq - Frequency Range
+ * p_cmd_cmpl_cback - Command Complete callback
+ *
+ ******************************************************************************/
void BTM_BleReceiverTest(uint8_t rx_freq, tBTM_CMPL_CB *p_cmd_cmpl_cback);
/*******************************************************************************
-**
-** Function BTM_BleTransmitterTest
-**
-** Description This function is called to start the LE Transmitter test
-**
-** Parameter tx_freq - Frequency Range
-** test_data_len - Length in bytes of payload data in each packet
-** packet_payload - Pattern to use in the payload
-** p_cmd_cmpl_cback - Command Complete callback
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleTransmitterTest
+ *
+ * Description This function is called to start the LE Transmitter test
+ *
+ * Parameter tx_freq - Frequency Range
+ * test_data_len - Length in bytes of payload data in each packet
+ * packet_payload - Pattern to use in the payload
+ * p_cmd_cmpl_cback - Command Complete callback
+ *
+ ******************************************************************************/
void BTM_BleTransmitterTest(uint8_t tx_freq, uint8_t test_data_len,
uint8_t packet_payload, tBTM_CMPL_CB *p_cmd_cmpl_cback);
/*******************************************************************************
-**
-** Function BTM_BleTestEnd
-**
-** Description This function is called to stop the in-progress TX or RX test
-**
-** Parameter p_cmd_cmpl_cback - Command complete callback
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleTestEnd
+ *
+ * Description This function is called to stop the in-progress TX or RX test
+ *
+ * Parameter p_cmd_cmpl_cback - Command complete callback
+ *
+ ******************************************************************************/
void BTM_BleTestEnd(tBTM_CMPL_CB *p_cmd_cmpl_cback);
/*******************************************************************************
-**
-** Function BTM_UseLeLink
-**
-** Description This function is to select the underneath physical link to use.
-**
-** Returns true to use LE, false use BR/EDR.
-**
-*******************************************************************************/
+ *
+ * Function BTM_UseLeLink
+ *
+ * Description This function is to select the underneath physical link to use.
+ *
+ * Returns true to use LE, false use BR/EDR.
+ *
+ ******************************************************************************/
extern bool BTM_UseLeLink (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_BleStackEnable
-**
-** Description Enable/Disable BLE functionality on stack regarless controller
-** capability.
-**
-** Parameters: enable: true to enable, false to disable.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleStackEnable
+ *
+ * Description Enable/Disable BLE functionality on stack regarless controller
+ * capability.
+ *
+ * Parameters: enable: true to enable, false to disable.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleStackEnable (bool enable);
/*******************************************************************************
-**
-** Function BTM_GetLeSecurityState
-**
-** Description This function is called to get security mode 1 flags and
-** encryption key size for LE peer.
-**
-** Returns bool true if LE device is found, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function BTM_GetLeSecurityState
+ *
+ * Description This function is called to get security mode 1 flags and
+ * encryption key size for LE peer.
+ *
+ * Returns bool true if LE device is found, false otherwise.
+ *
+ ******************************************************************************/
extern bool BTM_GetLeSecurityState (BD_ADDR bd_addr,
uint8_t *p_le_dev_sec_flags,
uint8_t *p_le_key_size);
/*******************************************************************************
-**
-** Function BTM_BleSecurityProcedureIsRunning
-**
-** Description This function indicates if LE security procedure is
-** currently running with the peer.
-**
-** Returns bool true if security procedure is running, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleSecurityProcedureIsRunning
+ *
+ * Description This function indicates if LE security procedure is
+ * currently running with the peer.
+ *
+ * Returns bool true if security procedure is running, false otherwise.
+ *
+ ******************************************************************************/
extern bool BTM_BleSecurityProcedureIsRunning (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_BleGetSupportedKeySize
-**
-** Description This function gets the maximum encryption key size in bytes
-** the local device can suport.
-** record.
-**
-** Returns the key size or 0 if the size can't be retrieved.
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleGetSupportedKeySize
+ *
+ * Description This function gets the maximum encryption key size in bytes
+ * the local device can suport.
+ * record.
+ *
+ * Returns the key size or 0 if the size can't be retrieved.
+ *
+ ******************************************************************************/
extern uint8_t BTM_BleGetSupportedKeySize (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function BTM_BleAdvFilterParamSetup
-**
-** Description This function is called to setup the adv data payload filter
-** condition.
-**
-** Parameters p_target: enabble the filter condition on a target device; if NULL
-** enable the generic scan condition.
-** enable: enable or disable the filter condition
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleAdvFilterParamSetup
+ *
+ * Description This function is called to setup the adv data payload filter
+ * condition.
+ *
+ * Parameters p_target: enabble the filter condition on a target device; if NULL
+ * enable the generic scan condition.
+ * enable: enable or disable the filter condition
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleAdvFilterParamSetup(int action,
tBTM_BLE_PF_FILT_INDEX filt_index,
tBTM_BLE_PF_FILT_PARAMS *p_filt_params,
@@ -836,19 +836,19 @@
tBTM_BLE_REF_VALUE ref_value);
/*******************************************************************************
-**
-** Function BTM_BleCfgFilterCondition
-**
-** Description This function is called to configure the adv data payload filter
-** condition.
-**
-** Parameters action: to read/write/clear
-** cond_type: filter condition type.
-** p_cond: filter condition paramter
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleCfgFilterCondition
+ *
+ * Description This function is called to configure the adv data payload filter
+ * condition.
+ *
+ * Parameters action: to read/write/clear
+ * cond_type: filter condition type.
+ * p_cond: filter condition paramter
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleCfgFilterCondition(tBTM_BLE_SCAN_COND_OP action,
tBTM_BLE_PF_COND_TYPE cond_type,
tBTM_BLE_PF_FILT_INDEX filt_index,
@@ -857,43 +857,43 @@
tBTM_BLE_REF_VALUE ref_value);
/*******************************************************************************
-**
-** Function BTM_BleEnableDisableFilterFeature
-**
-** Description This function is called to enable or disable the APCF feature
-**
-** Parameters enable - true - enables the APCF, false - disables the APCF
-** ref_value - Ref value
-**
-** Returns tBTM_STATUS
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleEnableDisableFilterFeature
+ *
+ * Description This function is called to enable or disable the APCF feature
+ *
+ * Parameters enable - true - enables the APCF, false - disables the APCF
+ * ref_value - Ref value
+ *
+ * Returns tBTM_STATUS
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleEnableDisableFilterFeature(uint8_t enable,
tBTM_BLE_PF_STATUS_CBACK *p_stat_cback,
tBTM_BLE_REF_VALUE ref_value);
/*******************************************************************************
-**
-** Function BTM_BleGetEnergyInfo
-**
-** Description This function obtains the energy info
-**
-** Parameters p_ener_cback - Callback pointer
-**
-** Returns status
-**
-*******************************************************************************/
+ *
+ * Function BTM_BleGetEnergyInfo
+ *
+ * Description This function obtains the energy info
+ *
+ * Parameters p_ener_cback - Callback pointer
+ *
+ * Returns status
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_BleGetEnergyInfo(tBTM_BLE_ENERGY_INFO_CBACK *p_ener_cback);
/*******************************************************************************
-**
-** Function BTM_SetBleDataLength
-**
-** Description This function is called to set maximum BLE transmission packet size
-**
-** Returns BTM_SUCCESS if success; otherwise failed.
-**
-*******************************************************************************/
+ *
+ * Function BTM_SetBleDataLength
+ *
+ * Description This function is called to set maximum BLE transmission packet size
+ *
+ * Returns BTM_SUCCESS if success; otherwise failed.
+ *
+ ******************************************************************************/
extern tBTM_STATUS BTM_SetBleDataLength(BD_ADDR bd_addr, uint16_t tx_pdu_length);
extern void btm_ble_multi_adv_cleanup(void);
diff --git a/stack/include/btm_ble_api_types.h b/stack/include/btm_ble_api_types.h
index 164b73c..01ecbe8 100644
--- a/stack/include/btm_ble_api_types.h
+++ b/stack/include/btm_ble_api_types.h
@@ -268,7 +268,7 @@
} tBTM_RAND_ENC;
/* General callback function for notifying an application that a synchronous
-** BTM function is complete. The pointer contains the address of any returned data.
+ * BTM function is complete. The pointer contains the address of any returned data.
*/
typedef void (tBTM_RAND_ENC_CB) (tBTM_RAND_ENC *p1);
diff --git a/stack/include/btu.h b/stack/include/btu.h
index dc53b83..0ff76fc 100644
--- a/stack/include/btu.h
+++ b/stack/include/btu.h
@@ -60,7 +60,7 @@
extern const BD_ADDR BT_BD_ANY;
/* Functions provided by btu_task.cc
-************************************
+ ***********************************
*/
#if (HCILP_INCLUDED == TRUE)
@@ -68,13 +68,13 @@
#endif
/* Functions provided by btu_hcif.cc
-************************************
+ ***********************************
*/
extern void btu_hcif_process_event (uint8_t controller_id, BT_HDR *p_buf);
extern void btu_hcif_send_cmd (uint8_t controller_id, BT_HDR *p_msg);
/* Functions provided by btu_init.cc
-************************************
+ ***********************************
*/
extern void btu_init_core(void);
extern void btu_free_core(void);
diff --git a/stack/include/gap_api.h b/stack/include/gap_api.h
index 1da9bad..f4d6046 100644
--- a/stack/include/gap_api.h
+++ b/stack/include/gap_api.h
@@ -28,8 +28,8 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/*** GAP Error and Status Codes ***/
#define GAP_UNSUPPORTED (GAP_ERR_GRP + 0x01) /* Unsupported call */
#define GAP_EOINQDB (GAP_ERR_GRP + 0x02) /* End of inquiry database marker */
@@ -90,16 +90,16 @@
#endif
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
/*
-** Callback function for connection services
+ * Callback function for connection services
*/
typedef void (tGAP_CONN_CALLBACK) (uint16_t gap_handle, uint16_t event);
/*
-** Define the callback function prototypes. Parameters are specific
-** to each event and are described below
+ * Define the callback function prototypes. Parameters are specific
+ * to each event and are described below
*/
typedef void (tGAP_CALLBACK) (uint16_t event, void *p_data);
@@ -134,20 +134,20 @@
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*** Functions for L2CAP connection interface ***/
/*******************************************************************************
-**
-** Function GAP_ConnOpen
-**
-** Description This function is called to open a generic L2CAP connection.
-**
-** Returns handle of the connection if successful, else GAP_INVALID_HANDLE
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnOpen
+ *
+ * Description This function is called to open a generic L2CAP connection.
+ *
+ * Returns handle of the connection if successful, else GAP_INVALID_HANDLE
+ *
+ ******************************************************************************/
extern uint16_t GAP_ConnOpen(const char *p_serv_name, uint8_t service_id, bool is_server,
BD_ADDR p_rem_bda, uint16_t psm, tL2CAP_CFG_INFO *p_cfg,
tL2CAP_ERTM_INFO *ertm_info,
@@ -155,228 +155,228 @@
tGAP_CONN_CALLBACK *p_cb, tBT_TRANSPORT transport);
/*******************************************************************************
-**
-** Function GAP_ConnClose
-**
-** Description This function is called to close a connection.
-**
-** Returns BT_PASS - closed OK
-** GAP_ERR_BAD_HANDLE - invalid handle
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnClose
+ *
+ * Description This function is called to close a connection.
+ *
+ * Returns BT_PASS - closed OK
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ *
+ ******************************************************************************/
extern uint16_t GAP_ConnClose (uint16_t gap_handle);
/*******************************************************************************
-**
-** Function GAP_ConnReadData
-**
-** Description GKI buffer unaware application will call this function
-** after receiving GAP_EVT_RXDATA event. A data copy is made
-** into the receive buffer parameter.
-**
-** Returns BT_PASS - data read
-** GAP_ERR_BAD_HANDLE - invalid handle
-** GAP_NO_DATA_AVAIL - no data available
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnReadData
+ *
+ * Description GKI buffer unaware application will call this function
+ * after receiving GAP_EVT_RXDATA event. A data copy is made
+ * into the receive buffer parameter.
+ *
+ * Returns BT_PASS - data read
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ * GAP_NO_DATA_AVAIL - no data available
+ *
+ ******************************************************************************/
extern uint16_t GAP_ConnReadData (uint16_t gap_handle, uint8_t *p_data,
uint16_t max_len, uint16_t *p_len);
/*******************************************************************************
-**
-** Function GAP_GetRxQueueCnt
-**
-** Description This function return number of bytes on the rx queue.
-**
-** Parameters: handle - Handle returned in the GAP_ConnOpen
-** p_rx_queue_count - Pointer to return queue count in.
-**
-**
-*******************************************************************************/
+ *
+ * Function GAP_GetRxQueueCnt
+ *
+ * Description This function return number of bytes on the rx queue.
+ *
+ * Parameters: handle - Handle returned in the GAP_ConnOpen
+ * p_rx_queue_count - Pointer to return queue count in.
+ *
+ *
+ ******************************************************************************/
extern int GAP_GetRxQueueCnt (uint16_t handle, uint32_t *p_rx_queue_count);
/*******************************************************************************
-**
-** Function GAP_ConnBTRead
-**
-** Description GKI buffer aware applications will call this function after
-** receiving an GAP_EVT_RXDATA event to process the incoming
-** data buffer.
-**
-** Returns BT_PASS - data read
-** GAP_ERR_BAD_HANDLE - invalid handle
-** GAP_NO_DATA_AVAIL - no data available
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnBTRead
+ *
+ * Description GKI buffer aware applications will call this function after
+ * receiving an GAP_EVT_RXDATA event to process the incoming
+ * data buffer.
+ *
+ * Returns BT_PASS - data read
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ * GAP_NO_DATA_AVAIL - no data available
+ *
+ ******************************************************************************/
extern uint16_t GAP_ConnBTRead (uint16_t gap_handle, BT_HDR **pp_buf);
/*******************************************************************************
-**
-** Function GAP_ConnWriteData
-**
-** Description GKI buffer unaware application will call this function
-** to send data to the connection. A data copy is made into a GKI
-** buffer.
-**
-** Returns BT_PASS - data read
-** GAP_ERR_BAD_HANDLE - invalid handle
-** GAP_ERR_BAD_STATE - connection not established
-** GAP_CONGESTION - system is congested
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnWriteData
+ *
+ * Description GKI buffer unaware application will call this function
+ * to send data to the connection. A data copy is made into a GKI
+ * buffer.
+ *
+ * Returns BT_PASS - data read
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ * GAP_ERR_BAD_STATE - connection not established
+ * GAP_CONGESTION - system is congested
+ *
+ ******************************************************************************/
extern uint16_t GAP_ConnWriteData (uint16_t gap_handle, uint8_t *p_data,
uint16_t max_len, uint16_t *p_len);
/*******************************************************************************
-**
-** Function GAP_ConnReconfig
-**
-** Description Applications can call this function to reconfigure the connection.
-**
-** Returns BT_PASS - config process started
-** GAP_ERR_BAD_HANDLE - invalid handle
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnReconfig
+ *
+ * Description Applications can call this function to reconfigure the connection.
+ *
+ * Returns BT_PASS - config process started
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ *
+ ******************************************************************************/
extern uint16_t GAP_ConnReconfig (uint16_t gap_handle, tL2CAP_CFG_INFO *p_cfg);
/*******************************************************************************
-**
-** Function GAP_ConnSetIdleTimeout
-**
-** Description Higher layers call this function to set the idle timeout for
-** a connection, or for all future connections. 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.
-**
-** Returns BT_PASS - config process started
-** GAP_ERR_BAD_HANDLE - invalid handle
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnSetIdleTimeout
+ *
+ * Description Higher layers call this function to set the idle timeout for
+ * a connection, or for all future connections. 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.
+ *
+ * Returns BT_PASS - config process started
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ *
+ ******************************************************************************/
extern uint16_t GAP_ConnSetIdleTimeout (uint16_t gap_handle, uint16_t timeout);
/*******************************************************************************
-**
-** Function GAP_ConnGetRemoteAddr
-**
-** Description This function is called to get the remote BD address
-** of a connection.
-**
-** Returns BT_PASS - closed OK
-** GAP_ERR_BAD_HANDLE - invalid handle
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnGetRemoteAddr
+ *
+ * Description This function is called to get the remote BD address
+ * of a connection.
+ *
+ * Returns BT_PASS - closed OK
+ * GAP_ERR_BAD_HANDLE - invalid handle
+ *
+ ******************************************************************************/
extern uint8_t *GAP_ConnGetRemoteAddr (uint16_t gap_handle);
/*******************************************************************************
-**
-** Function GAP_ConnGetRemMtuSize
-**
-** Description Returns the remote device's MTU size.
-**
-** Returns uint16_t - maximum size buffer that can be transmitted to the peer
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnGetRemMtuSize
+ *
+ * Description Returns the remote device's MTU size.
+ *
+ * Returns uint16_t - maximum size buffer that can be transmitted to the peer
+ *
+ ******************************************************************************/
extern uint16_t GAP_ConnGetRemMtuSize (uint16_t gap_handle);
/*******************************************************************************
-**
-** Function GAP_ConnGetL2CAPCid
-**
-** Description Returns the L2CAP channel id
-**
-** Parameters: handle - Handle of the connection
-**
-** Returns uint16_t - The L2CAP channel id
-** 0, if error
-**
-*******************************************************************************/
+ *
+ * Function GAP_ConnGetL2CAPCid
+ *
+ * Description Returns the L2CAP channel id
+ *
+ * Parameters: handle - Handle of the connection
+ *
+ * Returns uint16_t - The L2CAP channel id
+ * 0, if error
+ *
+ ******************************************************************************/
extern uint16_t GAP_ConnGetL2CAPCid (uint16_t gap_handle);
/*******************************************************************************
-**
-** Function GAP_SetTraceLevel
-**
-** Description This function sets the trace level for GAP. If called with
-** a value of 0xFF, it simply returns the current trace level.
-**
-** Returns The new or current trace level
-**
-*******************************************************************************/
+ *
+ * Function GAP_SetTraceLevel
+ *
+ * Description This function sets the trace level for GAP. If called with
+ * a value of 0xFF, it simply returns the current trace level.
+ *
+ * Returns The new or current trace level
+ *
+ ******************************************************************************/
extern uint8_t GAP_SetTraceLevel (uint8_t new_level);
/*******************************************************************************
-**
-** Function GAP_Init
-**
-** Description Initializes the control blocks used by GAP.
-** This routine should not be called except once per
-** stack invocation.
-**
-** Returns Nothing
-**
-*******************************************************************************/
+ *
+ * Function GAP_Init
+ *
+ * Description Initializes the control blocks used by GAP.
+ * This routine should not be called except once per
+ * stack invocation.
+ *
+ * Returns Nothing
+ *
+ ******************************************************************************/
extern void GAP_Init(void);
/*******************************************************************************
-**
-** Function GAP_BleAttrDBUpdate
-**
-** Description update GAP local BLE attribute database.
-**
-** Returns Nothing
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleAttrDBUpdate
+ *
+ * Description update GAP local BLE attribute database.
+ *
+ * Returns Nothing
+ *
+ ******************************************************************************/
extern void GAP_BleAttrDBUpdate(uint16_t attr_uuid, tGAP_BLE_ATTR_VALUE *p_value);
/*******************************************************************************
-**
-** Function GAP_BleReadPeerPrefConnParams
-**
-** Description Start a process to read a connected peripheral's preferred
-** connection parameters
-**
-** Returns true if read started, else false if GAP is busy
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleReadPeerPrefConnParams
+ *
+ * Description Start a process to read a connected peripheral's preferred
+ * connection parameters
+ *
+ * Returns true if read started, else false if GAP is busy
+ *
+ ******************************************************************************/
extern bool GAP_BleReadPeerPrefConnParams (BD_ADDR peer_bda);
/*******************************************************************************
-**
-** Function GAP_BleReadPeerDevName
-**
-** Description Start a process to read a connected peripheral's device name.
-**
-** Returns true if request accepted
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleReadPeerDevName
+ *
+ * Description Start a process to read a connected peripheral's device name.
+ *
+ * Returns true if request accepted
+ *
+ ******************************************************************************/
extern bool GAP_BleReadPeerDevName (BD_ADDR peer_bda, tGAP_BLE_CMPL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function GAP_BleReadPeerAddressResolutionCap
-**
-** Description Start a process to read peer address resolution capability
-**
-** Returns true if request accepted
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleReadPeerAddressResolutionCap
+ *
+ * Description Start a process to read peer address resolution capability
+ *
+ * Returns true if request accepted
+ *
+ ******************************************************************************/
extern bool GAP_BleReadPeerAddressResolutionCap (BD_ADDR peer_bda,
tGAP_BLE_CMPL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function GAP_BleCancelReadPeerDevName
-**
-** Description Cancel reading a peripheral's device name.
-**
-** Returns true if request accepted
-**
-*******************************************************************************/
+ *
+ * Function GAP_BleCancelReadPeerDevName
+ *
+ * Description Cancel reading a peripheral's device name.
+ *
+ * Returns true if request accepted
+ *
+ ******************************************************************************/
extern bool GAP_BleCancelReadPeerDevName (BD_ADDR peer_bda);
#ifdef __cplusplus
diff --git a/stack/include/gatt_api.h b/stack/include/gatt_api.h
index 4f31754..4db2843 100644
--- a/stack/include/gatt_api.h
+++ b/stack/include/gatt_api.h
@@ -27,8 +27,8 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/* Success code and error codes */
#define GATT_SUCCESS 0x00
#define GATT_INVALID_HANDLE 0x01
@@ -154,8 +154,8 @@
#endif
/*****************************************************************************
-** GATT Structure Definition
-*****************************************************************************/
+ * GATT Structure Definition
+ ****************************************************************************/
/* Attribute permissions
*/
@@ -590,8 +590,8 @@
/* Define the structure that applications use to register with
-** GATT. This structure includes callback functions. All functions
-** MUST be provided.
+ * GATT. This structure includes callback functions. All functions
+ * MUST be provided.
*/
typedef struct
{
@@ -658,58 +658,58 @@
} tGATT_APPL_INFO;
/*
-*********************** End Handle Management Definitions **********************/
+ ********************** End Handle Management Definitions **********************/
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function GATT_SetTraceLevel
-**
-** Description This function sets the trace level. If called with
-** a value of 0xFF, it simply returns the current trace level.
-**
-** Returns The new or current trace level
-**
-*******************************************************************************/
+ *
+ * Function GATT_SetTraceLevel
+ *
+ * Description This function sets the trace level. If called with
+ * a value of 0xFF, it simply returns the current trace level.
+ *
+ * Returns The new or current trace level
+ *
+ ******************************************************************************/
extern uint8_t GATT_SetTraceLevel (uint8_t new_level);
-/*******************************************************************************/
+/******************************************************************************/
/* GATT Profile API Functions */
-/*******************************************************************************/
+/******************************************************************************/
/* GATT Profile Server Functions */
-/*******************************************************************************/
+/******************************************************************************/
/*******************************************************************************
-**
-** Function GATTS_AddHandleRange
-**
-** Description This function add the allocated handles range for the specifed
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_AddHandleRange
+ *
+ * Description This function add the allocated handles range for the specifed
+ * 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.
+ *
+ ******************************************************************************/
extern bool 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.
-**
-** Parameter p_cb_info : callback informaiton
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ * Parameter p_cb_info : callback informaiton
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
extern bool GATTS_NVRegister (tGATT_APPL_INFO *p_cb_info);
/* Converts 16bit uuid to bt_uuid_t that can be used when adding
@@ -717,373 +717,373 @@
void uuid_128_from_16(bt_uuid_t *uuid, uint16_t uuid16);
/*******************************************************************************
-**
-** Function BTA_GATTS_AddService
-**
-** Description Add a service. When service is ready, a callback
-** event BTA_GATTS_ADD_SRVC_EVT is called to report status
-** and handles to the profile.
-**
-** Parameters server_if: server interface.
-** service: pointer array describing service.
-** count: number of elements in service array.
-**
-** Returns on success GATT_SERVICE_STARTED is returned, and
-** attribute_handle field inside service elements are filled.
-** on error error status is returned.
-**
-*******************************************************************************/
+ *
+ * Function BTA_GATTS_AddService
+ *
+ * Description Add a service. When service is ready, a callback
+ * event BTA_GATTS_ADD_SRVC_EVT is called to report status
+ * and handles to the profile.
+ *
+ * Parameters server_if: server interface.
+ * service: pointer array describing service.
+ * count: number of elements in service array.
+ *
+ * Returns on success GATT_SERVICE_STARTED is returned, and
+ * attribute_handle field inside service elements are filled.
+ * on error error status is returned.
+ *
+ ******************************************************************************/
extern uint16_t GATTS_AddService(tGATT_IF gatt_if, btgatt_db_element_t *service, int count);
/*******************************************************************************
-**
-** Function GATTS_DeleteService
-**
-** Description This function is called to delete a service.
-**
-** Parameter gatt_if : application interface
-** p_svc_uuid : service UUID
-** svc_inst : instance of the service inside the application
-**
-** Returns true if operation succeed, false if handle block was not found.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_DeleteService
+ *
+ * Description This function is called to delete a service.
+ *
+ * Parameter gatt_if : application interface
+ * p_svc_uuid : service UUID
+ * svc_inst : instance of the service inside the application
+ *
+ * Returns true if operation succeed, false if handle block was not found.
+ *
+ ******************************************************************************/
extern bool GATTS_DeleteService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid, uint16_t svc_inst);
/*******************************************************************************
-**
-** Function GATTS_StopService
-**
-** Description This function is called to stop a service
-**
-** Parameter service_handle : this is the start handle of a service
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_StopService
+ *
+ * Description This function is called to stop a service
+ *
+ * Parameter service_handle : this is the start handle of a service
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
extern void GATTS_StopService (uint16_t service_handle);
/*******************************************************************************
-**
-** Function GATTs_HandleValueIndication
-**
-** 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.
-** val_len: Length of the indicated attribute value.
-** p_val: Pointer to the indicated attribute value data.
-**
-** Returns GATT_SUCCESS if sucessfully sent or queued; otherwise error code.
-**
-*******************************************************************************/
+ *
+ * Function GATTs_HandleValueIndication
+ *
+ * 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.
+ * val_len: Length of the indicated attribute value.
+ * p_val: Pointer to the indicated attribute value data.
+ *
+ * Returns GATT_SUCCESS if sucessfully sent or queued; otherwise error code.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATTS_HandleValueIndication (uint16_t conn_id,
uint16_t attr_handle,
uint16_t val_len, uint8_t *p_val);
/*******************************************************************************
-**
-** Function GATTS_HandleValueNotification
-**
-** 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.
-** val_len: Length of the indicated attribute value.
-** p_val: Pointer to the indicated attribute value data.
-**
-** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_HandleValueNotification
+ *
+ * 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.
+ * val_len: Length of the indicated attribute value.
+ * p_val: Pointer to the indicated attribute value data.
+ *
+ * Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATTS_HandleValueNotification (uint16_t conn_id, uint16_t attr_handle,
uint16_t val_len, uint8_t *p_val);
/*******************************************************************************
-**
-** Function GATTS_SendRsp
-**
-** Description This function sends the server response to client.
-**
-** Parameter conn_id: connection identifier.
-** trans_id: transaction id
-** status: response status
-** p_msg: pointer to message parameters structure.
-**
-** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
-**
-*******************************************************************************/
+ *
+ * Function GATTS_SendRsp
+ *
+ * Description This function sends the server response to client.
+ *
+ * Parameter conn_id: connection identifier.
+ * trans_id: transaction id
+ * status: response status
+ * p_msg: pointer to message parameters structure.
+ *
+ * Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATTS_SendRsp (uint16_t conn_id, uint32_t trans_id,
tGATT_STATUS status, tGATTS_RSP *p_msg);
-/*******************************************************************************/
+/******************************************************************************/
/* GATT Profile Client Functions */
-/*******************************************************************************/
+/******************************************************************************/
/*******************************************************************************
-**
-** 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.
-** mtu - attribute MTU size..
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * 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.
+ * mtu - attribute MTU size..
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATTC_ConfigureMTU (uint16_t conn_id, uint16_t mtu);
/*******************************************************************************
-**
-** Function GATTC_Discover
-**
-** Description This function is called to do a discovery procedure on ATT server.
-**
-** Parameters conn_id: connection identifier.
-** disc_type:discovery type.
-** p_param: parameters of discovery requirement.
-**
-** Returns GATT_SUCCESS if command received/sent successfully.
-**
-*******************************************************************************/
+ *
+ * Function GATTC_Discover
+ *
+ * Description This function is called to do a discovery procedure on ATT server.
+ *
+ * Parameters conn_id: connection identifier.
+ * disc_type:discovery type.
+ * p_param: parameters of discovery requirement.
+ *
+ * Returns GATT_SUCCESS if command received/sent successfully.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATTC_Discover (uint16_t conn_id,
tGATT_DISC_TYPE disc_type,
tGATT_DISC_PARAM *p_param );
/*******************************************************************************
-**
-** Function GATTC_Read
-**
-** Description This function is called to read the value of an attribute from
-** the server.
-**
-** Parameters conn_id: connection identifier.
-** type - attribute read type.
-** p_read - read operation parameters.
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * Function GATTC_Read
+ *
+ * Description This function is called to read the value of an attribute from
+ * the server.
+ *
+ * Parameters conn_id: connection identifier.
+ * type - attribute read type.
+ * p_read - read operation parameters.
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATTC_Read (uint16_t conn_id, tGATT_READ_TYPE type,
tGATT_READ_PARAM *p_read);
/*******************************************************************************
-**
-** Function GATTC_Write
-**
-** Description This function is called to read the value of an attribute from
-** the server.
-**
-** Parameters conn_id: connection identifier.
-** type - attribute write type.
-** p_write - write operation parameters.
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * Function GATTC_Write
+ *
+ * Description This function is called to read the value of an attribute from
+ * the server.
+ *
+ * Parameters conn_id: connection identifier.
+ * type - attribute write type.
+ * p_write - write operation parameters.
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATTC_Write (uint16_t conn_id, tGATT_WRITE_TYPE type,
tGATT_VALUE *p_write);
/*******************************************************************************
-**
-** Function GATTC_ExecuteWrite
-**
-** Description This function is called to send an Execute write request to
-** the server.
-**
-** Parameters conn_id: connection identifier.
-** is_execute - to execute or cancel the prepare write requet(s)
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * Function GATTC_ExecuteWrite
+ *
+ * Description This function is called to send an Execute write request to
+ * the server.
+ *
+ * Parameters conn_id: connection identifier.
+ * is_execute - to execute or cancel the prepare write requet(s)
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATTC_ExecuteWrite (uint16_t conn_id, bool is_execute);
/*******************************************************************************
-**
-** 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.
-** handle: the handle of the attribute confirmation.
-**
-** Returns GATT_SUCCESS if command started successfully.
-**
-*******************************************************************************/
+ *
+ * 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.
+ * handle: the handle of the attribute confirmation.
+ *
+ * Returns GATT_SUCCESS if command started successfully.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATTC_SendHandleValueConfirm (uint16_t conn_id, uint16_t handle);
/*******************************************************************************
-**
-** Function GATT_SetIdleTimeout
-**
-** Description This function (common to both client and server) sets the idle
-** timeout for a tansport connection
-**
-** Parameter bd_addr: target device bd address.
-** idle_tout: timeout value in seconds.
-** transport: trasnport option.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function GATT_SetIdleTimeout
+ *
+ * Description This function (common to both client and server) sets the idle
+ * timeout for a tansport connection
+ *
+ * Parameter bd_addr: target device bd address.
+ * idle_tout: timeout value in seconds.
+ * transport: trasnport option.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void GATT_SetIdleTimeout (BD_ADDR bd_addr, uint16_t idle_tout,
tGATT_TRANSPORT transport);
/*******************************************************************************
-**
-** Function GATT_Register
-**
-** Description This function is called to register an application
-** with GATT
-**
-** Parameter p_app_uuid128: Application UUID
-** p_cb_info: callback functions.
-**
-** Returns 0 for error, otherwise the index of the client registered with GATT
-**
-*******************************************************************************/
+ *
+ * Function GATT_Register
+ *
+ * Description This function is called to register an application
+ * with GATT
+ *
+ * Parameter p_app_uuid128: Application UUID
+ * p_cb_info: callback functions.
+ *
+ * Returns 0 for error, otherwise the index of the client registered with GATT
+ *
+ ******************************************************************************/
extern 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.
-**
-** Parameters gatt_if: applicaiton interface.
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function GATT_Deregister
+ *
+ * Description This function deregistered the application from GATT.
+ *
+ * Parameters gatt_if: applicaiton interface.
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
extern void GATT_Deregister (tGATT_IF gatt_if);
/*******************************************************************************
-**
-** Function GATT_StartIf
-**
-** Description This function is called after registration to start receiving
-** callbacks for registered interface. Function may call back
-** with connection status and queued notifications
-**
-** Parameter gatt_if: applicaiton interface.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function GATT_StartIf
+ *
+ * Description This function is called after registration to start receiving
+ * callbacks for registered interface. Function may call back
+ * with connection status and queued notifications
+ *
+ * Parameter gatt_if: applicaiton interface.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
extern void GATT_StartIf (tGATT_IF gatt_if);
/*******************************************************************************
-**
-** Function GATT_Connect
-**
-** Description This function initiate a connecttion to a remote device on GATT
-** channel.
-**
-** Parameters gatt_if: applicaiton interface
-** bd_addr: peer device address.
-** is_direct: is a direct connection or a background auto connection
-** transport : Physical transport for GATT connection (BR/EDR or LE)
-** opportunistic: will not keep device connected if other apps
-** disconnect, will not update connected apps counter, when
-** disconnected won't cause physical disconnection.
-**
-** Returns true if connection started; false if connection start failure.
-**
-*******************************************************************************/
+ *
+ * Function GATT_Connect
+ *
+ * Description This function initiate a connecttion to a remote device on GATT
+ * channel.
+ *
+ * Parameters gatt_if: applicaiton interface
+ * bd_addr: peer device address.
+ * is_direct: is a direct connection or a background auto connection
+ * transport : Physical transport for GATT connection (BR/EDR or LE)
+ * opportunistic: will not keep device connected if other apps
+ * disconnect, will not update connected apps counter, when
+ * disconnected won't cause physical disconnection.
+ *
+ * Returns true if connection started; false if connection start failure.
+ *
+ ******************************************************************************/
extern bool GATT_Connect (tGATT_IF gatt_if, BD_ADDR bd_addr,
bool is_direct, tBT_TRANSPORT transport,
bool opportunistic);
/*******************************************************************************
-**
-** Function GATT_CancelConnect
-**
-** Description This function terminate the connection initaition to a remote
-** device on GATT channel.
-**
-** Parameters gatt_if: client interface. If 0 used as unconditionally disconnect,
-** typically used for direct connection cancellation.
-** bd_addr: peer device address.
-** is_direct: is a direct conenection or a background auto connection
-**
-** Returns true if connection started; false if connection start failure.
-**
-*******************************************************************************/
+ *
+ * Function GATT_CancelConnect
+ *
+ * Description This function terminate the connection initaition to a remote
+ * device on GATT channel.
+ *
+ * Parameters gatt_if: client interface. If 0 used as unconditionally disconnect,
+ * typically used for direct connection cancellation.
+ * bd_addr: peer device address.
+ * is_direct: is a direct conenection or a background auto connection
+ *
+ * Returns true if connection started; false if connection start failure.
+ *
+ ******************************************************************************/
extern bool GATT_CancelConnect (tGATT_IF gatt_if, BD_ADDR bd_addr,
bool is_direct);
/*******************************************************************************
-**
-** Function GATT_Disconnect
-**
-** Description This function disconnect the GATT channel for this registered
-** application.
-**
-** Parameters conn_id: connection identifier.
-**
-** Returns GATT_SUCCESS if disconnected.
-**
-*******************************************************************************/
+ *
+ * Function GATT_Disconnect
+ *
+ * Description This function disconnect the GATT channel for this registered
+ * application.
+ *
+ * Parameters conn_id: connection identifier.
+ *
+ * Returns GATT_SUCCESS if disconnected.
+ *
+ ******************************************************************************/
extern tGATT_STATUS GATT_Disconnect (uint16_t conn_id);
/*******************************************************************************
-**
-** Function GATT_GetConnectionInfor
-**
-** Description This function use conn_id to find its associated BD address and applciation
-** interface
-**
-** Parameters conn_id: connection id (input)
-** p_gatt_if: applicaiton interface (output)
-** bd_addr: peer device address. (output)
-** transport : physical transport of the GATT connection (BR/EDR or LE)
-**
-** Returns true the ligical link information is found for conn_id
-**
-*******************************************************************************/
+ *
+ * Function GATT_GetConnectionInfor
+ *
+ * Description This function use conn_id to find its associated BD address and applciation
+ * interface
+ *
+ * Parameters conn_id: connection id (input)
+ * p_gatt_if: applicaiton interface (output)
+ * bd_addr: peer device address. (output)
+ * transport : physical transport of the GATT connection (BR/EDR or LE)
+ *
+ * Returns true the ligical link information is found for conn_id
+ *
+ ******************************************************************************/
extern bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF *p_gatt_if,
BD_ADDR bd_addr, tBT_TRANSPORT *p_transport);
/*******************************************************************************
-**
-** Function GATT_GetConnIdIfConnected
-**
-** 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)
-** bd_addr: peer device address. (input)
-** p_conn_id: connection id (output)
-** transport : physical transport of the GATT connection (BR/EDR or LE)
-**
-** Returns true the ligical link is connected
-**
-*******************************************************************************/
+ *
+ * Function GATT_GetConnIdIfConnected
+ *
+ * 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)
+ * bd_addr: peer device address. (input)
+ * p_conn_id: connection id (output)
+ * transport : physical transport of the GATT connection (BR/EDR or LE)
+ *
+ * Returns true the ligical link is connected
+ *
+ ******************************************************************************/
extern bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr,
uint16_t *p_conn_id, tBT_TRANSPORT transport);
/*******************************************************************************
-**
-** Function GATT_ConfigServiceChangeCCC
-**
-** Description Configure service change indication on remote device
-**
-** Returns None.
-**
-*******************************************************************************/
+ *
+ * Function GATT_ConfigServiceChangeCCC
+ *
+ * Description Configure service change indication on remote device
+ *
+ * Returns None.
+ *
+ ******************************************************************************/
extern void GATT_ConfigServiceChangeCCC (BD_ADDR remote_bda, bool enable,
tBT_TRANSPORT transport);
diff --git a/stack/include/hcidefs.h b/stack/include/hcidefs.h
index c064501..f2d3a8d 100644
--- a/stack/include/hcidefs.h
+++ b/stack/include/hcidefs.h
@@ -29,7 +29,7 @@
#define HCI_PROTO_VERSION_4_2 0x08 /* Version for BT spec 4.2 */
/*
-** Definitions for HCI groups
+ * Definitions for HCI groups
*/
#define HCI_GRP_LINK_CONTROL_CMDS (0x01 << 10) /* 0x0400 */
#define HCI_GRP_LINK_POLICY_CMDS (0x02 << 10) /* 0x0800 */
@@ -45,7 +45,7 @@
#define HCI_OCF(p) ( 0x3FF & (p))
/*
-** Definitions for Link Control Commands
+ * Definitions for Link Control Commands
*/
/* Following opcode is used only in command complete event for flow control */
#define HCI_COMMAND_NONE 0x0000
@@ -625,7 +625,7 @@
#define HCI_LE_STATES_INIT_MASTER_SLAVE_SUPPORTED(x) ((x)[HCI_SUPP_LE_STATES_INIT_MASTER_SLAVE_OFF] & HCI_SUPP_LE_STATES_INIT_MASTER_SLAVE_MASK)
/*
-** Definitions for HCI Events
+ * Definitions for HCI Events
*/
#define HCI_INQUIRY_COMP_EVT 0x01
#define HCI_INQUIRY_RESULT_EVT 0x02
@@ -715,7 +715,7 @@
specification compliant */
/*
-** Defentions for HCI Error Codes that are past in the events
+ * Defentions for HCI Error Codes that are past in the events
*/
#define HCI_SUCCESS 0x00
#define HCI_PENDING 0x00
@@ -794,7 +794,7 @@
#define HCI_HINT_TO_RECREATE_AMP_PHYS_LINK 0xFF
/*
-** Definitions for HCI enable event
+ * Definitions for HCI enable event
*/
#define HCI_INQUIRY_COMPLETE_EV(p) (*((uint32_t *)(p)) & 0x00000001)
#define HCI_INQUIRY_RESULT_EV(p) (*((uint32_t *)(p)) & 0x00000002)
@@ -900,7 +900,7 @@
#define HCI_BLE_EVENT_MASK_DEF "\x00\x00\x00\x00\x00\x00\x00\x7f"
#endif
/*
-** Definitions for packet type masks (BT1.2 and BT2.0 definitions)
+ * Definitions for packet type masks (BT1.2 and BT2.0 definitions)
*/
#define HCI_PKT_TYPES_MASK_NO_2_DH1 0x0002
#define HCI_PKT_TYPES_MASK_NO_3_DH1 0x0004
@@ -949,7 +949,7 @@
| HCI_PKT_TYPES_MASK_DH5)) != 0))
/*
-** Definitions for eSCO packet type masks (BT1.2 and BT2.0 definitions)
+ * Definitions for eSCO packet type masks (BT1.2 and BT2.0 definitions)
*/
#define HCI_ESCO_PKT_TYPES_MASK_HV1 0x0001
#define HCI_ESCO_PKT_TYPES_MASK_HV2 0x0002
@@ -982,19 +982,19 @@
&& ((t) != 0))
/*
-** Define parameters to allow role switch during create connection
+ * 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
/*
-** Definitions for different HCI parameters
+ * Definitions for different HCI parameters
*/
#define HCI_PER_INQ_MIN_MAX_PERIOD 0x0003
#define HCI_PER_INQ_MAX_MAX_PERIOD 0xFFFF
@@ -1292,12 +1292,12 @@
#define HCI_COMMAND_SIZE 255
/* Define the preamble length for all HCI Commands.
-** This is 2-bytes for opcode and 1 byte for length
+ * This is 2-bytes for opcode and 1 byte for length
*/
#define HCIC_PREAMBLE_SIZE 3
/* Define the preamble length for all HCI Events
-** This is 1-byte for opcode and 1 byte for length
+ * This is 1-byte for opcode and 1 byte for length
*/
#define HCIE_PREAMBLE_SIZE 2
#define HCI_SCO_PREAMBLE_SIZE 3
@@ -1364,7 +1364,7 @@
#define HCI_BRCM_SET_ACL_PRIORITY (0x0057 | HCI_GRP_VENDOR_SPECIFIC)
/* Define values for LMP Test Control parameters
-** Test Scenario, Hopping Mode, Power Control Mode
+ * Test Scenario, Hopping Mode, Power Control Mode
*/
#define LMP_TESTCTL_TESTSC_PAUSE 0
#define LMP_TESTCTL_TESTSC_TXTEST_0 1
@@ -1392,7 +1392,7 @@
#define LMP_COMPID_BROADCOM 15
/*
-** Define the packet types in the packet header, and a couple extra
+ * Define the packet types in the packet header, and a couple extra
*/
#define PKT_TYPE_NULL 0x00
#define PKT_TYPE_POLL 0x01
@@ -1418,7 +1418,7 @@
#define PKT_TYPE_NONE 0x12
/*
-** Define packet size
+ * Define packet size
*/
#define HCI_DM1_PACKET_SIZE 17
#define HCI_DH1_PACKET_SIZE 27
@@ -1449,7 +1449,7 @@
#define HCI_FEATURES_KNOWN(x) (((x)[0] | (x)[1] | (x)[2] | (x)[3] | (x)[4] | (x)[5] | (x)[6] | (x)[7]) != 0)
/*
-** LMP features encoding - page 0
+ * LMP features encoding - page 0
*/
#define HCI_FEATURE_3_SLOT_PACKETS_MASK 0x01
#define HCI_FEATURE_3_SLOT_PACKETS_OFF 0
@@ -1685,7 +1685,7 @@
#define HCI_LMP_EXTENDED_SUPPORTED(x) ((x)[HCI_FEATURE_EXTENDED_OFF] & HCI_FEATURE_EXTENDED_MASK)
/*
-** LMP features encoding - page 1
+ * LMP features encoding - page 1
*/
#define HCI_EXT_FEATURE_SSP_HOST_MASK 0x01
#define HCI_EXT_FEATURE_SSP_HOST_OFF 0
@@ -1704,7 +1704,7 @@
#define HCI_SC_HOST_SUPPORTED(x) ((x)[HCI_EXT_FEATURE_SC_HOST_OFF] & HCI_EXT_FEATURE_SC_HOST_MASK)
/*
-** LMP features encoding - page 2
+ * LMP features encoding - page 2
*/
#define HCI_EXT_FEATURE_CSB_MASTER_MASK 0x01
#define HCI_EXT_FEATURE_CSB_MASTER_OFF 0
@@ -1735,7 +1735,7 @@
#define HCI_PING_SUPPORTED(x) ((x)[HCI_EXT_FEATURE_PING_OFF] & HCI_EXT_FEATURE_PING_MASK)
/*
-** LE features encoding - page 0 (the only page for now)
+ * LE features encoding - page 0 (the only page for now)
*/
/* LE Encryption */
#define HCI_LE_FEATURE_LE_ENCRYPTION_MASK 0x01
@@ -1773,7 +1773,7 @@
#define HCI_LE_DATA_LEN_EXT_SUPPORTED(x) ((x)[HCI_LE_FEATURE_DATA_LEN_EXT_OFF] & HCI_LE_FEATURE_DATA_LEN_EXT_MASK)
/*
-** Local Supported Commands encoding
+ * Local Supported Commands encoding
*/
#define HCI_NUM_SUPP_COMMANDS_BYTES 64
@@ -2454,11 +2454,11 @@
#define HCI_SHORT_RANGE_MODE_SUPPORTED(x) ((x)[HCI_SUPP_COMMANDS_SHORT_RANGE_MODE_OFF] & HCI_SUPP_COMMANDS_SHORT_RANGE_MODE_MASK)
/* LE commands TBD
-** Supported Commands (Byte 24 continued)
-** Supported Commands (Byte 25)
-** Supported Commands (Byte 26)
-** Supported Commands (Byte 27)
-** Supported Commands (Byte 28)
+ * Supported Commands (Byte 24 continued)
+ * Supported Commands (Byte 25)
+ * Supported Commands (Byte 26)
+ * Supported Commands (Byte 27)
+ * Supported Commands (Byte 28)
*/
/* Supported Commands (Byte 29) */
diff --git a/stack/include/hcimsgs.h b/stack/include/hcimsgs.h
index 4e1613e..ec99c74 100644
--- a/stack/include/hcimsgs.h
+++ b/stack/include/hcimsgs.h
@@ -356,8 +356,8 @@
/* Write Default Policy Settings */
/******************************************
-** Lisbon Features
-*******************************************/
+ * Lisbon Features
+ ******************************************/
#if (BTM_SSR_INCLUDED == TRUE)
/* Sniff Subrating */
extern void btsnd_hcic_sniff_sub_rate(uint16_t handle, uint16_t max_lat,
@@ -638,10 +638,10 @@
uint8_t len, uint8_t *p_data,
void *p_cmd_cplt_cback);
-/********************************************************************************
-** BLE Commands
-** Note: "local_controller_id" is for transport, not counted in HCI message size
-*********************************************************************************/
+/*******************************************************************************
+ * BLE Commands
+ * Note: "local_controller_id" is for transport, not counted in HCI message size
+ ******************************************************************************/
#define HCIC_BLE_RAND_DI_SIZE 8
#define HCIC_BLE_ENCRYT_KEY_SIZE 16
#define HCIC_BLE_IRK_SIZE 16
diff --git a/stack/include/hiddefs.h b/stack/include/hiddefs.h
index 705fcce..a050195 100644
--- a/stack/include/hiddefs.h
+++ b/stack/include/hiddefs.h
@@ -27,7 +27,7 @@
#include "sdp_api.h"
/*
-** tHID_STATUS: HID result codes, returned by HID and device and host functions.
+ * tHID_STATUS: HID result codes, returned by HID and device and host functions.
*/
enum
{
diff --git a/stack/include/hidh_api.h b/stack/include/hidh_api.h
index 01d7678..b906be7 100644
--- a/stack/include/hidh_api.h
+++ b/stack/include/hidh_api.h
@@ -26,8 +26,8 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
enum {
HID_SDP_NO_SERV_UUID = (SDP_ILLEGAL_PARAMETER+1),
@@ -50,8 +50,8 @@
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
typedef void (tHID_HOST_SDP_CALLBACK) (uint16_t result, uint16_t attr_mask,
tHID_DEV_SDP_INFO *sdp_rec );
@@ -88,145 +88,145 @@
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function HID_HostGetSDPRecord
-**
-** Description This function reads the device SDP record.
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostGetSDPRecord
+ *
+ * Description This function reads the device SDP record.
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
extern tHID_STATUS HID_HostGetSDPRecord (BD_ADDR addr,
tSDP_DISCOVERY_DB *p_db,
uint32_t db_len,
tHID_HOST_SDP_CALLBACK *sdp_cback );
/*******************************************************************************
-**
-** Function HID_HostRegister
-**
-** Description This function registers HID-Host with lower layers.
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostRegister
+ *
+ * Description This function registers HID-Host with lower layers.
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
extern tHID_STATUS HID_HostRegister (tHID_HOST_DEV_CALLBACK *dev_cback);
/*******************************************************************************
-**
-** Function HID_HostDeregister
-**
-** Description This function is called when the host is about power down.
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostDeregister
+ *
+ * Description This function is called when the host is about power down.
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
extern tHID_STATUS HID_HostDeregister(void);
/*******************************************************************************
-**
-** Function HID_HostAddDev
-**
-** Description This is called so HID-host may manage this device.
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostAddDev
+ *
+ * Description This is called so HID-host may manage this device.
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
extern tHID_STATUS HID_HostAddDev (BD_ADDR addr, uint16_t attr_mask,
uint8_t *handle );
/*******************************************************************************
-**
-** Function HID_HostRemoveDev
-**
-** Description This removes the device from list devices that host has to manage.
-**
-** Returns tHID_STATUS
-**
-*******************************************************************************/
+ *
+ * Function HID_HostRemoveDev
+ *
+ * Description This removes the device from list devices that host has to manage.
+ *
+ * Returns tHID_STATUS
+ *
+ ******************************************************************************/
extern tHID_STATUS HID_HostRemoveDev (uint8_t dev_handle );
/*******************************************************************************
-**
-** Function HID_HostOpenDev
-**
-** Description This function is called when the user wants to initiate a
-** connection attempt to a device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function HID_HostOpenDev
+ *
+ * Description This function is called when the user wants to initiate a
+ * connection attempt to a device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern tHID_STATUS HID_HostOpenDev (uint8_t dev_handle );
/*******************************************************************************
-**
-** Function HID_HostWriteDev
-**
-** Description This function is called when the host has a report to send.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function HID_HostWriteDev
+ *
+ * Description This function is called when the host has a report to send.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern tHID_STATUS HID_HostWriteDev(uint8_t dev_handle, uint8_t t_type,
uint8_t param, uint16_t data,
uint8_t report_id, BT_HDR *pbuf);
/*******************************************************************************
-**
-** Function HID_HostCloseDev
-**
-** Description This function disconnects the device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function HID_HostCloseDev
+ *
+ * Description This function disconnects the device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern tHID_STATUS HID_HostCloseDev(uint8_t dev_handle );
/*******************************************************************************
-** Function HID_HostInit
-**
-** Description This function initializes the control block and trace variable
-**
-** Returns void
-*******************************************************************************/
+ * Function HID_HostInit
+ *
+ * Description This function initializes the control block and trace variable
+ *
+ * Returns void
+ ******************************************************************************/
extern void HID_HostInit(void);
/*******************************************************************************
-** Function HID_HostSetSecurityLevel
-**
-** Description This function sets the security level for the devices which
-** are marked by application as requiring security
-**
-** Returns tHID_STATUS
-*******************************************************************************/
+ * Function HID_HostSetSecurityLevel
+ *
+ * Description This function sets the security level for the devices which
+ * are marked by application as requiring security
+ *
+ * Returns tHID_STATUS
+ ******************************************************************************/
extern tHID_STATUS HID_HostSetSecurityLevel(const char serv_name[], uint8_t sec_lvl );
/*******************************************************************************
-**
-** Function hid_known_hid_device
-**
-** Description This function checks if this device is of type HID Device
-**
-** Returns true if device exists else false
-**
-*******************************************************************************/
+ *
+ * Function hid_known_hid_device
+ *
+ * Description This function checks if this device is of type HID Device
+ *
+ * Returns true if device exists else false
+ *
+ ******************************************************************************/
bool hid_known_hid_device (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function HID_HostSetTraceLevel
-**
-** Description This function sets the trace level for HID Host. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function HID_HostSetTraceLevel
+ *
+ * Description This function sets the trace level for HID Host. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
extern uint8_t HID_HostSetTraceLevel (uint8_t new_level);
#ifdef __cplusplus
diff --git a/stack/include/l2c_api.h b/stack/include/l2c_api.h
index 6d6b675..086fb98 100644
--- a/stack/include/l2c_api.h
+++ b/stack/include/l2c_api.h
@@ -35,11 +35,11 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/* Define the minimum offset that L2CAP needs in a buffer. This is made up of
-** HCI type(1), len(2), handle(2), L2CAP len(2) and CID(2) => 9
+ * HCI type(1), len(2), handle(2), L2CAP len(2) and CID(2) => 9
*/
#define L2CAP_MIN_OFFSET 13 /* plus control(2), SDU length(2) */
@@ -123,16 +123,16 @@
#define L2CAP_FCR_CHAN_OPT_ALL_MASK (L2CAP_FCR_CHAN_OPT_BASIC | L2CAP_FCR_CHAN_OPT_ERTM | L2CAP_FCR_CHAN_OPT_STREAM)
/* 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.
+ * 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)
#define L2C_IS_VALID_LE_PSM(psm) (((psm) > 0x0000) && ((psm) < 0x0100))
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
typedef struct
{
@@ -151,8 +151,8 @@
} tL2CAP_FCR_OPTS;
/* Define a structure to hold the configuration parameters. Since the
-** parameters are optional, for each parameter there is a boolean to
-** use to signify its presence or absence.
+ * parameters are optional, for each parameter there is a boolean to
+ * use to signify its presence or absence.
*/
typedef struct
{
@@ -173,7 +173,7 @@
} tL2CAP_CFG_INFO;
/* Define a structure to hold the configuration parameter for LE L2CAP connection
-** oriented channels.
+ * oriented channels.
*/
typedef struct
{
@@ -193,76 +193,76 @@
typedef uint16_t tL2CAP_CH_CFG_BITS;
/*********************************
-** Callback Functions Prototypes
-**********************************/
+ * Callback Functions Prototypes
+ *********************************/
/* Connection indication callback prototype. Parameters are
-** BD Address of remote
-** Local CID assigned to the connection
-** PSM that the remote wants to connect to
-** Identifier that the remote sent
+ * BD Address of remote
+ * Local CID assigned to the connection
+ * PSM that the remote wants to connect to
+ * Identifier that the remote sent
*/
typedef void (tL2CA_CONNECT_IND_CB) (BD_ADDR, uint16_t, uint16_t, uint8_t);
/* Connection confirmation callback prototype. Parameters are
-** Local CID
-** Result - 0 = connected, non-zero means failure reason
+ * Local CID
+ * Result - 0 = connected, non-zero means failure reason
*/
typedef void (tL2CA_CONNECT_CFM_CB) (uint16_t, uint16_t);
/* Connection pending callback prototype. Parameters are
-** Local CID
+ * Local CID
*/
typedef void (tL2CA_CONNECT_PND_CB) (uint16_t);
/* Configuration indication callback prototype. Parameters are
-** Local CID assigned to the connection
-** Pointer to configuration info
+ * Local CID assigned to the connection
+ * Pointer to configuration info
*/
typedef void (tL2CA_CONFIG_IND_CB) (uint16_t, tL2CAP_CFG_INFO *);
/* Configuration confirm callback prototype. Parameters are
-** Local CID assigned to the connection
-** Pointer to configuration info
+ * Local CID assigned to the connection
+ * Pointer to configuration info
*/
typedef void (tL2CA_CONFIG_CFM_CB) (uint16_t, tL2CAP_CFG_INFO *);
/* Disconnect indication callback prototype. Parameters are
-** Local CID
-** Boolean whether upper layer should ack this
+ * Local CID
+ * Boolean whether upper layer should ack this
*/
typedef void (tL2CA_DISCONNECT_IND_CB) (uint16_t, bool );
/* Disconnect confirm callback prototype. Parameters are
-** Local CID
-** Result
+ * Local CID
+ * Result
*/
typedef void (tL2CA_DISCONNECT_CFM_CB) (uint16_t, uint16_t);
/* QOS Violation indication callback prototype. Parameters are
-** BD Address of violating device
+ * BD Address of violating device
*/
typedef void (tL2CA_QOS_VIOLATION_IND_CB) (BD_ADDR);
/* Data received indication callback prototype. Parameters are
-** Local CID
-** Address of buffer
+ * Local CID
+ * Address of buffer
*/
typedef void (tL2CA_DATA_IND_CB) (uint16_t, BT_HDR *);
/* Echo response callback prototype. Note that this is not included in the
-** registration information, but is passed to L2CAP as part of the API to
-** actually send an echo request. Parameters are
-** Result
+ * registration information, but is passed to L2CAP as part of the API to
+ * actually send an echo request. Parameters are
+ * Result
*/
typedef void (tL2CA_ECHO_RSP_CB) (uint16_t);
@@ -273,35 +273,35 @@
/* Congestion status callback protype. This callback is optional. If
-** an application tries to send data when the transmit queue is full,
-** the data will anyways be dropped. The parameter is:
-** Local CID
-** true if congested, false if uncongested
+ * an application tries to send data when the transmit queue is full,
+ * the data will anyways be dropped. The parameter is:
+ * Local CID
+ * true if congested, false if uncongested
*/
typedef void (tL2CA_CONGESTION_STATUS_CB) (uint16_t, bool );
/* Callback prototype for number of packets completed events.
-** 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:
-** peer BD_ADDR
+ * 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:
+ * peer BD_ADDR
*/
typedef void (tL2CA_NOCP_CB) (BD_ADDR);
/* Transmit complete callback protype. This callback is optional. If
-** set, L2CAP will call it when packets are sent or flushed. If the
-** count is 0xFFFF, it means all packets are sent for that CID (eRTM
-** mode only). The parameters are:
-** Local CID
-** Number of SDUs sent or dropped
+ * set, L2CAP will call it when packets are sent or flushed. If the
+ * count is 0xFFFF, it means all packets are sent for that CID (eRTM
+ * mode only). The parameters are:
+ * Local CID
+ * Number of SDUs sent or dropped
*/
typedef void (tL2CA_TX_COMPLETE_CB) (uint16_t, uint16_t);
/* Define the structure that applications use to register with
-** L2CAP. This structure includes callback functions. All functions
-** MUST be provided, with the exception of the "connect pending"
-** callback and "congestion status" callback.
+ * L2CAP. This structure includes callback functions. All functions
+ * MUST be provided, with the exception of the "connect pending"
+ * callback and "congestion status" callback.
*/
typedef struct
{
@@ -320,7 +320,7 @@
} tL2CAP_APPL_INFO;
/* Define the structure that applications use to create or accept
-** connections with enhanced retransmission mode.
+ * connections with enhanced retransmission mode.
*/
typedef struct
{
@@ -349,158 +349,158 @@
#define L2CA_GET_PEER_COC_CONFIG(a, b) L2CA_GetPeerLECocConfig(a, b)
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function L2CA_Register
-**
-** Description Other layers call this function to register for L2CAP
-** 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
-** connection to a dynamic PSM, a "virtual" PSM is returned
-** and should be used in the calls to L2CA_ConnectReq() and
-** BTM_SetSecurityLevel().
-**
-*******************************************************************************/
+ *
+ * Function L2CA_Register
+ *
+ * Description Other layers call this function to register for L2CAP
+ * 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
+ * connection to a dynamic PSM, a "virtual" PSM is returned
+ * and should be used in the calls to L2CA_ConnectReq() and
+ * BTM_SetSecurityLevel().
+ *
+ ******************************************************************************/
extern uint16_t L2CA_Register (uint16_t psm, tL2CAP_APPL_INFO *p_cb_info);
/*******************************************************************************
-**
-** Function L2CA_Deregister
-**
-** Description Other layers call this function to deregister for L2CAP
-** services.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function L2CA_Deregister
+ *
+ * Description Other layers call this function to deregister for L2CAP
+ * services.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void L2CA_Deregister (uint16_t psm);
/*******************************************************************************
-**
-** Function L2CA_AllocatePSM
-**
-** Description Other layers call this function to find an unused PSM for L2CAP
-** services.
-**
-** Returns PSM to use.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_AllocatePSM
+ *
+ * Description Other layers call this function to find an unused PSM for L2CAP
+ * services.
+ *
+ * Returns PSM to use.
+ *
+ ******************************************************************************/
extern uint16_t L2CA_AllocatePSM(void);
/*******************************************************************************
-**
-** Function L2CA_ConnectReq
-**
-** Description Higher layers call this function to create an L2CAP connection.
-** Note that the connection is not established at this time, but
-** connection establishment gets started. The callback function
-** will be invoked when connection establishes or fails.
-**
-** Returns the CID of the connection, or 0 if it failed to start
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConnectReq
+ *
+ * Description Higher layers call this function to create an L2CAP connection.
+ * Note that the connection is not established at this time, but
+ * connection establishment gets started. The callback function
+ * will be invoked when connection establishes or fails.
+ *
+ * Returns the CID of the connection, or 0 if it failed to start
+ *
+ ******************************************************************************/
extern uint16_t L2CA_ConnectReq (uint16_t psm, BD_ADDR p_bd_addr);
/*******************************************************************************
-**
-** Function L2CA_ConnectRsp
-**
-** Description Higher layers call this function to accept an incoming
-** L2CAP connection, for which they had gotten an connect
-** indication callback.
-**
-** Returns true for success, false for failure
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConnectRsp
+ *
+ * Description Higher layers call this function to accept an incoming
+ * L2CAP connection, for which they had gotten an connect
+ * indication callback.
+ *
+ * Returns true for success, false for failure
+ *
+ ******************************************************************************/
extern bool L2CA_ConnectRsp (BD_ADDR p_bd_addr, uint8_t id, uint16_t lcid,
uint16_t result, uint16_t status);
/*******************************************************************************
-**
-** Function L2CA_ErtmConnectReq
-**
-** Description Higher layers call this function to create an L2CAP connection
-** that needs to use Enhanced Retransmission Mode.
-** Note that the connection is not established at this time, but
-** connection establishment gets started. The callback function
-** will be invoked when connection establishes or fails.
-**
-** Returns the CID of the connection, or 0 if it failed to start
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ErtmConnectReq
+ *
+ * Description Higher layers call this function to create an L2CAP connection
+ * that needs to use Enhanced Retransmission Mode.
+ * Note that the connection is not established at this time, but
+ * connection establishment gets started. The callback function
+ * will be invoked when connection establishes or fails.
+ *
+ * Returns the CID of the connection, or 0 if it failed to start
+ *
+ ******************************************************************************/
extern uint16_t L2CA_ErtmConnectReq (uint16_t psm, BD_ADDR p_bd_addr,
tL2CAP_ERTM_INFO *p_ertm_info);
/*******************************************************************************
-**
-** Function L2CA_RegisterLECoc
-**
-** Description Other layers call this function to register for L2CAP
-** Connection Oriented Channel.
-**
-** Returns PSM to use or zero if error. Typically, the PSM returned
-** 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_ConnectLECocReq()
-** and BTM_SetSecurityLevel().
-**
-*******************************************************************************/
+ *
+ * Function L2CA_RegisterLECoc
+ *
+ * Description Other layers call this function to register for L2CAP
+ * Connection Oriented Channel.
+ *
+ * Returns PSM to use or zero if error. Typically, the PSM returned
+ * 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_ConnectLECocReq()
+ * and BTM_SetSecurityLevel().
+ *
+ ******************************************************************************/
extern uint16_t L2CA_RegisterLECoc (uint16_t psm, tL2CAP_APPL_INFO *p_cb_info);
/*******************************************************************************
-**
-** Function L2CA_DeregisterLECoc
-**
-** Description Other layers call this function to deregister for L2CAP
-** Connection Oriented Channel.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DeregisterLECoc
+ *
+ * Description Other layers call this function to deregister for L2CAP
+ * Connection Oriented Channel.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void L2CA_DeregisterLECoc (uint16_t psm);
/*******************************************************************************
-**
-** Function L2CA_ConnectLECocReq
-**
-** Description Higher layers call this function to create an L2CAP LE COC.
-** Note that the connection is not established at this time, but
-** connection establishment gets started. The callback function
-** will be invoked when connection establishes or fails.
-**
-** Returns the CID of the connection, or 0 if it failed to start
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConnectLECocReq
+ *
+ * Description Higher layers call this function to create an L2CAP LE COC.
+ * Note that the connection is not established at this time, but
+ * connection establishment gets started. The callback function
+ * will be invoked when connection establishes or fails.
+ *
+ * Returns the CID of the connection, or 0 if it failed to start
+ *
+ ******************************************************************************/
extern uint16_t L2CA_ConnectLECocReq (uint16_t psm, BD_ADDR p_bd_addr, tL2CAP_LE_CFG_INFO *p_cfg);
/*******************************************************************************
-**
-** Function L2CA_ConnectLECocRsp
-**
-** Description Higher layers call this function to accept an incoming
-** L2CAP LE COC connection, for which they had gotten an connect
-** indication callback.
-**
-** Returns true for success, false for failure
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConnectLECocRsp
+ *
+ * Description Higher layers call this function to accept an incoming
+ * L2CAP LE COC connection, for which they had gotten an connect
+ * indication callback.
+ *
+ * Returns true for success, false for failure
+ *
+ ******************************************************************************/
extern bool L2CA_ConnectLECocRsp (BD_ADDR p_bd_addr, uint8_t id, uint16_t lcid, uint16_t result,
uint16_t status, tL2CAP_LE_CFG_INFO *p_cfg);
/*******************************************************************************
-**
-** Function L2CA_GetPeerLECocConfig
-**
-** Description Get peers configuration for LE Connection Oriented Channel.
-**
-** Return value: true if peer is connected
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetPeerLECocConfig
+ *
+ * Description Get peers configuration for LE Connection Oriented Channel.
+ *
+ * Return value: true if peer is connected
+ *
+ ******************************************************************************/
extern bool L2CA_GetPeerLECocConfig (uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg);
// This function sets the callback routines for the L2CAP connection referred to by
@@ -511,101 +511,101 @@
bool L2CA_SetConnectionCallbacks(uint16_t local_cid, const tL2CAP_APPL_INFO *callbacks);
/*******************************************************************************
-**
-** Function L2CA_ErtmConnectRsp
-**
-** Description Higher layers call this function to accept an incoming
-** L2CAP connection, for which they had gotten an connect
-** indication callback, and for which the higher layer wants
-** to use Enhanced Retransmission Mode.
-**
-** Returns true for success, false for failure
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ErtmConnectRsp
+ *
+ * Description Higher layers call this function to accept an incoming
+ * L2CAP connection, for which they had gotten an connect
+ * indication callback, and for which the higher layer wants
+ * to use Enhanced Retransmission Mode.
+ *
+ * Returns true for success, false for failure
+ *
+ ******************************************************************************/
extern bool L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, uint8_t id, uint16_t lcid,
uint16_t result, uint16_t status,
tL2CAP_ERTM_INFO *p_ertm_info);
/*******************************************************************************
-**
-** Function L2CA_ConfigReq
-**
-** Description Higher layers call this function to send configuration.
-**
-** Returns true if configuration sent, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConfigReq
+ *
+ * Description Higher layers call this function to send configuration.
+ *
+ * Returns true if configuration sent, else false
+ *
+ ******************************************************************************/
extern bool L2CA_ConfigReq (uint16_t cid, tL2CAP_CFG_INFO *p_cfg);
/*******************************************************************************
-**
-** Function L2CA_ConfigRsp
-**
-** Description Higher layers call this function to send a configuration
-** response.
-**
-** Returns true if configuration response sent, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConfigRsp
+ *
+ * Description Higher layers call this function to send a configuration
+ * response.
+ *
+ * Returns true if configuration response sent, else false
+ *
+ ******************************************************************************/
extern bool L2CA_ConfigRsp (uint16_t cid, tL2CAP_CFG_INFO *p_cfg);
/*******************************************************************************
-**
-** Function L2CA_DisconnectReq
-**
-** Description Higher layers call this function to disconnect a channel.
-**
-** Returns true if disconnect sent, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DisconnectReq
+ *
+ * Description Higher layers call this function to disconnect a channel.
+ *
+ * Returns true if disconnect sent, else false
+ *
+ ******************************************************************************/
extern bool L2CA_DisconnectReq (uint16_t cid);
/*******************************************************************************
-**
-** Function L2CA_DisconnectRsp
-**
-** Description Higher layers call this function to acknowledge the
-** disconnection of a channel.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DisconnectRsp
+ *
+ * Description Higher layers call this function to acknowledge the
+ * disconnection of a channel.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern bool L2CA_DisconnectRsp (uint16_t cid);
/*******************************************************************************
-**
-** Function L2CA_DataWrite
-**
-** Description Higher layers call this function to write data.
-**
-** Returns L2CAP_DW_SUCCESS, if data accepted, else false
-** L2CAP_DW_CONGESTED, if data accepted and the channel is congested
-** L2CAP_DW_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DataWrite
+ *
+ * Description Higher layers call this function to write data.
+ *
+ * Returns L2CAP_DW_SUCCESS, if data accepted, else false
+ * L2CAP_DW_CONGESTED, if data accepted and the channel is congested
+ * L2CAP_DW_FAILED, if error
+ *
+ ******************************************************************************/
extern uint8_t L2CA_DataWrite (uint16_t cid, BT_HDR *p_data);
/*******************************************************************************
-**
-** Function L2CA_Ping
-**
-** Description Higher layers call this function to send an echo request.
-**
-** Returns true if echo request sent, else false.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_Ping
+ *
+ * Description Higher layers call this function to send an echo request.
+ *
+ * Returns true if echo request sent, else false.
+ *
+ ******************************************************************************/
extern bool L2CA_Ping (BD_ADDR p_bd_addr, tL2CA_ECHO_RSP_CB *p_cb);
/*******************************************************************************
-**
-** Function L2CA_Echo
-**
-** Description Higher layers call this function to send an echo request
-** with application-specific data.
-**
-** Returns true if echo request sent, else false.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_Echo
+ *
+ * Description Higher layers call this function to send an echo request
+ * with application-specific data.
+ *
+ * Returns true if echo request sent, else false.
+ *
+ ******************************************************************************/
extern bool L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_callback);
// Given a local channel identifier, |lcid|, this function returns the bound remote
@@ -615,283 +615,283 @@
bool L2CA_GetIdentifiers(uint16_t lcid, uint16_t *rcid, uint16_t *handle);
/*******************************************************************************
-**
-** Function L2CA_SetIdleTimeout
-**
-** Description Higher layers call this function to set the idle timeout for
-** a connection, or for all future connections. 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.
-**
-** Returns true if command succeeded, false if failed
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetIdleTimeout
+ *
+ * Description Higher layers call this function to set the idle timeout for
+ * a connection, or for all future connections. 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.
+ *
+ * Returns true if command succeeded, false if failed
+ *
+ ******************************************************************************/
extern bool L2CA_SetIdleTimeout (uint16_t cid, uint16_t timeout,
bool 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
-** changed.
-**
-** Returns true if command succeeded, false if failed
-**
-** NOTE This timeout applies to all logical channels active on the
-** ACL link.
-*******************************************************************************/
+ *
+ * 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
+ * changed.
+ *
+ * Returns true if command succeeded, false if failed
+ *
+ * NOTE This timeout applies to all logical channels active on the
+ * ACL link.
+ ******************************************************************************/
extern bool L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, uint16_t timeout,
tBT_TRANSPORT transport);
/*******************************************************************************
-**
-** Function L2CA_SetTraceLevel
-**
-** Description This function sets the trace level for L2CAP. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetTraceLevel
+ *
+ * Description This function sets the trace level for L2CAP. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
extern uint8_t L2CA_SetTraceLevel (uint8_t trace_level);
/*******************************************************************************
-**
-** Function L2CA_SetDesireRole
-**
-** Description This function sets the desire role for L2CAP.
-** If the new role is L2CAP_ROLE_ALLOW_SWITCH, allow switch on
-** HciCreateConnection.
-** If the new role is L2CAP_ROLE_DISALLOW_SWITCH, do not allow switch on
-** HciCreateConnection.
-**
-** If the new role is a valid role (HCI_ROLE_MASTER or HCI_ROLE_SLAVE),
-** the desire role is set to the new value. Otherwise, it is not changed.
-**
-** Returns the new (current) role
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetDesireRole
+ *
+ * Description This function sets the desire role for L2CAP.
+ * If the new role is L2CAP_ROLE_ALLOW_SWITCH, allow switch on
+ * HciCreateConnection.
+ * If the new role is L2CAP_ROLE_DISALLOW_SWITCH, do not allow switch on
+ * HciCreateConnection.
+ *
+ * If the new role is a valid role (HCI_ROLE_MASTER or HCI_ROLE_SLAVE),
+ * the desire role is set to the new value. Otherwise, it is not changed.
+ *
+ * Returns the new (current) role
+ *
+ ******************************************************************************/
extern uint8_t L2CA_SetDesireRole (uint8_t new_role);
/*******************************************************************************
-**
-** Function L2CA_LocalLoopbackReq
-**
-** Description This function sets up a CID for local loopback
-**
-** Returns CID of 0 if none.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_LocalLoopbackReq
+ *
+ * Description This function sets up a CID for local loopback
+ *
+ * Returns CID of 0 if none.
+ *
+ ******************************************************************************/
extern uint16_t L2CA_LocalLoopbackReq (uint16_t psm, uint16_t handle, BD_ADDR p_bd_addr);
/*******************************************************************************
-**
-** Function L2CA_FlushChannel
-**
-** Description This function flushes none, some or all buffers queued up
-** for xmission for a particular CID. If called with
-** L2CAP_FLUSH_CHANS_GET (0), it simply returns the number
-** of buffers queued for that CID L2CAP_FLUSH_CHANS_ALL (0xffff)
-** flushes all buffers. All other values specifies the maximum
-** buffers to flush.
-**
-** Returns Number of buffers left queued for that CID
-**
-*******************************************************************************/
+ *
+ * Function L2CA_FlushChannel
+ *
+ * Description This function flushes none, some or all buffers queued up
+ * for xmission for a particular CID. If called with
+ * L2CAP_FLUSH_CHANS_GET (0), it simply returns the number
+ * of buffers queued for that CID L2CAP_FLUSH_CHANS_ALL (0xffff)
+ * flushes all buffers. All other values specifies the maximum
+ * buffers to flush.
+ *
+ * Returns Number of buffers left queued for that CID
+ *
+ ******************************************************************************/
extern uint16_t L2CA_FlushChannel (uint16_t lcid, uint16_t num_to_flush);
/*******************************************************************************
-**
-** Function L2CA_SetAclPriority
-**
-** Description Sets the transmission priority for an ACL channel.
-** (For initial implementation only two values are valid.
-** L2CAP_PRIORITY_NORMAL and L2CAP_PRIORITY_HIGH).
-**
-** Returns true if a valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetAclPriority
+ *
+ * Description Sets the transmission priority for an ACL channel.
+ * (For initial implementation only two values are valid.
+ * L2CAP_PRIORITY_NORMAL and L2CAP_PRIORITY_HIGH).
+ *
+ * Returns true if a valid channel, else false
+ *
+ ******************************************************************************/
extern bool L2CA_SetAclPriority (BD_ADDR bd_addr, uint8_t priority);
/*******************************************************************************
-**
-** Function L2CA_FlowControl
-**
-** Description Higher layers call this function to flow control a channel.
-**
-** data_enabled - true data flows, false data is stopped
-**
-** Returns true if valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_FlowControl
+ *
+ * Description Higher layers call this function to flow control a channel.
+ *
+ * data_enabled - true data flows, false data is stopped
+ *
+ * Returns true if valid channel, else false
+ *
+ ******************************************************************************/
extern bool L2CA_FlowControl (uint16_t cid, bool data_enabled);
/*******************************************************************************
-**
-** Function L2CA_SendTestSFrame
-**
-** Description Higher layers call this function to send a test S-frame.
-**
-** Returns true if valid Channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SendTestSFrame
+ *
+ * Description Higher layers call this function to send a test S-frame.
+ *
+ * Returns true if valid Channel, else false
+ *
+ ******************************************************************************/
extern bool L2CA_SendTestSFrame (uint16_t cid, uint8_t sup_type,
uint8_t back_track);
/*******************************************************************************
-**
-** Function L2CA_SetTxPriority
-**
-** Description Sets the transmission priority for a channel. (FCR Mode)
-**
-** Returns true if a valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetTxPriority
+ *
+ * Description Sets the transmission priority for a channel. (FCR Mode)
+ *
+ * Returns true if a valid channel, else false
+ *
+ ******************************************************************************/
extern bool L2CA_SetTxPriority (uint16_t cid, tL2CAP_CHNL_PRIORITY priority);
/*******************************************************************************
-**
-** Function L2CA_RegForNoCPEvt
-**
-** Description Register callback for Number of Completed Packets event.
-**
-** Input Param p_cb - callback for Number of completed packets event
-** p_bda - BT address of remote device
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function L2CA_RegForNoCPEvt
+ *
+ * Description Register callback for Number of Completed Packets event.
+ *
+ * Input Param p_cb - callback for Number of completed packets event
+ * p_bda - BT address of remote device
+ *
+ * Returns
+ *
+ ******************************************************************************/
extern bool L2CA_RegForNoCPEvt(tL2CA_NOCP_CB *p_cb, BD_ADDR p_bda);
/*******************************************************************************
-**
-** Function L2CA_SetChnlDataRate
-**
-** Description Sets the tx/rx data rate for a channel.
-**
-** Returns true if a valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetChnlDataRate
+ *
+ * Description Sets the tx/rx data rate for a channel.
+ *
+ * Returns true if a valid channel, else false
+ *
+ ******************************************************************************/
extern bool L2CA_SetChnlDataRate (uint16_t cid, tL2CAP_CHNL_DATA_RATE tx, tL2CAP_CHNL_DATA_RATE rx);
typedef void (tL2CA_RESERVE_CMPL_CBACK) (void);
/*******************************************************************************
-**
-** Function L2CA_SetFlushTimeout
-**
-** 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)
-** <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot).
-** Otherwise, return false.
-** 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
-** ACL link.
-*******************************************************************************/
+ *
+ * Function L2CA_SetFlushTimeout
+ *
+ * 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)
+ * <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot).
+ * Otherwise, return false.
+ * 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
+ * ACL link.
+ ******************************************************************************/
extern bool L2CA_SetFlushTimeout (BD_ADDR bd_addr, uint16_t flush_tout);
/*******************************************************************************
-**
-** Function L2CA_DataWriteEx
-**
-** Description Higher layers call this function to write data with extended
-** flags.
-** flags : L2CAP_FLUSHABLE_CH_BASED
-** L2CAP_FLUSHABLE_PKT
-** L2CAP_NON_FLUSHABLE_PKT
-**
-** Returns L2CAP_DW_SUCCESS, if data accepted, else false
-** L2CAP_DW_CONGESTED, if data accepted and the channel is congested
-** L2CAP_DW_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DataWriteEx
+ *
+ * Description Higher layers call this function to write data with extended
+ * flags.
+ * flags : L2CAP_FLUSHABLE_CH_BASED
+ * L2CAP_FLUSHABLE_PKT
+ * L2CAP_NON_FLUSHABLE_PKT
+ *
+ * Returns L2CAP_DW_SUCCESS, if data accepted, else false
+ * L2CAP_DW_CONGESTED, if data accepted and the channel is congested
+ * L2CAP_DW_FAILED, if error
+ *
+ ******************************************************************************/
extern uint8_t L2CA_DataWriteEx (uint16_t cid, BT_HDR *p_data, uint16_t flags);
/*******************************************************************************
-**
-** Function L2CA_SetChnlFlushability
-**
-** Description Higher layers call this function to set a channels
-** flushability flags
-**
-** Returns true if CID found, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetChnlFlushability
+ *
+ * Description Higher layers call this function to set a channels
+ * flushability flags
+ *
+ * Returns true if CID found, else false
+ *
+ ******************************************************************************/
extern bool L2CA_SetChnlFlushability (uint16_t cid, bool is_flushable);
/*******************************************************************************
-**
-** Function L2CA_GetPeerFeatures
-**
-** Description Get a peers features and fixed channel map
-**
-** Parameters: BD address of the peer
-** Pointers to features and channel mask storage area
-**
-** Return value: true if peer is connected
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetPeerFeatures
+ *
+ * Description Get a peers features and fixed channel map
+ *
+ * Parameters: BD address of the peer
+ * Pointers to features and channel mask storage area
+ *
+ * Return value: true if peer is connected
+ *
+ ******************************************************************************/
extern bool L2CA_GetPeerFeatures (BD_ADDR bd_addr, uint32_t *p_ext_feat, uint8_t *p_chnl_mask);
/*******************************************************************************
-**
-** Function L2CA_GetBDAddrbyHandle
-**
-** Description Get BD address for the given HCI handle
-**
-** Parameters: HCI handle
-** BD address of the peer
-**
-** Return value: true if found lcb for the given handle, false otherwise
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetBDAddrbyHandle
+ *
+ * Description Get BD address for the given HCI handle
+ *
+ * Parameters: HCI handle
+ * BD address of the peer
+ *
+ * Return value: true if found lcb for the given handle, false otherwise
+ *
+ ******************************************************************************/
extern bool L2CA_GetBDAddrbyHandle (uint16_t handle, BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function L2CA_GetChnlFcrMode
-**
-** Description Get the channel FCR mode
-**
-** Parameters: Local CID
-**
-** Return value: Channel mode
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetChnlFcrMode
+ *
+ * Description Get the channel FCR mode
+ *
+ * Parameters: Local CID
+ *
+ * Return value: Channel mode
+ *
+ ******************************************************************************/
extern uint8_t L2CA_GetChnlFcrMode (uint16_t lcid);
/*******************************************************************************
-**
-** UCD callback prototypes
-**
-*******************************************************************************/
+ *
+ * UCD callback prototypes
+ *
+ ******************************************************************************/
/* UCD discovery. Parameters are
-** BD Address of remote
-** Data Type
-** Data
+ * BD Address of remote
+ * Data Type
+ * Data
*/
#define L2CAP_UCD_INFO_TYPE_RECEPTION 0x01
#define L2CAP_UCD_INFO_TYPE_MTU 0x02
@@ -899,16 +899,16 @@
typedef void (tL2CA_UCD_DISCOVER_CB) (BD_ADDR, uint8_t, uint32_t);
/* UCD data received. Parameters are
-** BD Address of remote
-** Pointer to buffer with data
+ * BD Address of remote
+ * Pointer to buffer with data
*/
typedef void (tL2CA_UCD_DATA_CB) (BD_ADDR, BT_HDR *);
/* Congestion status callback protype. This callback is optional. If
-** an application tries to send data when the transmit queue is full,
-** the data will anyways be dropped. The parameter is:
-** remote BD_ADDR
-** true if congested, false if uncongested
+ * an application tries to send data when the transmit queue is full,
+ * the data will anyways be dropped. The parameter is:
+ * remote BD_ADDR
+ * true if congested, false if uncongested
*/
typedef void (tL2CA_UCD_CONGESTION_STATUS_CB) (BD_ADDR, bool );
@@ -922,120 +922,120 @@
} tL2CAP_UCD_CB_INFO;
/*******************************************************************************
-**
-** Function L2CA_UcdRegister
-**
-** Description Register PSM on UCD.
-**
-** Parameters: tL2CAP_UCD_CB_INFO
-**
-** Return value: true if successs
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdRegister
+ *
+ * Description Register PSM on UCD.
+ *
+ * Parameters: tL2CAP_UCD_CB_INFO
+ *
+ * Return value: true if successs
+ *
+ ******************************************************************************/
extern bool L2CA_UcdRegister ( uint16_t psm, tL2CAP_UCD_CB_INFO *p_cb_info );
/*******************************************************************************
-**
-** Function L2CA_UcdDeregister
-**
-** Description Deregister PSM on UCD.
-**
-** Parameters: PSM
-**
-** Return value: true if successs
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdDeregister
+ *
+ * Description Deregister PSM on UCD.
+ *
+ * Parameters: PSM
+ *
+ * Return value: true if successs
+ *
+ ******************************************************************************/
extern bool L2CA_UcdDeregister ( uint16_t psm );
/*******************************************************************************
-**
-** Function L2CA_UcdDiscover
-**
-** Description Discover UCD of remote device.
-**
-** Parameters: PSM
-** BD_ADDR of remote device
-** info_type : L2CAP_UCD_INFO_TYPE_RECEPTION
-** L2CAP_UCD_INFO_TYPE_MTU
-**
-**
-** Return value: true if successs
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdDiscover
+ *
+ * Description Discover UCD of remote device.
+ *
+ * Parameters: PSM
+ * BD_ADDR of remote device
+ * info_type : L2CAP_UCD_INFO_TYPE_RECEPTION
+ * L2CAP_UCD_INFO_TYPE_MTU
+ *
+ *
+ * Return value: true if successs
+ *
+ ******************************************************************************/
extern bool L2CA_UcdDiscover ( uint16_t psm, BD_ADDR rem_bda, uint8_t info_type );
/*******************************************************************************
-**
-** Function L2CA_UcdDataWrite
-**
-** Description Send UCD to remote device
-**
-** Parameters: PSM
-** BD Address of remote
-** Pointer to buffer of type BT_HDR
-** flags : L2CAP_FLUSHABLE_CH_BASED
-** L2CAP_FLUSHABLE_PKT
-** L2CAP_NON_FLUSHABLE_PKT
-**
-** Return value L2CAP_DW_SUCCESS, if data accepted
-** L2CAP_DW_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdDataWrite
+ *
+ * Description Send UCD to remote device
+ *
+ * Parameters: PSM
+ * BD Address of remote
+ * Pointer to buffer of type BT_HDR
+ * flags : L2CAP_FLUSHABLE_CH_BASED
+ * L2CAP_FLUSHABLE_PKT
+ * L2CAP_NON_FLUSHABLE_PKT
+ *
+ * Return value L2CAP_DW_SUCCESS, if data accepted
+ * L2CAP_DW_FAILED, if error
+ *
+ ******************************************************************************/
extern uint16_t L2CA_UcdDataWrite (uint16_t psm, BD_ADDR rem_bda, BT_HDR *p_buf, uint16_t flags);
/*******************************************************************************
-**
-** Function L2CA_UcdSetIdleTimeout
-**
-** Description Set UCD Idle timeout.
-**
-** Parameters: BD Addr
-** Timeout in second
-**
-** Return value: true if successs
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdSetIdleTimeout
+ *
+ * Description Set UCD Idle timeout.
+ *
+ * Parameters: BD Addr
+ * Timeout in second
+ *
+ * Return value: true if successs
+ *
+ ******************************************************************************/
extern bool L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, uint16_t timeout );
/*******************************************************************************
-**
-** Function L2CA_UCDSetTxPriority
-**
-** Description Sets the transmission priority for a connectionless channel.
-**
-** Returns true if a valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UCDSetTxPriority
+ *
+ * Description Sets the transmission priority for a connectionless channel.
+ *
+ * Returns true if a valid channel, else false
+ *
+ ******************************************************************************/
extern bool L2CA_UCDSetTxPriority ( BD_ADDR rem_bda, tL2CAP_CHNL_PRIORITY priority );
/*******************************************************************************
-**
-** Fixed Channel callback prototypes
-**
-*******************************************************************************/
+ *
+ * Fixed Channel callback prototypes
+ *
+ ******************************************************************************/
/* Fixed channel connected and disconnected. Parameters are
-** channel
-** BD Address of remote
-** true if channel is connected, false if disconnected
-** Reason for connection failure
-** transport : physical transport, BR/EDR or LE
+ * channel
+ * BD Address of remote
+ * true if channel is connected, false if disconnected
+ * Reason for connection failure
+ * transport : physical transport, BR/EDR or LE
*/
typedef void (tL2CA_FIXED_CHNL_CB) (uint16_t, BD_ADDR, bool , uint16_t, tBT_TRANSPORT);
/* Signalling data received. Parameters are
-** channel
-** BD Address of remote
-** Pointer to buffer with data
+ * channel
+ * BD Address of remote
+ * Pointer to buffer with data
*/
typedef void (tL2CA_FIXED_DATA_CB) (uint16_t, BD_ADDR, BT_HDR *);
/* Congestion status callback protype. This callback is optional. If
-** an application tries to send data when the transmit queue is full,
-** the data will anyways be dropped. The parameter is:
-** remote BD_ADDR
-** true if congested, false if uncongested
+ * an application tries to send data when the transmit queue is full,
+ * the data will anyways be dropped. The parameter is:
+ * remote BD_ADDR
+ * true if congested, false if uncongested
*/
typedef void (tL2CA_FIXED_CONGESTION_STATUS_CB) (BD_ADDR, bool );
@@ -1055,178 +1055,178 @@
#if (L2CAP_NUM_FIXED_CHNLS > 0)
/*******************************************************************************
-**
-** Function L2CA_RegisterFixedChannel
-**
-** Description Register a fixed channel.
-**
-** Parameters: Fixed Channel #
-** Channel Callbacks and config
-**
-** Return value: true if registered OK
-**
-*******************************************************************************/
+ *
+ * Function L2CA_RegisterFixedChannel
+ *
+ * Description Register a fixed channel.
+ *
+ * Parameters: Fixed Channel #
+ * Channel Callbacks and config
+ *
+ * Return value: true if registered OK
+ *
+ ******************************************************************************/
extern bool L2CA_RegisterFixedChannel (uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG *p_freg);
/*******************************************************************************
-**
-** Function L2CA_ConnectFixedChnl
-**
-** Description Connect an fixed signalling channel to a remote device.
-**
-** Parameters: Fixed CID
-** BD Address of remote
-**
-** Return value: true if connection started
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConnectFixedChnl
+ *
+ * Description Connect an fixed signalling channel to a remote device.
+ *
+ * Parameters: Fixed CID
+ * BD Address of remote
+ *
+ * Return value: true if connection started
+ *
+ ******************************************************************************/
extern bool L2CA_ConnectFixedChnl (uint16_t fixed_cid, BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function L2CA_SendFixedChnlData
-**
-** Description Write data on a fixed signalling channel.
-**
-** Parameters: Fixed CID
-** BD Address of remote
-** Pointer to buffer of type BT_HDR
-**
-** Return value L2CAP_DW_SUCCESS, if data accepted
-** L2CAP_DW_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SendFixedChnlData
+ *
+ * Description Write data on a fixed signalling channel.
+ *
+ * Parameters: Fixed CID
+ * BD Address of remote
+ * Pointer to buffer of type BT_HDR
+ *
+ * Return value L2CAP_DW_SUCCESS, if data accepted
+ * L2CAP_DW_FAILED, if error
+ *
+ ******************************************************************************/
extern uint16_t L2CA_SendFixedChnlData (uint16_t fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf);
/*******************************************************************************
-**
-** Function L2CA_RemoveFixedChnl
-**
-** Description Remove a fixed channel to a remote device.
-**
-** Parameters: Fixed CID
-** BD Address of remote
-** Idle timeout to use (or 0xFFFF if don't care)
-**
-** Return value: true if channel removed
-**
-*******************************************************************************/
+ *
+ * Function L2CA_RemoveFixedChnl
+ *
+ * Description Remove a fixed channel to a remote device.
+ *
+ * Parameters: Fixed CID
+ * BD Address of remote
+ * Idle timeout to use (or 0xFFFF if don't care)
+ *
+ * Return value: true if channel removed
+ *
+ ******************************************************************************/
extern bool L2CA_RemoveFixedChnl (uint16_t fixed_cid, BD_ADDR rem_bda);
/*******************************************************************************
-**
-** Function L2CA_SetFixedChannelTout
-**
-** 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
-** changed.
-**
-** Returns true if command succeeded, false if failed
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetFixedChannelTout
+ *
+ * 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
+ * changed.
+ *
+ * Returns true if command succeeded, false if failed
+ *
+ ******************************************************************************/
extern bool L2CA_SetFixedChannelTout (BD_ADDR rem_bda, uint16_t fixed_cid, uint16_t idle_tout);
#endif /* (L2CAP_NUM_FIXED_CHNLS > 0) */
/*******************************************************************************
-**
-** Function L2CA_GetCurrentConfig
-**
-** Description This function returns configurations of L2CAP channel
-** pp_our_cfg : pointer of our saved configuration options
-** p_our_cfg_bits : valid config in bitmap
-** pp_peer_cfg: pointer of peer's saved configuration options
-** p_peer_cfg_bits : valid config in bitmap
-**
-** Returns true if successful
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetCurrentConfig
+ *
+ * Description This function returns configurations of L2CAP channel
+ * pp_our_cfg : pointer of our saved configuration options
+ * p_our_cfg_bits : valid config in bitmap
+ * pp_peer_cfg: pointer of peer's saved configuration options
+ * p_peer_cfg_bits : valid config in bitmap
+ *
+ * Returns true if successful
+ *
+ ******************************************************************************/
extern bool L2CA_GetCurrentConfig (uint16_t 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);
/*******************************************************************************
-**
-** Function L2CA_GetConnectionConfig
-**
-** Description This function polulates the mtu, remote cid & lm_handle for
-** a given local L2CAP channel
-**
-** Returns true if successful
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetConnectionConfig
+ *
+ * Description This function polulates the mtu, remote cid & lm_handle for
+ * a given local L2CAP channel
+ *
+ * Returns true if successful
+ *
+ ******************************************************************************/
extern bool L2CA_GetConnectionConfig(uint16_t lcid, uint16_t *mtu, uint16_t *rcid, uint16_t *handle);
/*******************************************************************************
-**
-** Function L2CA_CancelBleConnectReq
-**
-** Description Cancel a pending connection attempt to a BLE device.
-**
-** Parameters: BD Address of remote
-**
-** Return value: true if connection was cancelled
-**
-*******************************************************************************/
+ *
+ * Function L2CA_CancelBleConnectReq
+ *
+ * Description Cancel a pending connection attempt to a BLE device.
+ *
+ * Parameters: BD Address of remote
+ *
+ * Return value: true if connection was cancelled
+ *
+ ******************************************************************************/
extern bool L2CA_CancelBleConnectReq (BD_ADDR rem_bda);
/*******************************************************************************
-**
-** Function L2CA_UpdateBleConnParams
-**
-** Description Update BLE connection parameters.
-**
-** Parameters: BD Address of remote
-**
-** Return value: true if update started
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UpdateBleConnParams
+ *
+ * Description Update BLE connection parameters.
+ *
+ * Parameters: BD Address of remote
+ *
+ * Return value: true if update started
+ *
+ ******************************************************************************/
extern bool L2CA_UpdateBleConnParams (BD_ADDR rem_bdRa, uint16_t min_int,
uint16_t max_int, uint16_t latency, uint16_t timeout);
/*******************************************************************************
-**
-** Function L2CA_EnableUpdateBleConnParams
-**
-** Description Update BLE connection parameters.
-**
-** Parameters: BD Address of remote
-** enable flag
-**
-** Return value: true if update started
-**
-*******************************************************************************/
+ *
+ * Function L2CA_EnableUpdateBleConnParams
+ *
+ * Description Update BLE connection parameters.
+ *
+ * Parameters: BD Address of remote
+ * enable flag
+ *
+ * Return value: true if update started
+ *
+ ******************************************************************************/
extern bool L2CA_EnableUpdateBleConnParams (BD_ADDR rem_bda, bool enable);
/*******************************************************************************
-**
-** Function L2CA_GetBleConnRole
-**
-** Description This function returns the connection role.
-**
-** Returns link role.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetBleConnRole
+ *
+ * Description This function returns the connection role.
+ *
+ * Returns link role.
+ *
+ ******************************************************************************/
extern uint8_t L2CA_GetBleConnRole (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function L2CA_GetDisconnectReason
-**
-** Description This function returns the disconnect reason code.
-**
-** Parameters: BD Address of remote
-** Physical transport for the L2CAP connection (BR/EDR or LE)
-**
-** Returns disconnect reason
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetDisconnectReason
+ *
+ * Description This function returns the disconnect reason code.
+ *
+ * Parameters: BD Address of remote
+ * Physical transport for the L2CAP connection (BR/EDR or LE)
+ *
+ * Returns disconnect reason
+ *
+ ******************************************************************************/
extern uint16_t L2CA_GetDisconnectReason (BD_ADDR remote_bda, tBT_TRANSPORT transport);
#ifdef __cplusplus
diff --git a/stack/include/mca_api.h b/stack/include/mca_api.h
index 5cd82e4..72fcf2c 100644
--- a/stack/include/mca_api.h
+++ b/stack/include/mca_api.h
@@ -39,8 +39,8 @@
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* API function return value result codes. */
#define MCA_SUCCESS 0 /* Function successful */
#define MCA_BAD_PARAMS 1 /* Invalid parameters */
@@ -81,15 +81,15 @@
#define MCA_CONG_CHG_EVT 0x26 /* congestion change event */
#define MCA_RSP_TOUT_IND_EVT 0x27 /* Control channel message response timeout */
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
typedef uint8_t tMCA_HANDLE; /* the handle for registration. 1 based index to rcb */
typedef uint8_t tMCA_CL; /* the handle for a control channel; reported at MCA_CONNECT_IND_EVT */
typedef uint8_t tMCA_DEP; /* the handle for MCA_CreateDep. This is also the local mdep_id */
typedef uint16_t 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);
@@ -212,288 +212,288 @@
} 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_t event,
tMCA_CTRL *p_data);
/*******************************************************************************
-**
-** Function MCA_Init
-**
-** Description Initialize MCAP internal control blocks.
-** This function is called at stack start up.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function MCA_Init
+ *
+ * Description Initialize MCAP internal control blocks.
+ * This function is called at stack start up.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void MCA_Init(void);
/*******************************************************************************
-**
-** Function MCA_SetTraceLevel
-**
-** Description This function sets the debug trace level for MCA.
-** If 0xff is passed, the current trace level is returned.
-**
-** Input Parameters:
-** level: The level to set the MCA tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new trace level or current trace level if
-** the input parameter is 0xff.
-**
-*******************************************************************************/
+ *
+ * Function MCA_SetTraceLevel
+ *
+ * Description This function sets the debug trace level for MCA.
+ * If 0xff is passed, the current trace level is returned.
+ *
+ * Input Parameters:
+ * level: The level to set the MCA tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new trace level or current trace level if
+ * the input parameter is 0xff.
+ *
+ ******************************************************************************/
extern uint8_t MCA_SetTraceLevel (uint8_t level);
/*******************************************************************************
-**
-** Function MCA_Register
-**
-** Description This function registers an MCAP implementation.
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function MCA_Register
+ *
+ * Description This function registers an MCAP implementation.
+ * 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.
+ *
+ ******************************************************************************/
extern tMCA_HANDLE MCA_Register(tMCA_REG *p_reg, tMCA_CTRL_CBACK *p_cback);
/*******************************************************************************
-**
-** Function MCA_Deregister
-**
-** Description This function is called to deregister an MCAP implementation.
-** Before this function can be called, all control and data
-** channels must be removed with MCA_DisconnectReq and MCA_CloseReq.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function MCA_Deregister
+ *
+ * Description This function is called to deregister an MCAP implementation.
+ * Before this function can be called, all control and data
+ * channels must be removed with MCA_DisconnectReq and MCA_CloseReq.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void MCA_Deregister(tMCA_HANDLE handle);
/*******************************************************************************
-**
-** Function MCA_CreateDep
-**
-** 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.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_CreateDep
+ *
+ * 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.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_CreateDep(tMCA_HANDLE handle, tMCA_DEP *p_dep, tMCA_CS *p_cs);
/*******************************************************************************
-**
-** Function MCA_DeleteDep
-**
-** Description Delete a data endpoint. This function is called when
-** the implementation is no longer using a data endpoint.
-** If this function is called when the endpoint is connected
-** the connection is closed and the data endpoint
-** is removed.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_DeleteDep
+ *
+ * Description Delete a data endpoint. This function is called when
+ * the implementation is no longer using a data endpoint.
+ * If this function is called when the endpoint is connected
+ * the connection is closed and the data endpoint
+ * is removed.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_DeleteDep(tMCA_HANDLE handle, tMCA_DEP dep);
/*******************************************************************************
-**
-** Function MCA_ConnectReq
-**
-** 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.
-** This control channel is identified by tMCA_CL.
-** If the connection attempt fails, an MCA_DISCONNECT_IND_EVT is
-** reported. The security mask parameter overrides the outgoing
-** security mask set in MCA_Register().
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_ConnectReq
+ *
+ * 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.
+ * This control channel is identified by tMCA_CL.
+ * If the connection attempt fails, an MCA_DISCONNECT_IND_EVT is
+ * reported. The security mask parameter overrides the outgoing
+ * security mask set in MCA_Register().
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle, BD_ADDR bd_addr,
uint16_t ctrl_psm,
uint16_t sec_mask);
/*******************************************************************************
-**
-** Function MCA_DisconnectReq
-**
-** Description This function disconnect an MCAP control channel
-** 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.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_DisconnectReq
+ *
+ * Description This function disconnect an MCAP control channel
+ * 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.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_DisconnectReq(tMCA_CL mcl);
/*******************************************************************************
-**
-** Function MCA_CreateMdl
-**
-** 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
-** 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.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_CreateMdl
+ *
+ * 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
+ * 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.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_CreateMdl(tMCA_CL mcl, tMCA_DEP dep, uint16_t data_psm,
uint16_t mdl_id, uint8_t peer_dep_id,
uint8_t cfg, const tMCA_CHNL_CFG *p_chnl_cfg);
/*******************************************************************************
-**
-** Function MCA_CreateMdlRsp
-**
-** Description This function sends a CREATE_MDL response to the peer device
-** in response to a received MCA_CREATE_IND_EVT.
-** If the rsp_code is successful, a data channel is open
-** with the given p_chnl_cfg
-** When the data channel is open successfully, a MCA_OPEN_IND_EVT
-** is reported. This data channel is identified as tMCA_DL.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_CreateMdlRsp
+ *
+ * Description This function sends a CREATE_MDL response to the peer device
+ * in response to a received MCA_CREATE_IND_EVT.
+ * If the rsp_code is successful, a data channel is open
+ * with the given p_chnl_cfg
+ * When the data channel is open successfully, a MCA_OPEN_IND_EVT
+ * is reported. This data channel is identified as tMCA_DL.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_CreateMdlRsp(tMCA_CL mcl, tMCA_DEP dep,
uint16_t mdl_id, uint8_t cfg, uint8_t rsp_code,
const tMCA_CHNL_CFG *p_chnl_cfg);
/*******************************************************************************
-**
-** Function MCA_CloseReq
-**
-** Description Close a data channel. When the channel is closed, an
-** MCA_CLOSE_CFM_EVT is sent to the application via the
-** control callback function for this handle.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_CloseReq
+ *
+ * Description Close a data channel. When the channel is closed, an
+ * MCA_CLOSE_CFM_EVT is sent to the application via the
+ * control callback function for this handle.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_CloseReq(tMCA_DL mdl);
/*******************************************************************************
-**
-** Function MCA_ReconnectMdl
-**
-** Description This function sends a RECONNECT_MDL request to the peer device.
-** When the response is received, a MCA_RECONNECT_CFM_EVT is reported.
-** If the response is successful, a data channel is open.
-** When the data channel is open successfully, a MCA_OPEN_CFM_EVT
-** is reported.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_ReconnectMdl
+ *
+ * Description This function sends a RECONNECT_MDL request to the peer device.
+ * When the response is received, a MCA_RECONNECT_CFM_EVT is reported.
+ * If the response is successful, a data channel is open.
+ * When the data channel is open successfully, a MCA_OPEN_CFM_EVT
+ * is reported.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_ReconnectMdl(tMCA_CL mcl, tMCA_DEP dep, uint16_t data_psm,
uint16_t mdl_id, const tMCA_CHNL_CFG *p_chnl_cfg);
/*******************************************************************************
-**
-** Function MCA_ReconnectMdlRsp
-**
-** Description This function sends a RECONNECT_MDL response to the peer device
-** in response to a MCA_RECONNECT_IND_EVT event.
-** If the response is successful, a data channel is open.
-** When the data channel is open successfully, a MCA_OPEN_IND_EVT
-** is reported.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_ReconnectMdlRsp
+ *
+ * Description This function sends a RECONNECT_MDL response to the peer device
+ * in response to a MCA_RECONNECT_IND_EVT event.
+ * If the response is successful, a data channel is open.
+ * When the data channel is open successfully, a MCA_OPEN_IND_EVT
+ * is reported.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_ReconnectMdlRsp(tMCA_CL mcl, tMCA_DEP dep,
uint16_t mdl_id, uint8_t rsp_code,
const tMCA_CHNL_CFG *p_chnl_cfg);
/*******************************************************************************
-**
-** Function MCA_DataChnlCfg
-**
-** Description This function initiates a data channel connection toward the
-** connected peer device.
-** When the data channel is open successfully, a MCA_OPEN_CFM_EVT
-** is reported. This data channel is identified as tMCA_DL.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_DataChnlCfg
+ *
+ * Description This function initiates a data channel connection toward the
+ * connected peer device.
+ * When the data channel is open successfully, a MCA_OPEN_CFM_EVT
+ * is reported. This data channel is identified as tMCA_DL.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_DataChnlCfg(tMCA_CL mcl, const tMCA_CHNL_CFG *p_chnl_cfg);
/*******************************************************************************
-**
-** Function MCA_Abort
-**
-** Description This function sends a ABORT_MDL request to the peer device.
-** When the response is received, a MCA_ABORT_CFM_EVT is reported.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_Abort
+ *
+ * Description This function sends a ABORT_MDL request to the peer device.
+ * When the response is received, a MCA_ABORT_CFM_EVT is reported.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_Abort(tMCA_CL mcl);
/*******************************************************************************
-**
-** Function MCA_Delete
-**
-** Description This function sends a DELETE_MDL request to the peer device.
-** When the response is received, a MCA_DELETE_CFM_EVT is reported.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_Delete
+ *
+ * Description This function sends a DELETE_MDL request to the peer device.
+ * When the response is received, a MCA_DELETE_CFM_EVT is reported.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_Delete(tMCA_CL mcl, uint16_t mdl_id);
/*******************************************************************************
-**
-** Function MCA_WriteReq
-**
-** 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.
-** This allows enough space in the buffer for the L2CAP header.
-**
-** The memory pointed to by p_pkt must be a GKI buffer
-** allocated by the application. This buffer will be freed
-** by the protocol stack; the application must not free
-** this buffer.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_WriteReq
+ *
+ * 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.
+ * This allows enough space in the buffer for the L2CAP header.
+ *
+ * The memory pointed to by p_pkt must be a GKI buffer
+ * allocated by the application. This buffer will be freed
+ * by the protocol stack; the application must not free
+ * this buffer.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
extern tMCA_RESULT MCA_WriteReq(tMCA_DL mdl, BT_HDR *p_pkt);
/*******************************************************************************
-**
-** Function MCA_GetL2CapChannel
-**
-** Description Get the L2CAP CID used by the given data channel handle.
-**
-** Returns L2CAP channel ID if successful, otherwise 0.
-**
-*******************************************************************************/
+ *
+ * Function MCA_GetL2CapChannel
+ *
+ * Description Get the L2CAP CID used by the given data channel handle.
+ *
+ * Returns L2CAP channel ID if successful, otherwise 0.
+ *
+ ******************************************************************************/
extern uint16_t MCA_GetL2CapChannel (tMCA_DL mdl);
#ifdef __cplusplus
diff --git a/stack/include/mca_defs.h b/stack/include/mca_defs.h
index cca7fe0..aa0905a 100644
--- a/stack/include/mca_defs.h
+++ b/stack/include/mca_defs.h
@@ -26,8 +26,8 @@
#define MCA_DEFS_H
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
#define MCA_MIN_MTU 48
/* standard op codes */
diff --git a/stack/include/pan_api.h b/stack/include/pan_api.h
index a7c7b53..c734e37 100644
--- a/stack/include/pan_api.h
+++ b/stack/include/pan_api.h
@@ -31,20 +31,20 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/* Define the minimum offset needed in a GKI buffer for
-** sending PAN packets. Note, we are currently not sending
-** extension headers, but may in the future, so allow
-** space for them
+ * sending PAN packets. Note, we are currently not sending
+ * extension headers, but may in the future, so allow
+ * space for them
*/
#define PAN_MINIMUM_OFFSET BNEP_MINIMUM_OFFSET
/*
-** The handle is passed from BNEP to PAN. The same handle is used
-** between PAN and application as well
+ * The handle is passed from BNEP to PAN. The same handle is used
+ * between PAN and application as well
*/
#define PAN_INVALID_HANDLE BNEP_INVALID_HANDLE
@@ -59,8 +59,8 @@
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
/* Define the result codes from PAN */
enum
@@ -91,35 +91,35 @@
/*****************************************************************
-** Callback Function Prototypes
-*****************************************************************/
+ * Callback Function Prototypes
+ ****************************************************************/
/* This is call back function used to report connection status
-** to the application. The second parameter true means
-** to create the bridge and false means to remove it.
+ * 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_t handle, BD_ADDR bd_addr, tPAN_RESULT state, bool is_role_change,
uint8_t src_role, uint8_t dst_role);
/* This is call back function used to create bridge for the
-** Connected device. The parameter "state" indicates
-** whether to create the bridge or remove it. true means
-** to create the bridge and false means to remove it.
+ * Connected device. The parameter "state" indicates
+ * whether to create the bridge or remove it. true means
+ * to create the bridge and false means to remove it.
*/
typedef void (tPAN_BRIDGE_REQ_CB) (BD_ADDR bd_addr, bool state);
/* Data received indication callback prototype. Parameters are
-** Source BD/Ethernet Address
-** Dest BD/Ethernet address
-** Protocol
-** Address of buffer (or data if non-GKI)
-** Length of data (non-GKI)
-** ext is flag to indicate whether it has aby extension headers
-** Flag used to indicate to forward on LAN
-** false - Use it for internal stack
-** true - Send it across the ethernet as well
+ * Source BD/Ethernet Address
+ * Dest BD/Ethernet address
+ * Protocol
+ * Address of buffer (or data if non-GKI)
+ * Length of data (non-GKI)
+ * ext is flag to indicate whether it has aby extension headers
+ * Flag used to indicate to forward on LAN
+ * false - Use it for internal stack
+ * true - Send it across the ethernet as well
*/
typedef void (tPAN_DATA_IND_CB) (uint16_t handle,
BD_ADDR src,
@@ -132,14 +132,14 @@
/* Data buffer received indication callback prototype. Parameters are
-** Source BD/Ethernet Address
-** Dest BD/Ethernet address
-** Protocol
-** pointer to the data buffer
-** ext is flag to indicate whether it has aby extension headers
-** Flag used to indicate to forward on LAN
-** false - Use it for internal stack
-** true - Send it across the ethernet as well
+ * Source BD/Ethernet Address
+ * Dest BD/Ethernet address
+ * Protocol
+ * pointer to the data buffer
+ * ext is flag to indicate whether it has aby extension headers
+ * Flag used to indicate to forward on LAN
+ * false - Use it for internal stack
+ * true - Send it across the ethernet as well
*/
typedef void (tPAN_DATA_BUF_IND_CB) (uint16_t handle,
BD_ADDR src,
@@ -151,24 +151,24 @@
/* Flow control callback for TX data. Parameters are
-** Handle to the connection
-** Event flow status
+ * Handle to the connection
+ * Event flow status
*/
typedef void (tPAN_TX_DATA_FLOW_CB) (uint16_t handle,
tPAN_RESULT event);
/* Filters received indication callback prototype. Parameters are
-** Handle to the connection
-** true if the cb is called for indication
-** Ignore this if it is indication, otherwise it is the result
-** for the filter set operation performed by the local
-** device
-** Number of protocol filters present
-** Pointer to the filters start. Filters are present in pairs
-** of start of the range and end of the range.
-** They will be present in big endian order. First
-** two bytes will be starting of the first range and
-** next two bytes will be ending of the range.
+ * Handle to the connection
+ * true if the cb is called for indication
+ * Ignore this if it is indication, otherwise it is the result
+ * for the filter set operation performed by the local
+ * device
+ * Number of protocol filters present
+ * Pointer to the filters start. Filters are present in pairs
+ * of start of the range and end of the range.
+ * They will be present in big endian order. First
+ * two bytes will be starting of the first range and
+ * next two bytes will be ending of the range.
*/
typedef void (tPAN_FILTER_IND_CB) (uint16_t handle,
bool indication,
@@ -179,16 +179,16 @@
/* Multicast Filters received indication callback prototype. Parameters are
-** Handle to the connection
-** true if the cb is called for indication
-** Ignore this if it is indication, otherwise it is the result
-** for the filter set operation performed by the local
-** device
-** Number of multicast filters present
-** Pointer to the filters start. Filters are present in pairs
-** of start of the range and end of the range.
-** First six bytes will be starting of the first range and
-** next six bytes will be ending of the range.
+ * Handle to the connection
+ * true if the cb is called for indication
+ * Ignore this if it is indication, otherwise it is the result
+ * for the filter set operation performed by the local
+ * device
+ * Number of multicast filters present
+ * Pointer to the filters start. Filters are present in pairs
+ * of start of the range and end of the range.
+ * First six bytes will be starting of the first range and
+ * next six bytes will be ending of the range.
*/
typedef void (tPAN_MFILTER_IND_CB) (uint16_t handle,
bool indication,
@@ -200,7 +200,7 @@
/* This structure is used to register with PAN profile
-** It is passed as a parameter to PAN_Register call.
+ * It is passed as a parameter to PAN_Register call.
*/
typedef struct
{
@@ -219,64 +219,64 @@
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function PAN_Register
-**
-** Description This function is called by the application to register
-** its callbacks with PAN profile. The application then
-** should set the PAN role explicitly.
-**
-** Parameters: p_register - contains all callback function pointers
-**
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function PAN_Register
+ *
+ * Description This function is called by the application to register
+ * its callbacks with PAN profile. The application then
+ * should set the PAN role explicitly.
+ *
+ * Parameters: p_register - contains all callback function pointers
+ *
+ *
+ * Returns none
+ *
+ ******************************************************************************/
extern void PAN_Register (tPAN_REGISTER *p_register);
/*******************************************************************************
-**
-** Function PAN_Deregister
-**
-** Description This function is called by the application to de-register
-** its callbacks with PAN profile. This will make the PAN to
-** become inactive. This will deregister PAN services from SDP
-** and close all active connections
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function PAN_Deregister
+ *
+ * Description This function is called by the application to de-register
+ * its callbacks with PAN profile. This will make the PAN to
+ * become inactive. This will deregister PAN services from SDP
+ * and close all active connections
+ *
+ * Returns none
+ *
+ ******************************************************************************/
extern void PAN_Deregister (void);
/*******************************************************************************
-**
-** Function PAN_SetRole
-**
-** Description This function is called by the application to set the PAN
-** profile role. This should be called after PAN_Register.
-** This can be called any time to change the PAN role
-**
-** Parameters: role - is bit map of roles to be active
-** PAN_ROLE_CLIENT is for PANU role
-** PAN_ROLE_GN_SERVER is for GN role
-** PAN_ROLE_NAP_SERVER is for NAP role
-** sec_mask - Security mask for different roles
-** It is array of uint8_t. The byte represent the
-** security for roles PANU, GN and NAP in order
-** p_user_name - Service name for PANU role
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_SetRole
+ *
+ * Description This function is called by the application to set the PAN
+ * profile role. This should be called after PAN_Register.
+ * This can be called any time to change the PAN role
+ *
+ * Parameters: role - is bit map of roles to be active
+ * PAN_ROLE_CLIENT is for PANU role
+ * PAN_ROLE_GN_SERVER is for GN role
+ * PAN_ROLE_NAP_SERVER is for NAP role
+ * sec_mask - Security mask for different roles
+ * It is array of uint8_t. The byte represent the
+ * security for roles PANU, GN and NAP in order
+ * p_user_name - Service name for PANU role
+ * 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
+ *
+ ******************************************************************************/
extern tPAN_RESULT PAN_SetRole (uint8_t role,
uint8_t *sec_mask,
const char *p_user_name,
@@ -284,68 +284,68 @@
const char *p_nap_name);
/*******************************************************************************
-**
-** Function PAN_Connect
-**
-** 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
-** src_role - Role of the local device for the connection
-** dst_role - Role of the remote device for the connection
-** PAN_ROLE_CLIENT is for PANU 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
-** this can be because of the combination of
-** src and dst roles may not be valid or
-** allowed at that point of time
-**
-*******************************************************************************/
+ *
+ * Function PAN_Connect
+ *
+ * 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
+ * src_role - Role of the local device for the connection
+ * dst_role - Role of the remote device for the connection
+ * PAN_ROLE_CLIENT is for PANU 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
+ * this can be because of the combination of
+ * src and dst roles may not be valid or
+ * allowed at that point of time
+ *
+ ******************************************************************************/
extern tPAN_RESULT PAN_Connect (BD_ADDR rem_bda, uint8_t src_role, uint8_t dst_role, uint16_t *handle);
/*******************************************************************************
-**
-** Function PAN_Disconnect
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_Disconnect
+ *
+ * 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
+ *
+ ******************************************************************************/
extern tPAN_RESULT PAN_Disconnect (uint16_t handle);
/*******************************************************************************
-**
-** Function PAN_Write
-**
-** Description This sends data over the PAN connections. If this is called
-** on GN or NAP side and the packet is multicast or broadcast
-** it will be sent on all the links. Otherwise the correct link
-** is found based on the destination address and forwarded on it
-** If the return value is not PAN_SUCCESS the application should
-** take care of releasing the message buffer
-**
-** Parameters: dst - MAC or BD Addr of the destination device
-** src - MAC or BD Addr of the source who sent this packet
-** protocol - protocol of the ethernet packet like IP or ARP
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_Write
+ *
+ * Description This sends data over the PAN connections. If this is called
+ * on GN or NAP side and the packet is multicast or broadcast
+ * it will be sent on all the links. Otherwise the correct link
+ * is found based on the destination address and forwarded on it
+ * If the return value is not PAN_SUCCESS the application should
+ * take care of releasing the message buffer
+ *
+ * Parameters: dst - MAC or BD Addr of the destination device
+ * src - MAC or BD Addr of the source who sent this packet
+ * protocol - protocol of the ethernet packet like IP or ARP
+ * 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
+ *
+ ******************************************************************************/
extern tPAN_RESULT PAN_Write (uint16_t handle,
BD_ADDR dst,
BD_ADDR src,
@@ -355,27 +355,27 @@
bool ext);
/*******************************************************************************
-**
-** Function PAN_WriteBuf
-**
-** Description This sends data over the PAN connections. If this is called
-** on GN or NAP side and the packet is multicast or broadcast
-** it will be sent on all the links. Otherwise the correct link
-** is found based on the destination address and forwarded on it
-** If the return value is not PAN_SUCCESS the application should
-** take care of releasing the message buffer
-**
-** Parameters: dst - MAC or BD Addr of the destination device
-** src - MAC or BD Addr of the source who sent this packet
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_WriteBuf
+ *
+ * Description This sends data over the PAN connections. If this is called
+ * on GN or NAP side and the packet is multicast or broadcast
+ * it will be sent on all the links. Otherwise the correct link
+ * is found based on the destination address and forwarded on it
+ * If the return value is not PAN_SUCCESS the application should
+ * take care of releasing the message buffer
+ *
+ * Parameters: dst - MAC or BD Addr of the destination device
+ * src - MAC or BD Addr of the source who sent this packet
+ * 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
+ *
+ ******************************************************************************/
extern tPAN_RESULT PAN_WriteBuf (uint16_t handle,
BD_ADDR dst,
BD_ADDR src,
@@ -384,72 +384,72 @@
bool ext);
/*******************************************************************************
-**
-** Function PAN_SetProtocolFilters
-**
-** Description This function is used to set protocol filters on the peer
-**
-** Parameters: handle - handle for the connection
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_SetProtocolFilters
+ *
+ * Description This function is used to set protocol filters on the peer
+ *
+ * Parameters: handle - handle for the connection
+ * 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
+ *
+ ******************************************************************************/
extern tPAN_RESULT PAN_SetProtocolFilters (uint16_t handle,
uint16_t num_filters,
uint16_t *p_start_array,
uint16_t *p_end_array);
/*******************************************************************************
-**
-** Function PAN_SetMulticastFilters
-**
-** Description This function is used to set multicast filters on the peer
-**
-** Parameters: handle - handle for the connection
-** num_filters - number of multicast filter ranges
-** p_start_array - Pointer to sequence of beginings of all
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_SetMulticastFilters
+ *
+ * Description This function is used to set multicast filters on the peer
+ *
+ * Parameters: handle - handle for the connection
+ * num_filters - number of multicast filter ranges
+ * p_start_array - Pointer to sequence of beginings of all
+ * 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
+ *
+ ******************************************************************************/
extern tBNEP_RESULT PAN_SetMulticastFilters (uint16_t handle,
uint16_t num_mcast_filters,
uint8_t *p_start_array,
uint8_t *p_end_array);
/*******************************************************************************
-**
-** Function PAN_SetTraceLevel
-**
-** Description This function sets the trace level for PAN. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function PAN_SetTraceLevel
+ *
+ * Description This function sets the trace level for PAN. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
extern uint8_t PAN_SetTraceLevel (uint8_t new_level);
/*******************************************************************************
-**
-** Function PAN_Init
-**
-** Description This function initializes the PAN unit. It should be called
-** before accessing any other APIs to initialize the control
-** block.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function PAN_Init
+ *
+ * Description This function initializes the PAN unit. It should be called
+ * before accessing any other APIs to initialize the control
+ * block.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void PAN_Init (void);
#ifdef __cplusplus
diff --git a/stack/include/port_api.h b/stack/include/port_api.h
index 88dd162..8ece9ef 100644
--- a/stack/include/port_api.h
+++ b/stack/include/port_api.h
@@ -31,12 +31,12 @@
#endif
/*****************************************************************************
-** Constants and Types
-*****************************************************************************/
+ * Constants and Types
+ ****************************************************************************/
/*
-** Define port settings structure send from the application in the
-** set settings request, or to the application in the set settings indication.
+ * Define port settings structure send from the application in the
+ * set settings request, or to the application in the set settings indication.
*/
typedef struct
{
@@ -97,8 +97,8 @@
/*
-** Define the callback function prototypes. Parameters are specific
-** to each event and are described bellow
+ * Define the callback function prototypes. Parameters are specific
+ * to each event and are described bellow
*/
typedef int (tPORT_DATA_CALLBACK) (uint16_t port_handle, void *p_data, uint16_t len);
@@ -110,7 +110,7 @@
typedef void (tPORT_CALLBACK) (uint32_t code, uint16_t port_handle);
/*
-** Define events that registered application can receive in the callback
+ * Define events that registered application can receive in the callback
*/
#define PORT_EV_RXCHAR 0x00000001 /* Any Character received */
@@ -135,8 +135,8 @@
#define PORT_EV_FCS 0x00020000 /* data flow enable status true = enabled */
/*
-** To register for events application should provide bitmask with
-** corresponding bit set
+ * To register for events application should provide bitmask with
+ * corresponding bit set
*/
#define PORT_MASK_ALL (PORT_EV_RXCHAR | PORT_EV_TXEMPTY | PORT_EV_CTS | \
@@ -148,7 +148,7 @@
/*
-** Define port result codes
+ * Define port result codes
*/
#define PORT_SUCCESS 0
@@ -182,40 +182,40 @@
#define PORT_ERR_MAX (PORT_ERR_BASE + 26)
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function RFCOMM_CreateConnection
-**
-** Description RFCOMM_CreateConnection function is used from the application
-** to establish serial port connection to the peer device,
-** or allow RFCOMM to accept a connection from the peer
-** application.
-**
-** Parameters: scn - Service Channel Number as registered with
-** the SDP (server) or obtained using SDP from
-** the peer device (client).
-** is_server - true if requesting application is a server
-** mtu - Maximum frame size the application can accept
-** bd_addr - BD_ADDR of the peer (client)
-** mask - specifies events to be enabled. A value
-** of zero disables all events.
-** p_handle - OUT pointer to the handle.
-** p_mgmt_cb - pointer to callback function to receive
-** connection up/down events.
-** Notes:
-**
-** Server can call this function with the same scn parameter multiple times if
-** it is ready to accept multiple simulteneous connections.
-**
-** DLCI for the connection is (scn * 2 + 1) if client originates connection on
-** existing none initiator multiplexer channel. Otherwise it is (scn * 2).
-** For the server DLCI can be changed later if client will be calling it using
-** (scn * 2 + 1) dlci.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_CreateConnection
+ *
+ * Description RFCOMM_CreateConnection function is used from the application
+ * to establish serial port connection to the peer device,
+ * or allow RFCOMM to accept a connection from the peer
+ * application.
+ *
+ * Parameters: scn - Service Channel Number as registered with
+ * the SDP (server) or obtained using SDP from
+ * the peer device (client).
+ * is_server - true if requesting application is a server
+ * mtu - Maximum frame size the application can accept
+ * bd_addr - BD_ADDR of the peer (client)
+ * mask - specifies events to be enabled. A value
+ * of zero disables all events.
+ * p_handle - OUT pointer to the handle.
+ * p_mgmt_cb - pointer to callback function to receive
+ * connection up/down events.
+ * Notes:
+ *
+ * Server can call this function with the same scn parameter multiple times if
+ * it is ready to accept multiple simulteneous connections.
+ *
+ * DLCI for the connection is (scn * 2 + 1) if client originates connection on
+ * existing none initiator multiplexer channel. Otherwise it is (scn * 2).
+ * For the server DLCI can be changed later if client will be calling it using
+ * (scn * 2 + 1) dlci.
+ *
+ ******************************************************************************/
extern int RFCOMM_CreateConnection (uint16_t uuid, uint8_t scn,
bool is_server, uint16_t mtu,
BD_ADDR bd_addr, uint16_t *p_handle,
@@ -223,165 +223,165 @@
/*******************************************************************************
-**
-** Function RFCOMM_RemoveConnection
-**
-** Description This function is called to close the specified connection.
-**
-** Parameters: handle - Handle of the port returned in the Open
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_RemoveConnection
+ *
+ * Description This function is called to close the specified connection.
+ *
+ * Parameters: handle - Handle of the port returned in the Open
+ *
+ ******************************************************************************/
extern int RFCOMM_RemoveConnection (uint16_t handle);
/*******************************************************************************
-**
-** Function RFCOMM_RemoveServer
-**
-** Description This function is called to close the server port.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_RemoveServer
+ *
+ * Description This function is called to close the server port.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ *
+ ******************************************************************************/
extern int RFCOMM_RemoveServer (uint16_t handle);
/*******************************************************************************
-**
-** Function PORT_SetEventCallback
-**
-** Description Set event callback the specified connection.
-**
-** Parameters: handle - Handle of the port returned in the Open
-** p_callback - address of the callback function which should
-** be called from the RFCOMM when an event
-** specified in the mask occurs.
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetEventCallback
+ *
+ * Description Set event callback the specified connection.
+ *
+ * Parameters: handle - Handle of the port returned in the Open
+ * p_callback - address of the callback function which should
+ * be called from the RFCOMM when an event
+ * specified in the mask occurs.
+ *
+ ******************************************************************************/
extern int PORT_SetEventCallback (uint16_t port_handle,
tPORT_CALLBACK *p_port_cb);
/*******************************************************************************
-**
-** Function PORT_ClearKeepHandleFlag
-**
-** Description This function is called to clear the keep handle flag
-** which will cause not to keep the port handle open when closed
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-**
-*******************************************************************************/
+ *
+ * Function PORT_ClearKeepHandleFlag
+ *
+ * Description This function is called to clear the keep handle flag
+ * which will cause not to keep the port handle open when closed
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ *
+ ******************************************************************************/
int PORT_ClearKeepHandleFlag (uint16_t port_handle);
/*******************************************************************************
-**
-** Function PORT_SetEventCallback
-**
-** Description Set event data callback the specified connection.
-**
-** Parameters: handle - Handle of the port returned in the Open
-** p_callback - address of the callback function which should
-** be called from the RFCOMM when a data
-** packet is received.
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetEventCallback
+ *
+ * Description Set event data callback the specified connection.
+ *
+ * Parameters: handle - Handle of the port returned in the Open
+ * p_callback - address of the callback function which should
+ * be called from the RFCOMM when a data
+ * packet is received.
+ *
+ ******************************************************************************/
extern int PORT_SetDataCallback (uint16_t port_handle,
tPORT_DATA_CALLBACK *p_cb);
extern int PORT_SetDataCOCallback (uint16_t port_handle, tPORT_DATA_CO_CALLBACK *p_port_cb);
/*******************************************************************************
-**
-** Function PORT_SetEventMask
-**
-** Description This function is called to close the specified connection.
-**
-** Parameters: handle - Handle of the port returned in the Open
-** mask - specifies events to be enabled. A value
-** of zero disables all events.
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetEventMask
+ *
+ * Description This function is called to close the specified connection.
+ *
+ * Parameters: handle - Handle of the port returned in the Open
+ * mask - specifies events to be enabled. A value
+ * of zero disables all events.
+ *
+ ******************************************************************************/
extern int PORT_SetEventMask (uint16_t port_handle, uint32_t mask);
/*******************************************************************************
-**
-** Function PORT_CheckConnection
-**
-** Description This function returns PORT_SUCCESS if connection referenced
-** by handle is up and running
-**
-** Parameters: handle - Handle of the port returned in the Open
-** bd_addr - OUT bd_addr of the peer
-** p_lcid - OUT L2CAP's LCID
-**
-*******************************************************************************/
+ *
+ * Function PORT_CheckConnection
+ *
+ * Description This function returns PORT_SUCCESS if connection referenced
+ * by handle is up and running
+ *
+ * Parameters: handle - Handle of the port returned in the Open
+ * bd_addr - OUT bd_addr of the peer
+ * p_lcid - OUT L2CAP's LCID
+ *
+ ******************************************************************************/
extern int PORT_CheckConnection (uint16_t handle, BD_ADDR bd_addr,
uint16_t *p_lcid);
/*******************************************************************************
-**
-** Function PORT_IsOpening
-**
-** Description This function returns true if there is any RFCOMM connection
-** opening in process.
-**
-** Parameters: true if any connection opening is found
-** bd_addr - bd_addr of the peer
-**
-*******************************************************************************/
+ *
+ * Function PORT_IsOpening
+ *
+ * Description This function returns true if there is any RFCOMM connection
+ * opening in process.
+ *
+ * Parameters: true if any connection opening is found
+ * bd_addr - bd_addr of the peer
+ *
+ ******************************************************************************/
extern bool PORT_IsOpening (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function PORT_SetState
-**
-** Description This function configures connection according to the
-** specifications in the tPORT_STATE structure.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_settings - Pointer to a tPORT_STATE structure containing
-** configuration information for the connection.
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetState
+ *
+ * Description This function configures connection according to the
+ * specifications in the tPORT_STATE structure.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_settings - Pointer to a tPORT_STATE structure containing
+ * configuration information for the connection.
+ *
+ ******************************************************************************/
extern int PORT_SetState (uint16_t handle, tPORT_STATE *p_settings);
/*******************************************************************************
-**
-** Function PORT_GetRxQueueCnt
-**
-** Description This function return number of buffers on the rx queue.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_rx_queue_count - Pointer to return queue count in.
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetRxQueueCnt
+ *
+ * Description This function return number of buffers on the rx queue.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_rx_queue_count - Pointer to return queue count in.
+ *
+ ******************************************************************************/
extern int PORT_GetRxQueueCnt (uint16_t handle, uint16_t *p_rx_queue_count);
/*******************************************************************************
-**
-** Function PORT_GetState
-**
-** Description This function is called to fill tPORT_STATE structure
-** with the current control settings for the port
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_settings - Pointer to a tPORT_STATE structure in which
-** configuration information is returned.
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetState
+ *
+ * Description This function is called to fill tPORT_STATE structure
+ * with the current control settings for the port
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_settings - Pointer to a tPORT_STATE structure in which
+ * configuration information is returned.
+ *
+ ******************************************************************************/
extern int PORT_GetState (uint16_t handle, tPORT_STATE *p_settings);
/*******************************************************************************
-**
-** Function PORT_Control
-**
-** Description This function directs a specified connection to pass control
-** control information to the peer device.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** signal - specify the function to be passed
-**
-*******************************************************************************/
+ *
+ * Function PORT_Control
+ *
+ * Description This function directs a specified connection to pass control
+ * control information to the peer device.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * signal - specify the function to be passed
+ *
+ ******************************************************************************/
#define PORT_SET_DTRDSR 0x01
#define PORT_CLR_DTRDSR 0x02
#define PORT_SET_CTSRTS 0x03
@@ -396,55 +396,55 @@
/*******************************************************************************
-**
-** Function PORT_FlowControl
-**
-** Description This function directs a specified connection to pass
-** flow control message to the peer device. Enable flag passed
-** shows if port can accept more data.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** enable - enables data flow
-**
-*******************************************************************************/
+ *
+ * Function PORT_FlowControl
+ *
+ * Description This function directs a specified connection to pass
+ * flow control message to the peer device. Enable flag passed
+ * shows if port can accept more data.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * enable - enables data flow
+ *
+ ******************************************************************************/
extern int PORT_FlowControl (uint16_t handle, bool enable);
/*******************************************************************************
-**
-** Function PORT_FlowControl_MaxCredit
-**
-** Description This function directs a specified connection to pass
-** flow control message to the peer device. Enable flag passed
-** shows if port can accept more data. It also sends max credit
-** when data flow enabled
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** enable - enables data flow
-**
-*******************************************************************************/
+ *
+ * Function PORT_FlowControl_MaxCredit
+ *
+ * Description This function directs a specified connection to pass
+ * flow control message to the peer device. Enable flag passed
+ * shows if port can accept more data. It also sends max credit
+ * when data flow enabled
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * enable - enables data flow
+ *
+ ******************************************************************************/
extern int PORT_FlowControl_MaxCredit(uint16_t handle, bool enable);
/*******************************************************************************
-**
-** Function PORT_GetModemStatus
-**
-** Description This function retrieves modem control signals. Normally
-** application will call this function after a callback
-** function is called with notification that one of signals
-** has been changed.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** callback.
-** p_signal - specify the pointer to control signals info
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetModemStatus
+ *
+ * Description This function retrieves modem control signals. Normally
+ * application will call this function after a callback
+ * function is called with notification that one of signals
+ * has been changed.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * callback.
+ * p_signal - specify the pointer to control signals info
+ *
+ ******************************************************************************/
#define PORT_DTRDSR_ON 0x01
#define PORT_CTSRTS_ON 0x02
#define PORT_RING_ON 0x04
#define PORT_DCD_ON 0x08
/*
-** Define default initial local modem signals state set after connection established
+ * Define default initial local modem signals state set after connection established
*/
#define PORT_OBEX_DEFAULT_SIGNAL_STATE (PORT_DTRDSR_ON | PORT_CTSRTS_ON | PORT_DCD_ON)
#define PORT_SPP_DEFAULT_SIGNAL_STATE (PORT_DTRDSR_ON | PORT_CTSRTS_ON | PORT_DCD_ON)
@@ -455,21 +455,21 @@
/*******************************************************************************
-**
-** Function PORT_ClearError
-**
-** Description This function retreives information about a communications
-** error and reports current status of a connection. The
-** function should be called when an error occures to clear
-** the connection error flag and to enable additional read
-** and write operations.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_errors - pointer of the variable to receive error codes
-** p_status - pointer to the tPORT_STATUS structur to receive
-** connection status
-**
-*******************************************************************************/
+ *
+ * Function PORT_ClearError
+ *
+ * Description This function retreives information about a communications
+ * error and reports current status of a connection. The
+ * function should be called when an error occures to clear
+ * the connection error flag and to enable additional read
+ * and write operations.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_errors - pointer of the variable to receive error codes
+ * p_status - pointer to the tPORT_STATUS structur to receive
+ * connection status
+ *
+ ******************************************************************************/
#define PORT_ERR_BREAK 0x01 /* Break condition occured on the peer device */
#define PORT_ERR_OVERRUN 0x02 /* Overrun is reported by peer device */
@@ -495,43 +495,43 @@
/*******************************************************************************
-**
-** Function PORT_SendError
-**
-** Description This function send a communications error to the peer device
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** errors - receive error codes
-**
-*******************************************************************************/
+ *
+ * Function PORT_SendError
+ *
+ * Description This function send a communications error to the peer device
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * errors - receive error codes
+ *
+ ******************************************************************************/
extern int PORT_SendError (uint16_t handle, uint8_t errors);
/*******************************************************************************
-**
-** Function PORT_GetQueueStatus
-**
-** Description This function reports current status of a connection.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_status - pointer to the tPORT_STATUS structur to receive
-** connection status
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetQueueStatus
+ *
+ * Description This function reports current status of a connection.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_status - pointer to the tPORT_STATUS structur to receive
+ * connection status
+ *
+ ******************************************************************************/
extern int PORT_GetQueueStatus (uint16_t handle, tPORT_STATUS *p_status);
/*******************************************************************************
-**
-** Function PORT_Purge
-**
-** Description This function discards all the data from the output or
-** input queues of the specified connection.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** purge_flags - specify the action to take.
-**
-*******************************************************************************/
+ *
+ * Function PORT_Purge
+ *
+ * Description This function discards all the data from the output or
+ * input queues of the specified connection.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * purge_flags - specify the action to take.
+ *
+ ******************************************************************************/
#define PORT_PURGE_TXCLEAR 0x01
#define PORT_PURGE_RXCLEAR 0x02
@@ -539,131 +539,131 @@
/*******************************************************************************
-**
-** Function PORT_Read
-**
-** Description This function returns the pointer to the buffer received
-** from the peer device. Normally application will call this
-** function after receiving PORT_EVT_RXCHAR event.
-** Application calling this function is responsible to free
-** buffer returned.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** callback.
-** pp_buf - pointer to address of buffer with data,
-**
-*******************************************************************************/
+ *
+ * Function PORT_Read
+ *
+ * Description This function returns the pointer to the buffer received
+ * from the peer device. Normally application will call this
+ * function after receiving PORT_EVT_RXCHAR event.
+ * Application calling this function is responsible to free
+ * buffer returned.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * callback.
+ * pp_buf - pointer to address of buffer with data,
+ *
+ ******************************************************************************/
extern int PORT_Read (uint16_t handle, BT_HDR **pp_buf);
/*******************************************************************************
-**
-** Function PORT_ReadData
-**
-** Description Normally application will call this function after receiving
-** PORT_EVT_RXCHAR event.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** callback.
-** p_data - Data area
-** max_len - Byte count requested
-** p_len - Byte count received
-**
-*******************************************************************************/
+ *
+ * Function PORT_ReadData
+ *
+ * Description Normally application will call this function after receiving
+ * PORT_EVT_RXCHAR event.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * callback.
+ * p_data - Data area
+ * max_len - Byte count requested
+ * p_len - Byte count received
+ *
+ ******************************************************************************/
extern int PORT_ReadData (uint16_t handle, char *p_data, uint16_t max_len,
uint16_t *p_len);
/*******************************************************************************
-**
-** Function PORT_Write
-**
-** Description This function to send BT buffer to the peer device.
-** Application should not free the buffer.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_buf - pointer to the buffer with data,
-**
-*******************************************************************************/
+ *
+ * Function PORT_Write
+ *
+ * Description This function to send BT buffer to the peer device.
+ * Application should not free the buffer.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_buf - pointer to the buffer with data,
+ *
+ ******************************************************************************/
extern int PORT_Write (uint16_t handle, BT_HDR *p_buf);
/*******************************************************************************
-**
-** Function PORT_WriteData
-**
-** Description This function is called from the legacy application to
-** send data.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_data - Data area
-** max_len - Byte count to write
-** p_len - Bytes written
-**
-*******************************************************************************/
+ *
+ * Function PORT_WriteData
+ *
+ * Description This function is called from the legacy application to
+ * send data.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_data - Data area
+ * max_len - Byte count to write
+ * p_len - Bytes written
+ *
+ ******************************************************************************/
extern int PORT_WriteData (uint16_t handle, const char *p_data,
uint16_t max_len, uint16_t *p_len);
/*******************************************************************************
-**
-** Function PORT_WriteDataCO
-**
-** Description Normally not GKI aware application will call this function
-** to send data to the port by callout functions.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-**
-*******************************************************************************/
+ *
+ * Function PORT_WriteDataCO
+ *
+ * Description Normally not GKI aware application will call this function
+ * to send data to the port by callout functions.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ *
+ ******************************************************************************/
extern int PORT_WriteDataCO (uint16_t handle, int* p_len);
/*******************************************************************************
-**
-** Function PORT_Test
-**
-** Description Application can call this function to send RFCOMM Test frame
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_data - Data area
-** max_len - Byte count requested
-**
-*******************************************************************************/
+ *
+ * Function PORT_Test
+ *
+ * Description Application can call this function to send RFCOMM Test frame
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_data - Data area
+ * max_len - Byte count requested
+ *
+ ******************************************************************************/
extern int PORT_Test (uint16_t handle, uint8_t *p_data, uint16_t len);
/*******************************************************************************
-**
-** Function RFCOMM_Init
-**
-** Description This function is called to initialize RFCOMM layer
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_Init
+ *
+ * Description This function is called to initialize RFCOMM layer
+ *
+ ******************************************************************************/
extern void RFCOMM_Init (void);
/*******************************************************************************
-**
-** Function PORT_SetTraceLevel
-**
-** Description This function sets the trace level for RFCOMM. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetTraceLevel
+ *
+ * Description This function sets the trace level for RFCOMM. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
extern uint8_t PORT_SetTraceLevel (uint8_t new_level);
/*******************************************************************************
-**
-** Function PORT_GetResultString
-**
-** Description This function returns the human-readable string for a given
-** result code.
-**
-** Returns a pointer to the human-readable string for the given
-** result. Note that the string returned must not be freed.
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetResultString
+ *
+ * Description This function returns the human-readable string for a given
+ * result code.
+ *
+ * Returns a pointer to the human-readable string for the given
+ * result. Note that the string returned must not be freed.
+ *
+ ******************************************************************************/
extern const char *PORT_GetResultString (const uint8_t result_code);
#ifdef __cplusplus
diff --git a/stack/include/profiles_api.h b/stack/include/profiles_api.h
index bb8a6ec..2b152d1 100644
--- a/stack/include/profiles_api.h
+++ b/stack/include/profiles_api.h
@@ -23,8 +23,8 @@
#include "btm_api.h"
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
#define BT_PASS 0 /* Used for general successful function returns */
/*** Port entity passes back 8 bit errors; will use upper byte offset ***/
@@ -53,13 +53,13 @@
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
/*
-** Security Definitions
-** This following definitions are used to indicate the security
-** requirements for a service.
+ * Security Definitions
+ * This following definitions are used to indicate the security
+ * requirements for a service.
*/
typedef struct
{
diff --git a/stack/include/rfcdefs.h b/stack/include/rfcdefs.h
index d23b76c..77534a1 100644
--- a/stack/include/rfcdefs.h
+++ b/stack/include/rfcdefs.h
@@ -28,12 +28,12 @@
#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
/*
-** Define used by RFCOMM TS frame types
+ * Define used by RFCOMM TS frame types
*/
#define RFCOMM_SABME 0x2F
#define RFCOMM_UA 0x63
@@ -42,7 +42,7 @@
#define RFCOMM_UIH 0xEF
/*
-** Defenitions for the TS control frames
+ * Defenitions for the TS control frames
*/
#define RFCOMM_CTRL_FRAME_LEN 3
#define RFCOMM_MIN_OFFSET 5 /* ctrl 2 , len 1 or 2 bytes, credit 1 byte */
@@ -216,7 +216,7 @@
#define RFCOMM_MX_DLCI 0
/*
-** Define RFCOMM Multiplexer message types
+ * Define RFCOMM Multiplexer message types
*/
#define RFCOMM_MX_PN 0x80
#define RFCOMM_MX_PN_LEN 8
diff --git a/stack/include/sdp_api.h b/stack/include/sdp_api.h
index f58d834..ddd4ee4 100644
--- a/stack/include/sdp_api.h
+++ b/stack/include/sdp_api.h
@@ -26,8 +26,8 @@
#endif
/*****************************************************************************
-** Constants
-*****************************************************************************/
+ * Constants
+ ****************************************************************************/
/* Success code and error codes */
#define SDP_SUCCESS 0x0000
@@ -69,8 +69,8 @@
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
/* Define a callback function for when discovery is complete. */
typedef void (tSDP_DISC_CMPL_CB) (uint16_t result);
@@ -183,14 +183,14 @@
/* API into the SDP layer for service discovery. */
/*******************************************************************************
-**
-** Function SDP_InitDiscoveryDb
-**
-** Description This function is called to initialize a discovery database.
-**
-** Returns true if successful, false if one or more parameters are bad
-**
-*******************************************************************************/
+ *
+ * Function SDP_InitDiscoveryDb
+ *
+ * Description This function is called to initialize a discovery database.
+ *
+ * Returns true if successful, false if one or more parameters are bad
+ *
+ ******************************************************************************/
bool SDP_InitDiscoveryDb (tSDP_DISCOVERY_DB *p_db, uint32_t len,
uint16_t num_uuid,
tSDP_UUID *p_uuid_list,
@@ -198,61 +198,61 @@
uint16_t *p_attr_list);
/*******************************************************************************
-**
-** Function SDP_CancelServiceSearch
-**
-** Description This function cancels an active query to an SDP server.
-**
-** Returns true if discovery cancelled, false if a matching activity is not found.
-**
-*******************************************************************************/
+ *
+ * Function SDP_CancelServiceSearch
+ *
+ * Description This function cancels an active query to an SDP server.
+ *
+ * Returns true if discovery cancelled, false if a matching activity is not found.
+ *
+ ******************************************************************************/
bool SDP_CancelServiceSearch (tSDP_DISCOVERY_DB *p_db);
/*******************************************************************************
-**
-** Function SDP_ServiceSearchRequest
-**
-** Description This function queries an SDP server for information.
-**
-** Returns true if discovery started, false if failed.
-**
-*******************************************************************************/
+ *
+ * Function SDP_ServiceSearchRequest
+ *
+ * Description This function queries an SDP server for information.
+ *
+ * Returns true if discovery started, false if failed.
+ *
+ ******************************************************************************/
bool SDP_ServiceSearchRequest (uint8_t *p_bd_addr,
tSDP_DISCOVERY_DB *p_db,
tSDP_DISC_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function SDP_ServiceSearchAttributeRequest
-**
-** Description This function queries an SDP server for information.
-**
-** The difference between this API function and the function
-** SDP_ServiceSearchRequest is that this one does a
-** combined ServiceSearchAttributeRequest SDP function.
-**
-** Returns true if discovery started, false if failed.
-**
-*******************************************************************************/
+ *
+ * Function SDP_ServiceSearchAttributeRequest
+ *
+ * Description This function queries an SDP server for information.
+ *
+ * The difference between this API function and the function
+ * SDP_ServiceSearchRequest is that this one does a
+ * combined ServiceSearchAttributeRequest SDP function.
+ *
+ * Returns true if discovery started, false if failed.
+ *
+ ******************************************************************************/
bool SDP_ServiceSearchAttributeRequest (uint8_t *p_bd_addr,
tSDP_DISCOVERY_DB *p_db,
tSDP_DISC_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function SDP_ServiceSearchAttributeRequest2
-**
-** Description This function queries an SDP server for information.
-**
-** The difference between this API function and the function
-** SDP_ServiceSearchRequest is that this one does a
-** combined ServiceSearchAttributeRequest SDP function with the
-** user data piggyback
-**
-** Returns true if discovery started, false if failed.
-**
-*******************************************************************************/
+ *
+ * Function SDP_ServiceSearchAttributeRequest2
+ *
+ * Description This function queries an SDP server for information.
+ *
+ * The difference between this API function and the function
+ * SDP_ServiceSearchRequest is that this one does a
+ * combined ServiceSearchAttributeRequest SDP function with the
+ * user data piggyback
+ *
+ * Returns true if discovery started, false if failed.
+ *
+ ******************************************************************************/
bool SDP_ServiceSearchAttributeRequest2 (uint8_t *p_bd_addr,
tSDP_DISCOVERY_DB *p_db,
tSDP_DISC_CMPL_CB2 *p_cb, void * user_data);
@@ -260,149 +260,149 @@
/* API of utilities to find data in the local discovery database */
/*******************************************************************************
-**
-** Function SDP_FindAttributeInDb
-**
-** Description This function queries an SDP database for a specific attribute.
-** If the p_start_rec pointer is NULL, it looks from the beginning
-** of the database, else it continues from the next record after
-** p_start_rec.
-**
-** Returns Pointer to matching record, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindAttributeInDb
+ *
+ * Description This function queries an SDP database for a specific attribute.
+ * If the p_start_rec pointer is NULL, it looks from the beginning
+ * of the database, else it continues from the next record after
+ * p_start_rec.
+ *
+ * Returns Pointer to matching record, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_REC *SDP_FindAttributeInDb (tSDP_DISCOVERY_DB *p_db,
uint16_t attr_id,
tSDP_DISC_REC *p_start_rec);
/*******************************************************************************
-**
-** Function SDP_FindAttributeInRec
-**
-** Description This function searches an SDP discovery record for a
-** specific attribute.
-**
-** Returns Pointer to matching attribute entry, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindAttributeInRec
+ *
+ * Description This function searches an SDP discovery record for a
+ * specific attribute.
+ *
+ * Returns Pointer to matching attribute entry, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_ATTR *SDP_FindAttributeInRec (tSDP_DISC_REC *p_rec,
uint16_t attr_id);
/*******************************************************************************
-**
-** Function SDP_FindServiceInDb
-**
-** Description This function queries an SDP database for a specific service.
-** If the p_start_rec pointer is NULL, it looks from the beginning
-** of the database, else it continues from the next record after
-** p_start_rec.
-**
-** Returns Pointer to record containing service class, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceInDb
+ *
+ * Description This function queries an SDP database for a specific service.
+ * If the p_start_rec pointer is NULL, it looks from the beginning
+ * of the database, else it continues from the next record after
+ * p_start_rec.
+ *
+ * Returns Pointer to record containing service class, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_REC *SDP_FindServiceInDb (tSDP_DISCOVERY_DB *p_db,
uint16_t service_uuid,
tSDP_DISC_REC *p_start_rec);
/*******************************************************************************
-**
-** Function SDP_FindServiceUUIDInDb
-**
-** Description This function queries an SDP database for a specific service.
-** If the p_start_rec pointer is NULL, it looks from the beginning
-** of the database, else it continues from the next record after
-** p_start_rec.
-**
-** NOTE the only difference between this function and the previous
-** function "SDP_FindServiceInDb()" is that this function takes
-** a tBT_UUID input.
-**
-** Returns Pointer to record containing service class, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceUUIDInDb
+ *
+ * Description This function queries an SDP database for a specific service.
+ * If the p_start_rec pointer is NULL, it looks from the beginning
+ * of the database, else it continues from the next record after
+ * p_start_rec.
+ *
+ * NOTE the only difference between this function and the previous
+ * function "SDP_FindServiceInDb()" is that this function takes
+ * a tBT_UUID input.
+ *
+ * Returns Pointer to record containing service class, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_REC *SDP_FindServiceUUIDInDb (tSDP_DISCOVERY_DB *p_db,
tBT_UUID *p_uuid,
tSDP_DISC_REC *p_start_rec);
/*******************************************************************************
-**
-** Function SDP_FindServiceUUIDInRec_128bit
-**
-** Description This function is called to read the 128-bit service UUID within a record
-** if there is any.
-**
-** Parameters: p_rec - pointer to a SDP record.
-** p_uuid - output parameter to save the UUID found.
-**
-** Returns true if found, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceUUIDInRec_128bit
+ *
+ * Description This function is called to read the 128-bit service UUID within a record
+ * if there is any.
+ *
+ * Parameters: p_rec - pointer to a SDP record.
+ * p_uuid - output parameter to save the UUID found.
+ *
+ * Returns true if found, otherwise false.
+ *
+ ******************************************************************************/
bool SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC *p_rec, tBT_UUID * p_uuid);
/*******************************************************************************
-**
-** Function SDP_FindServiceInDb_128bit
-**
-** Description This function queries an SDP database for a specific service.
-** If the p_start_rec pointer is NULL, it looks from the beginning
-** of the database, else it continues from the next record after
-** p_start_rec.
-**
-** Returns Pointer to record containing service class, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceInDb_128bit
+ *
+ * Description This function queries an SDP database for a specific service.
+ * If the p_start_rec pointer is NULL, it looks from the beginning
+ * of the database, else it continues from the next record after
+ * p_start_rec.
+ *
+ * Returns Pointer to record containing service class, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_REC *SDP_FindServiceInDb_128bit(tSDP_DISCOVERY_DB *p_db,
tSDP_DISC_REC *p_start_rec);
/*******************************************************************************
-**
-** Function SDP_FindProtocolListElemInRec
-**
-** Description This function looks at a specific discovery record for a
-** protocol list element.
-**
-** Returns true if found, false if not
-** If found, the passed protocol list element is filled in.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindProtocolListElemInRec
+ *
+ * Description This function looks at a specific discovery record for a
+ * protocol list element.
+ *
+ * Returns true if found, false if not
+ * If found, the passed protocol list element is filled in.
+ *
+ ******************************************************************************/
bool SDP_FindProtocolListElemInRec (tSDP_DISC_REC *p_rec,
uint16_t layer_uuid,
tSDP_PROTOCOL_ELEM *p_elem);
/*******************************************************************************
-**
-** Function SDP_FindAddProtoListsElemInRec
-**
-** Description This function looks at a specific discovery record for a
-** protocol list element.
-**
-** Returns true if found, false if not
-** If found, the passed protocol list element is filled in.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindAddProtoListsElemInRec
+ *
+ * Description This function looks at a specific discovery record for a
+ * protocol list element.
+ *
+ * Returns true if found, false if not
+ * If found, the passed protocol list element is filled in.
+ *
+ ******************************************************************************/
bool SDP_FindAddProtoListsElemInRec (tSDP_DISC_REC *p_rec,
uint16_t layer_uuid,
tSDP_PROTOCOL_ELEM *p_elem);
/*******************************************************************************
-**
-** Function SDP_FindProfileVersionInRec
-**
-** Description This function looks at a specific discovery record for the
-** Profile list descriptor, and pulls out the version number.
-** The version number consists of an 8-bit major version and
-** an 8-bit minor version.
-**
-** Returns true if found, false if not
-** If found, the major and minor version numbers that were passed
-** in are filled in.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindProfileVersionInRec
+ *
+ * Description This function looks at a specific discovery record for the
+ * Profile list descriptor, and pulls out the version number.
+ * The version number consists of an 8-bit major version and
+ * an 8-bit minor version.
+ *
+ * Returns true if found, false if not
+ * If found, the major and minor version numbers that were passed
+ * in are filled in.
+ *
+ ******************************************************************************/
bool SDP_FindProfileVersionInRec (tSDP_DISC_REC *p_rec,
uint16_t profile_uuid,
uint16_t *p_version);
@@ -411,273 +411,273 @@
/* API into SDP for local service database updates */
/*******************************************************************************
-**
-** Function SDP_CreateRecord
-**
-** Description This function is called to create a record in the database.
-** This would be through the SDP database maintenance API. The
-** record is created empty, teh application should then call
-** "add_attribute" to add the record's attributes.
-**
-** Returns Record handle if OK, else 0.
-**
-*******************************************************************************/
+ *
+ * Function SDP_CreateRecord
+ *
+ * Description This function is called to create a record in the database.
+ * This would be through the SDP database maintenance API. The
+ * record is created empty, teh application should then call
+ * "add_attribute" to add the record's attributes.
+ *
+ * Returns Record handle if OK, else 0.
+ *
+ ******************************************************************************/
uint32_t SDP_CreateRecord (void);
/*******************************************************************************
-**
-** Function SDP_DeleteRecord
-**
-** Description This function is called to add a record (or all records)
-** from the database. This would be through the SDP database
-** maintenance API.
-**
-** If a record handle of 0 is passed, all records are deleted.
-**
-** Returns true if succeeded, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_DeleteRecord
+ *
+ * Description This function is called to add a record (or all records)
+ * from the database. This would be through the SDP database
+ * maintenance API.
+ *
+ * If a record handle of 0 is passed, all records are deleted.
+ *
+ * Returns true if succeeded, else false
+ *
+ ******************************************************************************/
bool SDP_DeleteRecord (uint32_t handle);
/*******************************************************************************
-**
-** Function SDP_ReadRecord
-**
-** Description This function is called to get the raw data of the record
-** with the given handle from the database.
-**
-** Returns -1, if the record is not found.
-** Otherwise, the offset (0 or 1) to start of data in p_data.
-**
-** The size of data copied into p_data is in *p_data_len.
-**
-*******************************************************************************/
+ *
+ * Function SDP_ReadRecord
+ *
+ * Description This function is called to get the raw data of the record
+ * with the given handle from the database.
+ *
+ * Returns -1, if the record is not found.
+ * Otherwise, the offset (0 or 1) to start of data in p_data.
+ *
+ * The size of data copied into p_data is in *p_data_len.
+ *
+ ******************************************************************************/
int32_t SDP_ReadRecord(uint32_t handle, uint8_t *p_data, int32_t *p_data_len);
/*******************************************************************************
-**
-** Function SDP_AddAttribute
-**
-** Description This function is called to add an attribute to a record.
-** This would be through the SDP database maintenance API.
-** If the attribute already exists in the record, it is replaced
-** with the new value.
-**
-** NOTE Attribute values must be passed as a Big Endian stream.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddAttribute
+ *
+ * Description This function is called to add an attribute to a record.
+ * This would be through the SDP database maintenance API.
+ * If the attribute already exists in the record, it is replaced
+ * with the new value.
+ *
+ * NOTE Attribute values must be passed as a Big Endian stream.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddAttribute (uint32_t handle, uint16_t attr_id,
uint8_t attr_type, uint32_t attr_len,
uint8_t *p_val);
/*******************************************************************************
-**
-** Function SDP_AddSequence
-**
-** Description This function is called to add a sequence to a record.
-** This would be through the SDP database maintenance API.
-** If the sequence already exists in the record, it is replaced
-** with the new sequence.
-**
-** NOTE Element values must be passed as a Big Endian stream.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddSequence
+ *
+ * Description This function is called to add a sequence to a record.
+ * This would be through the SDP database maintenance API.
+ * If the sequence already exists in the record, it is replaced
+ * with the new sequence.
+ *
+ * NOTE Element values must be passed as a Big Endian stream.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddSequence (uint32_t handle, uint16_t attr_id,
uint16_t num_elem, uint8_t type[],
uint8_t len[], uint8_t *p_val[]);
/*******************************************************************************
-**
-** Function SDP_AddUuidSequence
-**
-** Description This function is called to add a UUID sequence to a record.
-** This would be through the SDP database maintenance API.
-** If the sequence already exists in the record, it is replaced
-** with the new sequence.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddUuidSequence
+ *
+ * Description This function is called to add a UUID sequence to a record.
+ * This would be through the SDP database maintenance API.
+ * If the sequence already exists in the record, it is replaced
+ * with the new sequence.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddUuidSequence (uint32_t handle, uint16_t attr_id,
uint16_t num_uuids, uint16_t *p_uuids);
/*******************************************************************************
-**
-** Function SDP_AddProtocolList
-**
-** Description This function is called to add a protocol descriptor list to
-** a record. This would be through the SDP database maintenance API.
-** If the protocol list already exists in the record, it is replaced
-** with the new list.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddProtocolList
+ *
+ * Description This function is called to add a protocol descriptor list to
+ * a record. This would be through the SDP database maintenance API.
+ * If the protocol list already exists in the record, it is replaced
+ * with the new list.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddProtocolList (uint32_t handle, uint16_t num_elem,
tSDP_PROTOCOL_ELEM *p_elem_list);
/*******************************************************************************
-**
-** Function SDP_AddAdditionProtoLists
-**
-** Description This function is called to add a protocol descriptor list to
-** a record. This would be through the SDP database maintenance API.
-** If the protocol list already exists in the record, it is replaced
-** with the new list.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddAdditionProtoLists
+ *
+ * Description This function is called to add a protocol descriptor list to
+ * a record. This would be through the SDP database maintenance API.
+ * If the protocol list already exists in the record, it is replaced
+ * with the new list.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddAdditionProtoLists (uint32_t handle, uint16_t num_elem,
tSDP_PROTO_LIST_ELEM *p_proto_list);
/*******************************************************************************
-**
-** Function SDP_AddProfileDescriptorList
-**
-** Description This function is called to add a profile descriptor list to
-** a record. This would be through the SDP database maintenance API.
-** If the version already exists in the record, it is replaced
-** with the new one.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddProfileDescriptorList
+ *
+ * Description This function is called to add a profile descriptor list to
+ * a record. This would be through the SDP database maintenance API.
+ * If the version already exists in the record, it is replaced
+ * with the new one.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddProfileDescriptorList (uint32_t handle,
uint16_t profile_uuid,
uint16_t version);
/*******************************************************************************
-**
-** Function SDP_AddLanguageBaseAttrIDList
-**
-** Description This function is called to add a language base attr list to
-** a record. This would be through the SDP database maintenance API.
-** If the version already exists in the record, it is replaced
-** with the new one.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddLanguageBaseAttrIDList
+ *
+ * Description This function is called to add a language base attr list to
+ * a record. This would be through the SDP database maintenance API.
+ * If the version already exists in the record, it is replaced
+ * with the new one.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddLanguageBaseAttrIDList (uint32_t handle,
uint16_t lang, uint16_t char_enc,
uint16_t base_id);
/*******************************************************************************
-**
-** Function SDP_AddServiceClassIdList
-**
-** Description This function is called to add a service list to a record.
-** This would be through the SDP database maintenance API.
-** If the service list already exists in the record, it is replaced
-** with the new list.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddServiceClassIdList
+ *
+ * Description This function is called to add a service list to a record.
+ * This would be through the SDP database maintenance API.
+ * If the service list already exists in the record, it is replaced
+ * with the new list.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddServiceClassIdList (uint32_t handle,
uint16_t num_services,
uint16_t *p_service_uuids);
/*******************************************************************************
-**
-** Function SDP_DeleteAttribute
-**
-** Description This function is called to delete an attribute from a record.
-** This would be through the SDP database maintenance API.
-**
-** Returns true if deleted OK, else false if not found
-**
-*******************************************************************************/
+ *
+ * Function SDP_DeleteAttribute
+ *
+ * Description This function is called to delete an attribute from a record.
+ * This would be through the SDP database maintenance API.
+ *
+ * Returns true if deleted OK, else false if not found
+ *
+ ******************************************************************************/
bool SDP_DeleteAttribute (uint32_t handle, uint16_t attr_id);
/* Device Identification APIs */
/*******************************************************************************
-**
-** Function SDP_SetLocalDiRecord
-**
-** Description This function adds a DI record to the local SDP database.
-**
-** Returns Returns SDP_SUCCESS if record added successfully, else error
-**
-*******************************************************************************/
+ *
+ * Function SDP_SetLocalDiRecord
+ *
+ * Description This function adds a DI record to the local SDP database.
+ *
+ * Returns Returns SDP_SUCCESS if record added successfully, else error
+ *
+ ******************************************************************************/
uint16_t SDP_SetLocalDiRecord (tSDP_DI_RECORD *device_info,
uint32_t *p_handle);
/*******************************************************************************
-**
-** Function SDP_DiDiscover
-**
-** Description This function queries a remote device for DI information.
-**
-** Returns SDP_SUCCESS if query started successfully, else error
-**
-*******************************************************************************/
+ *
+ * Function SDP_DiDiscover
+ *
+ * Description This function queries a remote device for DI information.
+ *
+ * Returns SDP_SUCCESS if query started successfully, else error
+ *
+ ******************************************************************************/
uint16_t SDP_DiDiscover (BD_ADDR remote_device,
tSDP_DISCOVERY_DB *p_db, uint32_t len,
tSDP_DISC_CMPL_CB *p_cb);
/*******************************************************************************
-**
-** Function SDP_GetNumDiRecords
-**
-** Description Searches specified database for DI records
-**
-** Returns number of DI records found
-**
-*******************************************************************************/
+ *
+ * Function SDP_GetNumDiRecords
+ *
+ * Description Searches specified database for DI records
+ *
+ * Returns number of DI records found
+ *
+ ******************************************************************************/
uint8_t SDP_GetNumDiRecords (tSDP_DISCOVERY_DB *p_db);
/*******************************************************************************
-**
-** Function SDP_GetDiRecord
-**
-** Description This function retrieves a remote device's DI record from
-** the specified database.
-**
-** Returns SDP_SUCCESS if record retrieved, else error
-**
-*******************************************************************************/
+ *
+ * Function SDP_GetDiRecord
+ *
+ * Description This function retrieves a remote device's DI record from
+ * the specified database.
+ *
+ * Returns SDP_SUCCESS if record retrieved, else error
+ *
+ ******************************************************************************/
uint16_t SDP_GetDiRecord (uint8_t getRecordIndex,
tSDP_DI_GET_RECORD *device_info,
tSDP_DISCOVERY_DB *p_db);
/*******************************************************************************
-**
-** Function SDP_SetTraceLevel
-**
-** Description This function sets the trace level for SDP. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function SDP_SetTraceLevel
+ *
+ * Description This function sets the trace level for SDP. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
uint8_t SDP_SetTraceLevel (uint8_t new_level);
/*******************************************************************************
-**
-** Function SDP_FindServiceUUIDInRec
-**
-** Description This function is called to read the service UUID within a record
-** if there is any.
-**
-** Parameters: p_rec - pointer to a SDP record.
-**
-** Returns true if found, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceUUIDInRec
+ *
+ * Description This function is called to read the service UUID within a record
+ * if there is any.
+ *
+ * Parameters: p_rec - pointer to a SDP record.
+ *
+ * Returns true if found, otherwise false.
+ *
+ ******************************************************************************/
bool SDP_FindServiceUUIDInRec(tSDP_DISC_REC *p_rec, tBT_UUID *p_uuid);
// Converts UUID-16 to UUID-128 by including the base UUID.
diff --git a/stack/include/smp_api.h b/stack/include/smp_api.h
index fae0b7f..e41e3da 100644
--- a/stack/include/smp_api.h
+++ b/stack/include/smp_api.h
@@ -32,193 +32,193 @@
#endif
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/* API of SMP */
/*******************************************************************************
-**
-** Function SMP_Init
-**
-** Description This function initializes the SMP unit.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function SMP_Init
+ *
+ * Description This function initializes the SMP unit.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern void SMP_Init(void);
/*******************************************************************************
-**
-** Function SMP_SetTraceLevel
-**
-** Description This function sets the trace level for SMP. If called with
-** a value of 0xFF, it simply returns the current trace level.
-**
-** Returns The new or current trace level
-**
-*******************************************************************************/
+ *
+ * Function SMP_SetTraceLevel
+ *
+ * Description This function sets the trace level for SMP. If called with
+ * a value of 0xFF, it simply returns the current trace level.
+ *
+ * Returns The new or current trace level
+ *
+ ******************************************************************************/
extern uint8_t SMP_SetTraceLevel (uint8_t new_level);
/*******************************************************************************
-**
-** Function SMP_Register
-**
-** Description This function register for the SMP service callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function SMP_Register
+ *
+ * Description This function register for the SMP service callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern bool SMP_Register (tSMP_CALLBACK *p_cback);
/*******************************************************************************
-**
-** Function SMP_Pair
-**
-** Description This function is called to start a SMP pairing.
-**
-** Returns SMP_STARTED if bond started, else otherwise exception.
-**
-*******************************************************************************/
+ *
+ * Function SMP_Pair
+ *
+ * Description This function is called to start a SMP pairing.
+ *
+ * Returns SMP_STARTED if bond started, else otherwise exception.
+ *
+ ******************************************************************************/
extern tSMP_STATUS SMP_Pair (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function SMP_BR_PairWith
-**
-** Description This function is called to start a SMP pairing over BR/EDR.
-**
-** Returns SMP_STARTED if pairing started, otherwise reason for failure.
-**
-*******************************************************************************/
+ *
+ * Function SMP_BR_PairWith
+ *
+ * Description This function is called to start a SMP pairing over BR/EDR.
+ *
+ * Returns SMP_STARTED if pairing started, otherwise reason for failure.
+ *
+ ******************************************************************************/
extern tSMP_STATUS SMP_BR_PairWith (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function SMP_PairCancel
-**
-** Description This function is called to cancel a SMP pairing.
-**
-** Returns true - pairing cancelled
-**
-*******************************************************************************/
+ *
+ * Function SMP_PairCancel
+ *
+ * Description This function is called to cancel a SMP pairing.
+ *
+ * Returns true - pairing cancelled
+ *
+ ******************************************************************************/
extern bool SMP_PairCancel (BD_ADDR bd_addr);
/*******************************************************************************
-**
-** Function SMP_SecurityGrant
-**
-** 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.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function SMP_SecurityGrant
+ *
+ * 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.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
extern void SMP_SecurityGrant(BD_ADDR bd_addr, uint8_t res);
/*******************************************************************************
-**
-** Function SMP_PasskeyReply
-**
-** Description This function is called after Security Manager submitted
-** Passkey request to the application.
-**
-** Parameters: bd_addr - Address of the device for which PIN was requested
-** 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)).
-**
-*******************************************************************************/
+ *
+ * Function SMP_PasskeyReply
+ *
+ * Description This function is called after Security Manager submitted
+ * Passkey request to the application.
+ *
+ * Parameters: bd_addr - Address of the device for which PIN was requested
+ * 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)).
+ *
+ ******************************************************************************/
extern void SMP_PasskeyReply (BD_ADDR bd_addr, uint8_t res, uint32_t passkey);
/*******************************************************************************
-**
-** Function SMP_ConfirmReply
-**
-** Description This function is called after Security Manager submitted
-** numeric comparison request to the application.
-**
-** Parameters: bd_addr - Address of the device with which numeric
-** comparison was requested
-** res - comparison result SMP_SUCCESS if success
-**
-*******************************************************************************/
+ *
+ * Function SMP_ConfirmReply
+ *
+ * Description This function is called after Security Manager submitted
+ * numeric comparison request to the application.
+ *
+ * Parameters: bd_addr - Address of the device with which numeric
+ * comparison was requested
+ * res - comparison result SMP_SUCCESS if success
+ *
+ ******************************************************************************/
extern void SMP_ConfirmReply (BD_ADDR bd_addr, uint8_t res);
/*******************************************************************************
-**
-** Function SMP_OobDataReply
-**
-** Description This function is called to provide the OOB data for
-** 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
-** p_data - SM Randomizer C.
-**
-*******************************************************************************/
+ *
+ * Function SMP_OobDataReply
+ *
+ * Description This function is called to provide the OOB data for
+ * 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
+ * p_data - SM Randomizer C.
+ *
+ ******************************************************************************/
extern void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, uint8_t len,
uint8_t *p_data);
/*******************************************************************************
-**
-** Function SMP_SecureConnectionOobDataReply
-**
-** Description This function is called to provide the SC OOB data for
-** SMP in response to SMP_SC_OOB_REQ_EVT
-**
-** Parameters: p_data - pointer to the data
-**
-*******************************************************************************/
+ *
+ * Function SMP_SecureConnectionOobDataReply
+ *
+ * Description This function is called to provide the SC OOB data for
+ * SMP in response to SMP_SC_OOB_REQ_EVT
+ *
+ * Parameters: p_data - pointer to the data
+ *
+ ******************************************************************************/
extern void SMP_SecureConnectionOobDataReply(uint8_t *p_data);
/*******************************************************************************
-**
-** Function SMP_Encrypt
-**
-** 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
-*******************************************************************************/
+ *
+ * Function SMP_Encrypt
+ *
+ * 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
+ ******************************************************************************/
extern bool SMP_Encrypt (uint8_t *key, uint8_t key_len,
uint8_t *plain_text, uint8_t pt_len,
tSMP_ENC *p_out);
/*******************************************************************************
-**
-** Function SMP_KeypressNotification
-**
-** Description This function is called to notify SM about Keypress Notification.
-**
-** Parameters: bd_addr - Address of the device to send keypress
-** notification to
-** value - keypress notification parameter value
-**
-*******************************************************************************/
+ *
+ * Function SMP_KeypressNotification
+ *
+ * Description This function is called to notify SM about Keypress Notification.
+ *
+ * Parameters: bd_addr - Address of the device to send keypress
+ * notification to
+ * value - keypress notification parameter value
+ *
+ ******************************************************************************/
extern void SMP_KeypressNotification (BD_ADDR bd_addr, uint8_t value);
/*******************************************************************************
-**
-** Function SMP_CreateLocalSecureConnectionsOobData
-**
-** Description This function is called to start creation of local SC OOB
-** data set (tSMP_LOC_OOB_DATA).
-**
-** Parameters: bd_addr - Address of the device to send OOB data block
-** to.
-**
-** Returns Boolean - true: creation of local SC OOB data set started.
-*******************************************************************************/
+ *
+ * Function SMP_CreateLocalSecureConnectionsOobData
+ *
+ * Description This function is called to start creation of local SC OOB
+ * data set (tSMP_LOC_OOB_DATA).
+ *
+ * Parameters: bd_addr - Address of the device to send OOB data block
+ * to.
+ *
+ * Returns Boolean - true: creation of local SC OOB data set started.
+ ******************************************************************************/
extern bool SMP_CreateLocalSecureConnectionsOobData(tBLE_BD_ADDR *addr_to_send_to);
// Called when LTK request is received from controller.
diff --git a/stack/include/srvc_api.h b/stack/include/srvc_api.h
index 2988a29..f585a00 100644
--- a/stack/include/srvc_api.h
+++ b/stack/include/srvc_api.h
@@ -34,8 +34,8 @@
/*****************************************************************************
-** Data structure for DIS
-*****************************************************************************/
+ * Data structure for DIS
+ ****************************************************************************/
#define DIS_ATTR_SYS_ID_BIT 0x0001
#define DIS_ATTR_MODEL_NUM_BIT 0x0002
@@ -88,8 +88,8 @@
typedef void (tDIS_READ_CBACK)(BD_ADDR addr, tDIS_VALUE *p_dis_value);
/*****************************************************************************
-** Data structure used by Battery Service
-*****************************************************************************/
+ * Data structure used by Battery Service
+ ****************************************************************************/
typedef struct
{
BD_ADDR remote_bda;
@@ -128,84 +128,84 @@
}tBA_RSP_DATA;
/*****************************************************************************
-** External Function Declarations
-*****************************************************************************/
+ * External Function Declarations
+ ****************************************************************************/
/*****************************************************************************
-** Service Engine API
-*****************************************************************************/
+ * Service Engine API
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function srvc_eng_init
-**
-** Description Initializa the GATT Service engine, register a GATT application
-** as for a central service management.
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_init
+ *
+ * Description Initializa the GATT Service engine, register a GATT application
+ * as for a central service management.
+ *
+ ******************************************************************************/
extern tGATT_STATUS srvc_eng_init (void);
/*****************************************************************************
-** DIS Server Function
-*****************************************************************************/
+ * DIS Server Function
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function DIS_SrInit
-**
-** Description Initializa the Device Information Service Server.
-**
-*******************************************************************************/
+ *
+ * Function DIS_SrInit
+ *
+ * Description Initializa the Device Information Service Server.
+ *
+ ******************************************************************************/
extern tDIS_STATUS DIS_SrInit (tDIS_ATTR_MASK dis_attr_mask);
/*******************************************************************************
-**
-** Function DIS_SrUpdate
-**
-** Description Update the DIS server attribute values
-**
-*******************************************************************************/
+ *
+ * Function DIS_SrUpdate
+ *
+ * Description Update the DIS server attribute values
+ *
+ ******************************************************************************/
extern tDIS_STATUS DIS_SrUpdate(tDIS_ATTR_BIT dis_attr_bit, tDIS_ATTR *p_info);
/*****************************************************************************
-** DIS Client Function
-*****************************************************************************/
+ * DIS Client Function
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function DIS_ReadDISInfo
-**
-** Description Read remote device DIS information.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function DIS_ReadDISInfo
+ *
+ * Description Read remote device DIS information.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern bool DIS_ReadDISInfo(BD_ADDR peer_bda, tDIS_READ_CBACK *p_cback,
tDIS_ATTR_MASK mask);
/*******************************************************************************
-** BATTERY SERVICE API
-*******************************************************************************/
+ * BATTERY SERVICE API
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function Battery_Instantiate
-**
-** Description Instantiate a Battery service
-**
-*******************************************************************************/
+ *
+ * Function Battery_Instantiate
+ *
+ * Description Instantiate a Battery service
+ *
+ ******************************************************************************/
extern uint16_t Battery_Instantiate (uint8_t app_id, tBA_REG_INFO *p_reg_info);
/*******************************************************************************
-**
-** Function Battery_Rsp
-**
-** Description Respond to a battery service request
-**
-*******************************************************************************/
+ *
+ * Function Battery_Rsp
+ *
+ * Description Respond to a battery service request
+ *
+ ******************************************************************************/
extern void Battery_Rsp (uint8_t app_id, tGATT_STATUS st, uint8_t event, tBA_RSP_DATA *p_rsp);
/*******************************************************************************
-**
-** Function Battery_Notify
-**
-** Description Send battery level notification
-**
-*******************************************************************************/
+ *
+ * Function Battery_Notify
+ *
+ * Description Send battery level notification
+ *
+ ******************************************************************************/
extern void Battery_Notify (uint8_t app_id, BD_ADDR remote_bda, uint8_t battery_level);
diff --git a/stack/l2cap/l2c_api.cc b/stack/l2cap/l2c_api.cc
index 65fd913..c47e024 100644
--- a/stack/l2cap/l2c_api.cc
+++ b/stack/l2cap/l2c_api.cc
@@ -44,19 +44,19 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*******************************************************************************
-**
-** Function L2CA_Register
-**
-** Description Other layers call this function to register for L2CAP
-** 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
-** 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()
-**
-*******************************************************************************/
+ *
+ * Function L2CA_Register
+ *
+ * Description Other layers call this function to register for L2CAP
+ * 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
+ * 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()
+ *
+ ******************************************************************************/
uint16_t L2CA_Register (uint16_t psm, tL2CAP_APPL_INFO *p_cb_info)
{
tL2C_RCB *p_rcb;
@@ -118,15 +118,15 @@
}
/*******************************************************************************
-**
-** Function L2CA_Deregister
-**
-** Description Other layers call this function to de-register for L2CAP
-** services.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function L2CA_Deregister
+ *
+ * Description Other layers call this function to de-register for L2CAP
+ * services.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void L2CA_Deregister (uint16_t psm)
{
tL2C_RCB *p_rcb;
@@ -166,15 +166,15 @@
}
/*******************************************************************************
-**
-** Function L2CA_AllocatePSM
-**
-** Description Other layers call this function to find an unused PSM for L2CAP
-** services.
-**
-** Returns PSM to use.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_AllocatePSM
+ *
+ * Description Other layers call this function to find an unused PSM for L2CAP
+ * services.
+ *
+ * Returns PSM to use.
+ *
+ ******************************************************************************/
uint16_t L2CA_AllocatePSM(void)
{
bool done = false;
@@ -208,38 +208,38 @@
}
/*******************************************************************************
-**
-** Function L2CA_ConnectReq
-**
-** Description Higher layers call this function to create an L2CAP connection.
-** Note that the connection is not established at this time, but
-** connection establishment gets started. The callback function
-** will be invoked when connection establishes or fails.
-**
-** Returns the CID of the connection, or 0 if it failed to start
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConnectReq
+ *
+ * Description Higher layers call this function to create an L2CAP connection.
+ * Note that the connection is not established at this time, but
+ * connection establishment gets started. The callback function
+ * will be invoked when connection establishes or fails.
+ *
+ * Returns the CID of the connection, or 0 if it failed to start
+ *
+ ******************************************************************************/
uint16_t L2CA_ConnectReq (uint16_t psm, BD_ADDR p_bd_addr)
{
return L2CA_ErtmConnectReq (psm, p_bd_addr, NULL);
}
/*******************************************************************************
-**
-** Function L2CA_ErtmConnectReq
-**
-** Description Higher layers call this function to create an L2CAP connection.
-** Note that the connection is not established at this time, but
-** connection establishment gets started. The callback function
-** will be invoked when connection establishes or fails.
-**
-** Parameters: PSM: L2CAP PSM for the connection
-** BD address of the peer
-** Enhaced retransmission mode configurations
+ *
+ * Function L2CA_ErtmConnectReq
+ *
+ * Description Higher layers call this function to create an L2CAP connection.
+ * Note that the connection is not established at this time, but
+ * connection establishment gets started. The callback function
+ * will be invoked when connection establishes or fails.
+ *
+ * Parameters: PSM: L2CAP PSM for the connection
+ * BD address of the peer
+ * Enhaced retransmission mode configurations
-** Returns the CID of the connection, or 0 if it failed to start
-**
-*******************************************************************************/
+ * Returns the CID of the connection, or 0 if it failed to start
+ *
+ ******************************************************************************/
uint16_t L2CA_ErtmConnectReq (uint16_t psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_ertm_info)
{
tL2C_LCB *p_lcb;
@@ -340,19 +340,19 @@
}
/*******************************************************************************
-**
-** Function L2CA_RegisterLECoc
-**
-** Description Other layers call this function to register for L2CAP
-** Connection Oriented Channel.
-**
-** Returns PSM to use or zero if error. Typically, the PSM returned
-** 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_ConnectLECocReq()
-** and L2CA_DeregisterLECoc()
-**
-*******************************************************************************/
+ *
+ * Function L2CA_RegisterLECoc
+ *
+ * Description Other layers call this function to register for L2CAP
+ * Connection Oriented Channel.
+ *
+ * Returns PSM to use or zero if error. Typically, the PSM returned
+ * 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_ConnectLECocReq()
+ * and L2CA_DeregisterLECoc()
+ *
+ ******************************************************************************/
uint16_t L2CA_RegisterLECoc(uint16_t psm, tL2CAP_APPL_INFO *p_cb_info)
{
L2CAP_TRACE_API("%s called for LE PSM: 0x%04x", __func__, psm);
@@ -413,15 +413,15 @@
}
/*******************************************************************************
-**
-** Function L2CA_DeregisterLECoc
-**
-** Description Other layers call this function to de-register for L2CAP
-** Connection Oriented Channel.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DeregisterLECoc
+ *
+ * Description Other layers call this function to de-register for L2CAP
+ * Connection Oriented Channel.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void L2CA_DeregisterLECoc(uint16_t psm)
{
L2CAP_TRACE_API("%s called for PSM: 0x%04x", __func__, psm);
@@ -456,21 +456,21 @@
}
/*******************************************************************************
-**
-** Function L2CA_ConnectLECocReq
-**
-** Description Higher layers call this function to create an L2CAP connection.
-** Note that the connection is not established at this time, but
-** connection establishment gets started. The callback function
-** will be invoked when connection establishes or fails.
-**
-** Parameters: PSM: L2CAP PSM for the connection
-** BD address of the peer
-** Local Coc configurations
+ *
+ * Function L2CA_ConnectLECocReq
+ *
+ * Description Higher layers call this function to create an L2CAP connection.
+ * Note that the connection is not established at this time, but
+ * connection establishment gets started. The callback function
+ * will be invoked when connection establishes or fails.
+ *
+ * Parameters: PSM: L2CAP PSM for the connection
+ * BD address of the peer
+ * Local Coc configurations
-** Returns the CID of the connection, or 0 if it failed to start
-**
-*******************************************************************************/
+ * Returns the CID of the connection, or 0 if it failed to start
+ *
+ ******************************************************************************/
uint16_t L2CA_ConnectLECocReq(uint16_t psm, BD_ADDR p_bd_addr, tL2CAP_LE_CFG_INFO *p_cfg)
{
L2CAP_TRACE_API("%s PSM: 0x%04x BDA: %02x:%02x:%02x:%02x:%02x:%02x", __func__, psm,
@@ -553,16 +553,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_ConnectLECocRsp
-**
-** Description Higher layers call this function to accept an incoming
-** L2CAP COC connection, for which they had gotten an connect
-** indication callback.
-**
-** Returns true for success, false for failure
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConnectLECocRsp
+ *
+ * Description Higher layers call this function to accept an incoming
+ * L2CAP COC connection, for which they had gotten an connect
+ * indication callback.
+ *
+ * Returns true for success, false for failure
+ *
+ ******************************************************************************/
bool L2CA_ConnectLECocRsp (BD_ADDR p_bd_addr, uint8_t id, uint16_t lcid, uint16_t result,
uint16_t status, tL2CAP_LE_CFG_INFO *p_cfg)
{
@@ -613,17 +613,17 @@
}
/*******************************************************************************
-**
-** Function L2CA_GetPeerLECocConfig
-**
-** Description Get a peers configuration for LE Connection Oriented Channel.
-**
-** Parameters: local channel id
-** Pointers to peers configuration storage area
-**
-** Return value: true if peer is connected
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetPeerLECocConfig
+ *
+ * Description Get a peers configuration for LE Connection Oriented Channel.
+ *
+ * Parameters: local channel id
+ * Pointers to peers configuration storage area
+ *
+ * Return value: true if peer is connected
+ *
+ ******************************************************************************/
bool L2CA_GetPeerLECocConfig (uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg)
{
L2CAP_TRACE_API ("%s CID: 0x%04x", __func__, lcid);
@@ -677,16 +677,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_ConnectRsp
-**
-** Description Higher layers call this function to accept an incoming
-** L2CAP connection, for which they had gotten an connect
-** indication callback.
-**
-** Returns true for success, false for failure
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConnectRsp
+ *
+ * Description Higher layers call this function to accept an incoming
+ * L2CAP connection, for which they had gotten an connect
+ * indication callback.
+ *
+ * Returns true for success, false for failure
+ *
+ ******************************************************************************/
bool L2CA_ConnectRsp (BD_ADDR p_bd_addr, uint8_t id, uint16_t lcid,
uint16_t result, uint16_t status)
{
@@ -694,16 +694,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_ErtmConnectRsp
-**
-** Description Higher layers call this function to accept an incoming
-** L2CAP connection, for which they had gotten an connect
-** indication callback.
-**
-** Returns true for success, false for failure
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ErtmConnectRsp
+ *
+ * Description Higher layers call this function to accept an incoming
+ * L2CAP connection, for which they had gotten an connect
+ * indication callback.
+ *
+ * Returns true for success, false for failure
+ *
+ ******************************************************************************/
bool L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, uint8_t id, uint16_t lcid, uint16_t result,
uint16_t status, tL2CAP_ERTM_INFO *p_ertm_info)
{
@@ -781,16 +781,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_ConfigReq
-**
-** Description Higher layers call this function to send configuration.
-**
-** Note: The FCR options of p_cfg are not used.
-**
-** Returns true if configuration sent, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConfigReq
+ *
+ * Description Higher layers call this function to send configuration.
+ *
+ * Note: The FCR options of p_cfg are not used.
+ *
+ * Returns true if configuration sent, else false
+ *
+ ******************************************************************************/
bool L2CA_ConfigReq (uint16_t cid, tL2CAP_CFG_INFO *p_cfg)
{
tL2C_CCB *p_ccb;
@@ -833,15 +833,15 @@
}
/*******************************************************************************
-**
-** Function L2CA_ConfigRsp
-**
-** Description Higher layers call this function to send a configuration
-** response.
-**
-** Returns true if configuration response sent, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConfigRsp
+ *
+ * Description Higher layers call this function to send a configuration
+ * response.
+ *
+ * Returns true if configuration response sent, else false
+ *
+ ******************************************************************************/
bool L2CA_ConfigRsp (uint16_t cid, tL2CAP_CFG_INFO *p_cfg)
{
tL2C_CCB *p_ccb;
@@ -878,14 +878,14 @@
}
/*******************************************************************************
-**
-** Function L2CA_DisconnectReq
-**
-** Description Higher layers call this function to disconnect a channel.
-**
-** Returns true if disconnect sent, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DisconnectReq
+ *
+ * Description Higher layers call this function to disconnect a channel.
+ *
+ * Returns true if disconnect sent, else false
+ *
+ ******************************************************************************/
bool L2CA_DisconnectReq (uint16_t cid)
{
tL2C_CCB *p_ccb;
@@ -906,15 +906,15 @@
}
/*******************************************************************************
-**
-** Function L2CA_DisconnectRsp
-**
-** Description Higher layers call this function to acknowledge the
-** disconnection of a channel.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DisconnectRsp
+ *
+ * Description Higher layers call this function to acknowledge the
+ * disconnection of a channel.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool L2CA_DisconnectRsp (uint16_t cid)
{
tL2C_CCB *p_ccb;
@@ -935,14 +935,14 @@
}
/*******************************************************************************
-**
-** Function L2CA_Ping
-**
-** Description Higher layers call this function to send an echo request.
-**
-** Returns true if echo request sent, else false.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_Ping
+ *
+ * Description Higher layers call this function to send an echo request.
+ *
+ * Returns true if echo request sent, else false.
+ *
+ ******************************************************************************/
bool L2CA_Ping (BD_ADDR p_bd_addr, tL2CA_ECHO_RSP_CB *p_callback)
{
tL2C_LCB *p_lcb;
@@ -1006,15 +1006,15 @@
}
/*******************************************************************************
-**
-** Function L2CA_Echo
-**
-** Description Higher layers call this function to send an echo request
-** with application-specific data.
-**
-** Returns true if echo request sent, else false.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_Echo
+ *
+ * Description Higher layers call this function to send an echo request
+ * with application-specific data.
+ *
+ * Returns true if echo request sent, else false.
+ *
+ ******************************************************************************/
bool L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_callback)
{
tL2C_LCB *p_lcb;
@@ -1075,24 +1075,24 @@
}
/*******************************************************************************
-**
-** Function L2CA_SetIdleTimeout
-**
-** Description Higher layers call this function to set the idle timeout for
-** a connection, or for all future connections. 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.
-**
-** Returns true if command succeeded, false if failed
-**
-** NOTE This timeout takes effect after at least 1 channel has been
-** established and removed. L2CAP maintains its own timer from
-** whan a connection is established till the first channel is
-** set up.
-*******************************************************************************/
+ *
+ * Function L2CA_SetIdleTimeout
+ *
+ * Description Higher layers call this function to set the idle timeout for
+ * a connection, or for all future connections. 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.
+ *
+ * Returns true if command succeeded, false if failed
+ *
+ * NOTE This timeout takes effect after at least 1 channel has been
+ * established and removed. L2CAP maintains its own timer from
+ * whan a connection is established till the first channel is
+ * set up.
+ ******************************************************************************/
bool L2CA_SetIdleTimeout (uint16_t cid, uint16_t timeout, bool is_global)
{
tL2C_CCB *p_ccb;
@@ -1124,24 +1124,24 @@
}
/*******************************************************************************
-**
-** 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
-** changed.
-**
-** Returns true if command succeeded, false if failed
-**
-** NOTE This timeout applies to all logical channels active on the
-** ACL link.
-*******************************************************************************/
+ *
+ * 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
+ * changed.
+ *
+ * Returns true if command succeeded, false if failed
+ *
+ * NOTE This timeout applies to all logical channels active on the
+ * ACL link.
+ ******************************************************************************/
bool L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, uint16_t timeout, tBT_TRANSPORT transport)
{
tL2C_LCB *p_lcb;
@@ -1180,15 +1180,15 @@
}
/*******************************************************************************
-**
-** Function L2CA_SetTraceLevel
-**
-** Description This function sets the trace level for L2CAP. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetTraceLevel
+ *
+ * Description This function sets the trace level for L2CAP. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
uint8_t L2CA_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
@@ -1198,21 +1198,21 @@
}
/*******************************************************************************
-**
-** Function L2CA_SetDesireRole
-**
-** Description This function sets the desire role for L2CAP.
-** If the new role is L2CAP_ROLE_ALLOW_SWITCH, allow switch on
-** HciCreateConnection.
-** If the new role is L2CAP_ROLE_DISALLOW_SWITCH, do not allow switch on
-** HciCreateConnection.
-**
-** If the new role is a valid role (HCI_ROLE_MASTER or HCI_ROLE_SLAVE),
-** the desire role is set to the new value. Otherwise, it is not changed.
-**
-** Returns the new (current) role
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetDesireRole
+ *
+ * Description This function sets the desire role for L2CAP.
+ * If the new role is L2CAP_ROLE_ALLOW_SWITCH, allow switch on
+ * HciCreateConnection.
+ * If the new role is L2CAP_ROLE_DISALLOW_SWITCH, do not allow switch on
+ * HciCreateConnection.
+ *
+ * If the new role is a valid role (HCI_ROLE_MASTER or HCI_ROLE_SLAVE),
+ * the desire role is set to the new value. Otherwise, it is not changed.
+ *
+ * Returns the new (current) role
+ *
+ ******************************************************************************/
uint8_t L2CA_SetDesireRole (uint8_t new_role)
{
L2CAP_TRACE_API ("L2CA_SetDesireRole() new:x%x, disallow_switch:%d",
@@ -1238,14 +1238,14 @@
}
/*******************************************************************************
-**
-** Function L2CA_LocalLoopbackReq
-**
-** Description This function sets up a CID for local loopback
-**
-** Returns CID of 0 if none.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_LocalLoopbackReq
+ *
+ * Description This function sets up a CID for local loopback
+ *
+ * Returns CID of 0 if none.
+ *
+ ******************************************************************************/
uint16_t L2CA_LocalLoopbackReq (uint16_t psm, uint16_t handle, BD_ADDR p_bd_addr)
{
tL2C_LCB *p_lcb;
@@ -1298,16 +1298,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_SetAclPriority
-**
-** Description Sets the transmission priority for a channel.
-** (For initial implementation only two values are valid.
-** L2CAP_PRIORITY_NORMAL and L2CAP_PRIORITY_HIGH).
-**
-** Returns true if a valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetAclPriority
+ *
+ * Description Sets the transmission priority for a channel.
+ * (For initial implementation only two values are valid.
+ * L2CAP_PRIORITY_NORMAL and L2CAP_PRIORITY_HIGH).
+ *
+ * Returns true if a valid channel, else false
+ *
+ ******************************************************************************/
bool L2CA_SetAclPriority (BD_ADDR bd_addr, uint8_t priority)
{
L2CAP_TRACE_API ("L2CA_SetAclPriority() bdaddr: %02x%02x%02x%02x%04x, priority:%d",
@@ -1318,16 +1318,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_FlowControl
-**
-** Description Higher layers call this function to flow control a channel.
-**
-** data_enabled - true data flows, false data is stopped
-**
-** Returns true if valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_FlowControl
+ *
+ * Description Higher layers call this function to flow control a channel.
+ *
+ * data_enabled - true data flows, false data is stopped
+ *
+ * Returns true if valid channel, else false
+ *
+ ******************************************************************************/
bool L2CA_FlowControl (uint16_t cid, bool data_enabled)
{
tL2C_CCB *p_ccb;
@@ -1365,14 +1365,14 @@
}
/*******************************************************************************
-**
-** Function L2CA_SendTestSFrame
-**
-** Description Higher layers call this function to send a test S-frame.
-**
-** Returns true if valid Channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SendTestSFrame
+ *
+ * Description Higher layers call this function to send a test S-frame.
+ *
+ * Returns true if valid Channel, else false
+ *
+ ******************************************************************************/
bool L2CA_SendTestSFrame (uint16_t cid, uint8_t sup_type, uint8_t back_track)
{
tL2C_CCB *p_ccb;
@@ -1398,14 +1398,14 @@
}
/*******************************************************************************
-**
-** Function L2CA_SetTxPriority
-**
-** Description Sets the transmission priority for a channel.
-**
-** Returns true if a valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetTxPriority
+ *
+ * Description Sets the transmission priority for a channel.
+ *
+ * Returns true if a valid channel, else false
+ *
+ ******************************************************************************/
bool L2CA_SetTxPriority (uint16_t cid, tL2CAP_CHNL_PRIORITY priority)
{
tL2C_CCB *p_ccb;
@@ -1427,14 +1427,14 @@
}
/*******************************************************************************
-**
-** Function L2CA_SetChnlDataRate
-**
-** Description Sets the tx/rx data rate for a channel.
-**
-** Returns true if a valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetChnlDataRate
+ *
+ * Description Sets the tx/rx data rate for a channel.
+ *
+ * Returns true if a valid channel, else false
+ *
+ ******************************************************************************/
bool L2CA_SetChnlDataRate (uint16_t cid, tL2CAP_CHNL_DATA_RATE tx, tL2CAP_CHNL_DATA_RATE rx)
{
tL2C_CCB *p_ccb;
@@ -1459,26 +1459,26 @@
}
/*******************************************************************************
-**
-** Function L2CA_SetFlushTimeout
-**
-** 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)
-** <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot).
-** Otherwise, return false.
-** 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
-** ACL link.
-*******************************************************************************/
+ *
+ * Function L2CA_SetFlushTimeout
+ *
+ * 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)
+ * <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot).
+ * Otherwise, return false.
+ * 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
+ * ACL link.
+ ******************************************************************************/
bool L2CA_SetFlushTimeout (BD_ADDR bd_addr, uint16_t flush_tout)
{
tL2C_LCB *p_lcb;
@@ -1571,17 +1571,17 @@
}
/*******************************************************************************
-**
-** Function L2CA_GetPeerFeatures
-**
-** Description Get a peers features and fixed channel map
-**
-** Parameters: BD address of the peer
-** Pointers to features and channel mask storage area
-**
-** Return value: true if peer is connected
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetPeerFeatures
+ *
+ * Description Get a peers features and fixed channel map
+ *
+ * Parameters: BD address of the peer
+ * Pointers to features and channel mask storage area
+ *
+ * Return value: true if peer is connected
+ *
+ ******************************************************************************/
bool L2CA_GetPeerFeatures (BD_ADDR bd_addr, uint32_t *p_ext_feat, uint8_t *p_chnl_mask)
{
tL2C_LCB *p_lcb;
@@ -1608,17 +1608,17 @@
}
/*******************************************************************************
-**
-** Function L2CA_GetBDAddrbyHandle
-**
-** Description Get BD address for the given HCI handle
-**
-** Parameters: HCI handle
-** BD address of the peer
-**
-** Return value: true if found lcb for the given handle, false otherwise
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetBDAddrbyHandle
+ *
+ * Description Get BD address for the given HCI handle
+ *
+ * Parameters: HCI handle
+ * BD address of the peer
+ *
+ * Return value: true if found lcb for the given handle, false otherwise
+ *
+ ******************************************************************************/
bool L2CA_GetBDAddrbyHandle (uint16_t handle, BD_ADDR bd_addr)
{
tL2C_LCB *p_lcb = NULL;
@@ -1635,16 +1635,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_GetChnlFcrMode
-**
-** Description Get the channel FCR mode
-**
-** Parameters: Local CID
-**
-** Return value: Channel mode
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetChnlFcrMode
+ *
+ * Description Get the channel FCR mode
+ *
+ * Parameters: Local CID
+ *
+ * Return value: Channel mode
+ *
+ ******************************************************************************/
uint8_t L2CA_GetChnlFcrMode (uint16_t lcid)
{
tL2C_CCB *p_ccb = l2cu_find_ccb_by_cid (NULL, lcid);
@@ -1661,17 +1661,17 @@
#if (L2CAP_NUM_FIXED_CHNLS > 0)
/*******************************************************************************
-**
-** Function L2CA_RegisterFixedChannel
-**
-** Description Register a fixed channel.
-**
-** Parameters: Fixed Channel #
-** Channel Callbacks and config
-**
-** Return value: -
-**
-*******************************************************************************/
+ *
+ * Function L2CA_RegisterFixedChannel
+ *
+ * Description Register a fixed channel.
+ *
+ * Parameters: Fixed Channel #
+ * Channel Callbacks and config
+ *
+ * Return value: -
+ *
+ ******************************************************************************/
bool L2CA_RegisterFixedChannel (uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG *p_freg)
{
if ( (fixed_cid < L2CAP_FIRST_FIXED_CHNL) || (fixed_cid > L2CAP_LAST_FIXED_CHNL) )
@@ -1686,17 +1686,17 @@
}
/*******************************************************************************
-**
-** Function L2CA_ConnectFixedChnl
-**
-** Description Connect an fixed signalling channel to a remote device.
-**
-** Parameters: Fixed CID
-** BD Address of remote
-**
-** Return value: true if connection started
-**
-*******************************************************************************/
+ *
+ * Function L2CA_ConnectFixedChnl
+ *
+ * Description Connect an fixed signalling channel to a remote device.
+ *
+ * Parameters: Fixed CID
+ * BD Address of remote
+ *
+ * Return value: true if connection started
+ *
+ ******************************************************************************/
bool L2CA_ConnectFixedChnl (uint16_t fixed_cid, BD_ADDR rem_bda)
{
tL2C_LCB *p_lcb;
@@ -1796,19 +1796,19 @@
}
/*******************************************************************************
-**
-** Function L2CA_SendFixedChnlData
-**
-** Description Write data on a fixed channel.
-**
-** Parameters: Fixed CID
-** BD Address of remote
-** Pointer to buffer of type BT_HDR
-**
-** Return value L2CAP_DW_SUCCESS, if data accepted
-** L2CAP_DW_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SendFixedChnlData
+ *
+ * Description Write data on a fixed channel.
+ *
+ * Parameters: Fixed CID
+ * BD Address of remote
+ * Pointer to buffer of type BT_HDR
+ *
+ * Return value L2CAP_DW_SUCCESS, if data accepted
+ * L2CAP_DW_FAILED, if error
+ *
+ ******************************************************************************/
uint16_t L2CA_SendFixedChnlData (uint16_t fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf)
{
tL2C_LCB *p_lcb;
@@ -1903,18 +1903,18 @@
}
/*******************************************************************************
-**
-** Function L2CA_RemoveFixedChnl
-**
-** Description Remove a fixed channel to a remote device.
-**
-** Parameters: Fixed CID
-** BD Address of remote
-** Idle timeout to use (or 0xFFFF if don't care)
-**
-** Return value: true if channel removed
-**
-*******************************************************************************/
+ *
+ * Function L2CA_RemoveFixedChnl
+ *
+ * Description Remove a fixed channel to a remote device.
+ *
+ * Parameters: Fixed CID
+ * BD Address of remote
+ * Idle timeout to use (or 0xFFFF if don't care)
+ *
+ * Return value: true if channel removed
+ *
+ ******************************************************************************/
bool L2CA_RemoveFixedChnl (uint16_t fixed_cid, BD_ADDR rem_bda)
{
tL2C_LCB *p_lcb;
@@ -1966,22 +1966,22 @@
}
/*******************************************************************************
-**
-** Function L2CA_SetFixedChannelTout
-**
-** 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
-** changed.
-**
-** Returns true if command succeeded, false if failed
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetFixedChannelTout
+ *
+ * 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
+ * changed.
+ *
+ * Returns true if command succeeded, false if failed
+ *
+ ******************************************************************************/
bool L2CA_SetFixedChannelTout (BD_ADDR rem_bda, uint16_t fixed_cid, uint16_t idle_tout)
{
tL2C_LCB *p_lcb;
@@ -2013,18 +2013,18 @@
#endif /* #if (L2CAP_NUM_FIXED_CHNLS > 0) */
/*******************************************************************************
-**
-** Function L2CA_GetCurrentConfig
-**
-** Description This function returns configurations of L2CAP channel
-** pp_our_cfg : pointer of our saved configuration options
-** p_our_cfg_bits : valid config in bitmap
-** pp_peer_cfg: pointer of peer's saved configuration options
-** p_peer_cfg_bits : valid config in bitmap
-**
-** Returns true if successful
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetCurrentConfig
+ *
+ * Description This function returns configurations of L2CAP channel
+ * pp_our_cfg : pointer of our saved configuration options
+ * p_our_cfg_bits : valid config in bitmap
+ * pp_peer_cfg: pointer of peer's saved configuration options
+ * p_peer_cfg_bits : valid config in bitmap
+ *
+ * Returns true if successful
+ *
+ ******************************************************************************/
bool L2CA_GetCurrentConfig (uint16_t 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)
@@ -2067,15 +2067,15 @@
}
/*******************************************************************************
-**
-** Function L2CA_GetConnectionConfig
-**
-** Description This function returns configurations of L2CAP channel
-** pp_l2c_ccb : pointer to this channels L2CAP ccb data.
-**
-** Returns true if successful
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetConnectionConfig
+ *
+ * Description This function returns configurations of L2CAP channel
+ * pp_l2c_ccb : pointer to this channels L2CAP ccb data.
+ *
+ * Returns true if successful
+ *
+ ******************************************************************************/
bool L2CA_GetConnectionConfig(uint16_t lcid, uint16_t *mtu, uint16_t *rcid, uint16_t *handle)
{
tL2C_CCB *p_ccb = l2cu_find_ccb_by_cid(NULL, lcid);;
@@ -2098,17 +2098,17 @@
}
/*******************************************************************************
-**
-** Function L2CA_RegForNoCPEvt
-**
-** Description Register callback for Number of Completed Packets event.
-**
-** Input Param p_cb - callback for Number of completed packets event
-** p_bda - BT address of remote device
-**
-** Returns true if registered OK, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_RegForNoCPEvt
+ *
+ * Description Register callback for Number of Completed Packets event.
+ *
+ * Input Param p_cb - callback for Number of completed packets event
+ * p_bda - BT address of remote device
+ *
+ * Returns true if registered OK, else false
+ *
+ ******************************************************************************/
bool L2CA_RegForNoCPEvt(tL2CA_NOCP_CB *p_cb, BD_ADDR p_bda)
{
tL2C_LCB *p_lcb;
@@ -2126,16 +2126,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_DataWrite
-**
-** Description Higher layers call this function to write data.
-**
-** Returns L2CAP_DW_SUCCESS, if data accepted, else false
-** L2CAP_DW_CONGESTED, if data accepted and the channel is congested
-** L2CAP_DW_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DataWrite
+ *
+ * Description Higher layers call this function to write data.
+ *
+ * Returns L2CAP_DW_SUCCESS, if data accepted, else false
+ * L2CAP_DW_CONGESTED, if data accepted and the channel is congested
+ * L2CAP_DW_FAILED, if error
+ *
+ ******************************************************************************/
uint8_t L2CA_DataWrite (uint16_t cid, BT_HDR *p_data)
{
L2CAP_TRACE_API ("L2CA_DataWrite() CID: 0x%04x Len: %d", cid, p_data->len);
@@ -2143,15 +2143,15 @@
}
/*******************************************************************************
-**
-** Function L2CA_SetChnlFlushability
-**
-** Description Higher layers call this function to set a channels
-** flushability flags
-**
-** Returns true if CID found, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_SetChnlFlushability
+ *
+ * Description Higher layers call this function to set a channels
+ * flushability flags
+ *
+ * Returns true if CID found, else false
+ *
+ ******************************************************************************/
bool L2CA_SetChnlFlushability (uint16_t cid, bool is_flushable)
{
#if (L2CAP_NON_FLUSHABLE_PB_INCLUDED == TRUE)
@@ -2176,20 +2176,20 @@
}
/*******************************************************************************
-**
-** Function L2CA_DataWriteEx
-**
-** Description Higher layers call this function to write data with extended
-** flags.
-** flags : L2CAP_FLUSHABLE_CH_BASED
-** L2CAP_FLUSHABLE_PKT
-** L2CAP_NON_FLUSHABLE_PKT
-**
-** Returns L2CAP_DW_SUCCESS, if data accepted, else false
-** L2CAP_DW_CONGESTED, if data accepted and the channel is congested
-** L2CAP_DW_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function L2CA_DataWriteEx
+ *
+ * Description Higher layers call this function to write data with extended
+ * flags.
+ * flags : L2CAP_FLUSHABLE_CH_BASED
+ * L2CAP_FLUSHABLE_PKT
+ * L2CAP_NON_FLUSHABLE_PKT
+ *
+ * Returns L2CAP_DW_SUCCESS, if data accepted, else false
+ * L2CAP_DW_CONGESTED, if data accepted and the channel is congested
+ * L2CAP_DW_FAILED, if error
+ *
+ ******************************************************************************/
uint8_t L2CA_DataWriteEx (uint16_t cid, BT_HDR *p_data, uint16_t flags)
{
L2CAP_TRACE_API ("L2CA_DataWriteEx() CID: 0x%04x Len: %d Flags:0x%04X",
@@ -2198,19 +2198,19 @@
}
/*******************************************************************************
-**
-** Function L2CA_FlushChannel
-**
-** Description This function flushes none, some or all buffers queued up
-** for xmission for a particular CID. If called with
-** L2CAP_FLUSH_CHANS_GET (0), it simply returns the number
-** of buffers queued for that CID L2CAP_FLUSH_CHANS_ALL (0xffff)
-** flushes all buffers. All other values specifies the maximum
-** buffers to flush.
-**
-** Returns Number of buffers left queued for that CID
-**
-*******************************************************************************/
+ *
+ * Function L2CA_FlushChannel
+ *
+ * Description This function flushes none, some or all buffers queued up
+ * for xmission for a particular CID. If called with
+ * L2CAP_FLUSH_CHANS_GET (0), it simply returns the number
+ * of buffers queued for that CID L2CAP_FLUSH_CHANS_ALL (0xffff)
+ * flushes all buffers. All other values specifies the maximum
+ * buffers to flush.
+ *
+ * Returns Number of buffers left queued for that CID
+ *
+ ******************************************************************************/
uint16_t L2CA_FlushChannel (uint16_t lcid, uint16_t num_to_flush)
{
tL2C_CCB *p_ccb;
diff --git a/stack/l2cap/l2c_ble.cc b/stack/l2cap/l2c_ble.cc
index b1f8d14..80a1a57 100644
--- a/stack/l2cap/l2c_ble.cc
+++ b/stack/l2cap/l2c_ble.cc
@@ -39,16 +39,16 @@
static void l2cble_start_conn_update (tL2C_LCB *p_lcb);
/*******************************************************************************
-**
-** Function L2CA_CancelBleConnectReq
-**
-** Description Cancel a pending connection attempt to a BLE device.
-**
-** Parameters: BD Address of remote
-**
-** Return value: true if connection was cancelled
-**
-*******************************************************************************/
+ *
+ * Function L2CA_CancelBleConnectReq
+ *
+ * Description Cancel a pending connection attempt to a BLE device.
+ *
+ * Parameters: BD Address of remote
+ *
+ * Return value: true if connection was cancelled
+ *
+ ******************************************************************************/
bool L2CA_CancelBleConnectReq (BD_ADDR rem_bda)
{
tL2C_LCB *p_lcb;
@@ -87,16 +87,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_UpdateBleConnParams
-**
-** Description Update BLE connection parameters.
-**
-** Parameters: BD Address of remote
-**
-** Return value: true if update started
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UpdateBleConnParams
+ *
+ * Description Update BLE connection parameters.
+ *
+ * Parameters: BD Address of remote
+ *
+ * Return value: true if update started
+ *
+ ******************************************************************************/
bool L2CA_UpdateBleConnParams (BD_ADDR rem_bda, uint16_t min_int, uint16_t max_int,
uint16_t latency, uint16_t timeout)
{
@@ -136,16 +136,16 @@
/*******************************************************************************
-**
-** Function L2CA_EnableUpdateBleConnParams
-**
-** Description Enable or disable update based on the request from the peer
-**
-** Parameters: BD Address of remote
-**
-** Return value: true if update started
-**
-*******************************************************************************/
+ *
+ * Function L2CA_EnableUpdateBleConnParams
+ *
+ * Description Enable or disable update based on the request from the peer
+ *
+ * Parameters: BD Address of remote
+ *
+ * Return value: true if update started
+ *
+ ******************************************************************************/
bool L2CA_EnableUpdateBleConnParams (BD_ADDR rem_bda, bool enable)
{
if (stack_config_get_interface()->get_pts_conn_updates_disabled())
@@ -188,14 +188,14 @@
/*******************************************************************************
-**
-** Function L2CA_GetBleConnRole
-**
-** Description This function returns the connection role.
-**
-** Returns link role.
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetBleConnRole
+ *
+ * Description This function returns the connection role.
+ *
+ * Returns link role.
+ *
+ ******************************************************************************/
uint8_t L2CA_GetBleConnRole (BD_ADDR bd_addr)
{
uint8_t role = HCI_ROLE_UNKNOWN;
@@ -209,14 +209,14 @@
return role;
}
/*******************************************************************************
-**
-** Function L2CA_GetDisconnectReason
-**
-** Description This function returns the disconnect reason code.
-**
-** Returns disconnect reason
-**
-*******************************************************************************/
+ *
+ * Function L2CA_GetDisconnectReason
+ *
+ * Description This function returns the disconnect reason code.
+ *
+ * Returns disconnect reason
+ *
+ ******************************************************************************/
uint16_t L2CA_GetDisconnectReason (BD_ADDR remote_bda, tBT_TRANSPORT transport)
{
tL2C_LCB *p_lcb;
@@ -232,14 +232,14 @@
}
/*******************************************************************************
-**
-** Function l2cble_notify_le_connection
-**
-** Description This function notifiy the l2cap connection to the app layer
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function l2cble_notify_le_connection
+ *
+ * Description This function notifiy the l2cap connection to the app layer
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void l2cble_notify_le_connection (BD_ADDR bda)
{
tL2C_LCB *p_lcb = l2cu_find_lcb_by_bd_addr (bda, BT_TRANSPORT_LE);
@@ -266,15 +266,15 @@
}
/*******************************************************************************
-**
-** Function l2cble_scanner_conn_comp
-**
-** Description This function is called when an HCI Connection Complete
-** event is received while we are a scanner (so we are master).
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_scanner_conn_comp
+ *
+ * Description This function is called when an HCI Connection Complete
+ * event is received while we are a scanner (so we are master).
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_scanner_conn_comp (uint16_t handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
uint16_t conn_interval, uint16_t conn_latency, uint16_t conn_timeout)
{
@@ -343,15 +343,15 @@
/*******************************************************************************
-**
-** Function l2cble_advertiser_conn_comp
-**
-** Description This function is called when an HCI Connection Complete
-** event is received while we are an advertiser (so we are slave).
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_advertiser_conn_comp
+ *
+ * Description This function is called when an HCI Connection Complete
+ * event is received while we are an advertiser (so we are slave).
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_advertiser_conn_comp (uint16_t handle, BD_ADDR bda, UNUSED_ATTR tBLE_ADDR_TYPE type,
UNUSED_ATTR uint16_t conn_interval, UNUSED_ATTR uint16_t conn_latency,
UNUSED_ATTR uint16_t conn_timeout)
@@ -421,15 +421,15 @@
}
/*******************************************************************************
-**
-** Function l2cble_conn_comp
-**
-** Description This function is called when an HCI Connection Complete
-** event is received.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_conn_comp
+ *
+ * Description This function is called when an HCI Connection Complete
+ * event is received.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_conn_comp(uint16_t handle, uint8_t role, BD_ADDR bda, tBLE_ADDR_TYPE type,
uint16_t conn_interval, uint16_t conn_latency, uint16_t conn_timeout)
{
@@ -446,16 +446,16 @@
}
/*******************************************************************************
-**
-** Function l2cble_start_conn_update
-**
-** Description start BLE connection parameter update process based on status
-**
-** Parameters: lcb : l2cap link control block
-**
-** Return value: none
-**
-*******************************************************************************/
+ *
+ * Function l2cble_start_conn_update
+ *
+ * Description start BLE connection parameter update process based on status
+ *
+ * Parameters: lcb : l2cap link control block
+ *
+ * Return value: none
+ *
+ ******************************************************************************/
static void l2cble_start_conn_update (tL2C_LCB *p_lcb)
{
uint16_t min_conn_int, max_conn_int, slave_latency, supervision_tout;
@@ -531,15 +531,15 @@
}
/*******************************************************************************
-**
-** Function l2cble_process_conn_update_evt
-**
-** Description This function enables the connection update request from remote
-** after a successful connection update response is received.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_process_conn_update_evt
+ *
+ * Description This function enables the connection update request from remote
+ * after a successful connection update response is received.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_process_conn_update_evt (uint16_t handle, uint8_t status,
uint16_t interval, uint16_t latency, uint16_t timeout)
{
@@ -566,15 +566,15 @@
}
/*******************************************************************************
-**
-** Function l2cble_process_sig_cmd
-**
-** Description This function is called when a signalling packet is received
-** on the BLE signalling CID
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_process_sig_cmd
+ *
+ * Description This function is called when a signalling packet is received
+ * on the BLE signalling CID
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, uint8_t *p, uint16_t pkt_len)
{
uint8_t *p_pkt_end;
@@ -835,14 +835,14 @@
}
/*******************************************************************************
-**
-** Function l2cble_init_direct_conn
-**
-** Description This function is to initate a direct connection
-**
-** Returns true connection initiated, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function l2cble_init_direct_conn
+ *
+ * Description This function is to initate a direct connection
+ *
+ * Returns true connection initiated, false otherwise.
+ *
+ ******************************************************************************/
bool l2cble_init_direct_conn (tL2C_LCB *p_lcb)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_or_alloc_dev (p_lcb->remote_bd_addr);
@@ -922,14 +922,14 @@
}
/*******************************************************************************
-**
-** Function l2cble_create_conn
-**
-** Description This function initiates an acl connection via HCI
-**
-** Returns true if successful, false if connection not started.
-**
-*******************************************************************************/
+ *
+ * Function l2cble_create_conn
+ *
+ * Description This function initiates an acl connection via HCI
+ *
+ * Returns true if successful, false if connection not started.
+ *
+ ******************************************************************************/
bool l2cble_create_conn (tL2C_LCB *p_lcb)
{
tBTM_BLE_CONN_ST conn_st = btm_ble_get_conn_st();
@@ -955,16 +955,16 @@
}
/*******************************************************************************
-**
-** Function l2c_link_processs_ble_num_bufs
-**
-** Description This function is called when a "controller buffer size"
-** event is first received from the controller. It updates
-** the L2CAP values.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_processs_ble_num_bufs
+ *
+ * Description This function is called when a "controller buffer size"
+ * event is first received from the controller. It updates
+ * the L2CAP values.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_processs_ble_num_bufs (uint16_t num_lm_ble_bufs)
{
if (num_lm_ble_bufs == 0)
@@ -977,20 +977,20 @@
}
/*******************************************************************************
-**
-** Function l2c_ble_link_adjust_allocation
-**
-** Description This function is called when a link is created or removed
-** to calculate the amount of packets each link may send to
-** the HCI without an ack coming back.
-**
-** Currently, this is a simple allocation, dividing the
-** number of Controller Packets by the number of links. In
-** the future, QOS configuration should be examined.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_ble_link_adjust_allocation
+ *
+ * Description This function is called when a link is created or removed
+ * to calculate the amount of packets each link may send to
+ * the HCI without an ack coming back.
+ *
+ * Currently, this is a simple allocation, dividing the
+ * number of Controller Packets by the number of links. In
+ * the future, QOS configuration should be examined.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_ble_link_adjust_allocation (void)
{
uint16_t qq, yy, qq_remainder;
@@ -1106,14 +1106,14 @@
#if (BLE_LLT_INCLUDED == TRUE)
/*******************************************************************************
-**
-** Function l2cble_process_rc_param_request_evt
-**
-** Description process LE Remote Connection Parameter Request Event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_process_rc_param_request_evt
+ *
+ * Description process LE Remote Connection Parameter Request Event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_process_rc_param_request_evt(uint16_t handle, uint16_t int_min, uint16_t int_max,
uint16_t latency, uint16_t timeout)
{
@@ -1147,14 +1147,14 @@
#endif
/*******************************************************************************
-**
-** Function l2cble_update_data_length
-**
-** Description This function update link tx data length if applicable
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_update_data_length
+ *
+ * Description This function update link tx data length if applicable
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_update_data_length(tL2C_LCB *p_lcb)
{
uint16_t tx_mtu = 0;
@@ -1186,14 +1186,14 @@
}
/*******************************************************************************
-**
-** Function l2cble_process_data_length_change_evt
-**
-** Description This function process the data length change event
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_process_data_length_change_evt
+ *
+ * Description This function process the data length change event
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_process_data_length_change_event(uint16_t handle, uint16_t tx_data_len, uint16_t rx_data_len)
{
tL2C_LCB *p_lcb = l2cu_find_lcb_by_handle(handle);
@@ -1209,14 +1209,14 @@
}
/*******************************************************************************
-**
-** Function l2cble_set_fixed_channel_tx_data_length
-**
-** Description This function update max fixed channel tx data length if applicable
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_set_fixed_channel_tx_data_length
+ *
+ * Description This function update max fixed channel tx data length if applicable
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_set_fixed_channel_tx_data_length(BD_ADDR remote_bda, uint16_t fix_cid, uint16_t tx_mtu)
{
tL2C_LCB *p_lcb = l2cu_find_lcb_by_bd_addr(remote_bda, BT_TRANSPORT_LE);
@@ -1246,15 +1246,15 @@
}
/*******************************************************************************
-**
-** Function l2cble_credit_based_conn_req
-**
-** Description This function sends LE Credit Based Connection Request for
-** LE connection oriented channels.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_credit_based_conn_req
+ *
+ * Description This function sends LE Credit Based Connection Request for
+ * LE connection oriented channels.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_credit_based_conn_req (tL2C_CCB *p_ccb)
{
if (!p_ccb)
@@ -1271,15 +1271,15 @@
}
/*******************************************************************************
-**
-** Function l2cble_credit_based_conn_res
-**
-** Description This function sends LE Credit Based Connection Response for
-** LE connection oriented channels.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_credit_based_conn_res
+ *
+ * Description This function sends LE Credit Based Connection Response for
+ * LE connection oriented channels.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_credit_based_conn_res (tL2C_CCB *p_ccb, uint16_t result)
{
if (!p_ccb)
@@ -1296,15 +1296,15 @@
}
/*******************************************************************************
-**
-** Function l2cble_send_flow_control_credit
-**
-** Description This function sends flow control credits for
-** LE connection oriented channels.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_send_flow_control_credit
+ *
+ * Description This function sends flow control credits for
+ * LE connection oriented channels.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_send_flow_control_credit(tL2C_CCB *p_ccb, uint16_t credit_value)
{
if (!p_ccb)
@@ -1322,15 +1322,15 @@
}
/*******************************************************************************
-**
-** Function l2cble_send_peer_disc_req
-**
-** Description This function sends disconnect request
-** to the peer LE device
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_send_peer_disc_req
+ *
+ * Description This function sends disconnect request
+ * to the peer LE device
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_send_peer_disc_req(tL2C_CCB *p_ccb)
{
L2CAP_TRACE_DEBUG ("%s",__func__);
@@ -1348,15 +1348,15 @@
}
/*******************************************************************************
-**
-** Function l2cble_sec_comp
-**
-** Description This function is called when security procedure for an LE COC
-** link is done
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cble_sec_comp
+ *
+ * Description This function is called when security procedure for an LE COC
+ * link is done
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cble_sec_comp(BD_ADDR p_bda, tBT_TRANSPORT transport, void *p_ref_data, uint8_t status)
{
tL2C_LCB *p_lcb = l2cu_find_lcb_by_bd_addr(p_bda, BT_TRANSPORT_LE);
@@ -1432,16 +1432,16 @@
}
/*******************************************************************************
-**
-** Function l2ble_sec_access_req
-**
-** Description This function is called by LE COC link to meet the
-** security requirement for the link
-**
-** Returns true - security procedures are started
-** false - failure
-**
-*******************************************************************************/
+ *
+ * Function l2ble_sec_access_req
+ *
+ * Description This function is called by LE COC link to meet the
+ * security requirement for the link
+ *
+ * Returns true - security procedures are started
+ * false - failure
+ *
+ ******************************************************************************/
bool l2ble_sec_access_req(BD_ADDR bd_addr, uint16_t psm, bool is_originator, tL2CAP_SEC_CBACK *p_callback, void *p_ref_data)
{
L2CAP_TRACE_DEBUG ("%s", __func__);
diff --git a/stack/l2cap/l2c_csm.cc b/stack/l2cap/l2c_csm.cc
index a769131..258326c 100644
--- a/stack/l2cap/l2c_csm.cc
+++ b/stack/l2cap/l2c_csm.cc
@@ -39,9 +39,9 @@
extern fixed_queue_t *btu_general_alarm_queue;
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void l2c_csm_closed (tL2C_CCB *p_ccb, uint16_t event, void *p_data);
static void l2c_csm_orig_w4_sec_comp (tL2C_CCB *p_ccb, uint16_t event, void *p_data);
static void l2c_csm_term_w4_sec_comp (tL2C_CCB *p_ccb, uint16_t event, void *p_data);
@@ -55,14 +55,14 @@
static const char *l2c_csm_get_event_name (uint16_t event);
/*******************************************************************************
-**
-** Function l2c_csm_execute
-**
-** Description This function executes the state machine.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_execute
+ *
+ * Description This function executes the state machine.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_csm_execute (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
if (!l2cu_is_ccb_active(p_ccb)) {
@@ -115,16 +115,16 @@
}
/*******************************************************************************
-**
-** Function l2c_csm_closed
-**
-** Description This function handles events when the channel is in
-** CLOSED state. This state exists only when the link is
-** being initially established.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_closed
+ *
+ * Description This function handles events when the channel is in
+ * CLOSED state. This state exists only when the link is
+ * being initially established.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_csm_closed (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
tL2C_CONN_INFO *p_ci = (tL2C_CONN_INFO *)p_data;
@@ -310,15 +310,15 @@
/*******************************************************************************
-**
-** Function l2c_csm_orig_w4_sec_comp
-**
-** Description This function handles events when the channel is in
-** CST_ORIG_W4_SEC_COMP state.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_orig_w4_sec_comp
+ *
+ * Description This function handles events when the channel is in
+ * CST_ORIG_W4_SEC_COMP state.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_csm_orig_w4_sec_comp (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
tL2CA_DISCONNECT_IND_CB *disconnect_ind = p_ccb->p_rcb->api.pL2CA_DisconnectInd_Cb;
@@ -424,15 +424,15 @@
/*******************************************************************************
-**
-** Function l2c_csm_term_w4_sec_comp
-**
-** Description This function handles events when the channel is in
-** CST_TERM_W4_SEC_COMP state.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_term_w4_sec_comp
+ *
+ * Description This function handles events when the channel is in
+ * CST_TERM_W4_SEC_COMP state.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_csm_term_w4_sec_comp (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x st: TERM_W4_SEC_COMP evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
@@ -541,15 +541,15 @@
/*******************************************************************************
-**
-** Function l2c_csm_w4_l2cap_connect_rsp
-**
-** Description This function handles events when the channel is in
-** CST_W4_L2CAP_CONNECT_RSP state.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_w4_l2cap_connect_rsp
+ *
+ * Description This function handles events when the channel is in
+ * CST_W4_L2CAP_CONNECT_RSP state.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_csm_w4_l2cap_connect_rsp (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
tL2C_CONN_INFO *p_ci = (tL2C_CONN_INFO *)p_data;
@@ -675,15 +675,15 @@
/*******************************************************************************
-**
-** Function l2c_csm_w4_l2ca_connect_rsp
-**
-** Description This function handles events when the channel is in
-** CST_W4_L2CA_CONNECT_RSP state.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_w4_l2ca_connect_rsp
+ *
+ * Description This function handles events when the channel is in
+ * CST_W4_L2CA_CONNECT_RSP state.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_csm_w4_l2ca_connect_rsp (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
tL2C_CONN_INFO *p_ci;
@@ -789,15 +789,15 @@
/*******************************************************************************
-**
-** Function l2c_csm_config
-**
-** Description This function handles events when the channel is in
-** CONFIG state.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_config
+ *
+ * Description This function handles events when the channel is in
+ * CONFIG state.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_csm_config (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
tL2CAP_CFG_INFO *p_cfg = (tL2CAP_CFG_INFO *)p_data;
@@ -1036,15 +1036,15 @@
/*******************************************************************************
-**
-** Function l2c_csm_open
-**
-** Description This function handles events when the channel is in
-** OPEN state.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_open
+ *
+ * Description This function handles events when the channel is in
+ * OPEN state.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_csm_open (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
uint16_t local_cid = p_ccb->local_cid;
@@ -1225,15 +1225,15 @@
/*******************************************************************************
-**
-** Function l2c_csm_w4_l2cap_disconnect_rsp
-**
-** Description This function handles events when the channel is in
-** CST_W4_L2CAP_DISCONNECT_RSP state.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_w4_l2cap_disconnect_rsp
+ *
+ * Description This function handles events when the channel is in
+ * CST_W4_L2CAP_DISCONNECT_RSP state.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_csm_w4_l2cap_disconnect_rsp (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
tL2CA_DISCONNECT_CFM_CB *disconnect_cfm = p_ccb->p_rcb->api.pL2CA_DisconnectCfm_Cb;
@@ -1286,15 +1286,15 @@
/*******************************************************************************
-**
-** Function l2c_csm_w4_l2ca_disconnect_rsp
-**
-** Description This function handles events when the channel is in
-** CST_W4_L2CA_DISCONNECT_RSP state.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_w4_l2ca_disconnect_rsp
+ *
+ * Description This function handles events when the channel is in
+ * CST_W4_L2CA_DISCONNECT_RSP state.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_csm_w4_l2ca_disconnect_rsp (tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
tL2CA_DISCONNECT_IND_CB *disconnect_ind = p_ccb->p_rcb->api.pL2CA_DisconnectInd_Cb;
@@ -1331,16 +1331,16 @@
}
/*******************************************************************************
-**
-** Function l2c_csm_get_event_name
-**
-** Description This function returns the event name.
-**
-** NOTE conditionally compiled to save memory.
-**
-** Returns pointer to the name
-**
-*******************************************************************************/
+ *
+ * Function l2c_csm_get_event_name
+ *
+ * Description This function returns the event name.
+ *
+ * NOTE conditionally compiled to save memory.
+ *
+ * Returns pointer to the name
+ *
+ ******************************************************************************/
static const char *l2c_csm_get_event_name (uint16_t event)
{
switch (event)
@@ -1425,15 +1425,15 @@
}
/*******************************************************************************
-**
-** Function l2c_enqueue_peer_data
-**
-** Description Enqueues data destined for the peer in the ccb. Handles
-** FCR segmentation and checks for congestion.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_enqueue_peer_data
+ *
+ * Description Enqueues data destined for the peer in the ccb. Handles
+ * FCR segmentation and checks for congestion.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_enqueue_peer_data (tL2C_CCB *p_ccb, BT_HDR *p_buf)
{
uint8_t *p;
diff --git a/stack/l2cap/l2c_fcr.cc b/stack/l2cap/l2c_fcr.cc
index f29ab2e..566454f 100644
--- a/stack/l2cap/l2c_fcr.cc
+++ b/stack/l2cap/l2c_fcr.cc
@@ -88,7 +88,7 @@
/*******************************************************************************
-** Static local functions
+ * Static local functions
*/
static bool process_reqseq (tL2C_CCB *p_ccb, uint16_t ctrl_word);
static void process_s_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, uint16_t ctrl_word);
@@ -103,14 +103,14 @@
#endif
/*******************************************************************************
-**
-** Function l2c_fcr_updcrc
-**
-** Description This function computes the CRC using the look-up table.
-**
-** Returns CRC
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_updcrc
+ *
+ * Description This function computes the CRC using the look-up table.
+ *
+ * Returns CRC
+ *
+ ******************************************************************************/
static unsigned short l2c_fcr_updcrc(unsigned short icrc, unsigned char *icp, int icnt)
{
unsigned short crc = icrc;
@@ -127,14 +127,14 @@
/*******************************************************************************
-**
-** Function l2c_fcr_tx_get_fcs
-**
-** Description This function computes the CRC for a frame to be TXed.
-**
-** Returns CRC
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_tx_get_fcs
+ *
+ * Description This function computes the CRC for a frame to be TXed.
+ *
+ * Returns CRC
+ *
+ ******************************************************************************/
static uint16_t l2c_fcr_tx_get_fcs (BT_HDR *p_buf)
{
uint8_t *p = ((uint8_t *) (p_buf + 1)) + p_buf->offset;
@@ -143,14 +143,14 @@
}
/*******************************************************************************
-**
-** Function l2c_fcr_rx_get_fcs
-**
-** Description This function computes the CRC for a received frame.
-**
-** Returns CRC
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_rx_get_fcs
+ *
+ * Description This function computes the CRC for a received frame.
+ *
+ * Returns CRC
+ *
+ ******************************************************************************/
static uint16_t l2c_fcr_rx_get_fcs (BT_HDR *p_buf)
{
uint8_t *p = ((uint8_t *) (p_buf + 1)) + p_buf->offset;
@@ -162,14 +162,14 @@
}
/*******************************************************************************
-**
-** Function l2c_fcr_start_timer
-**
-** Description This function starts the (monitor or retransmission) timer.
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_start_timer
+ *
+ * Description This function starts the (monitor or retransmission) timer.
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2c_fcr_start_timer (tL2C_CCB *p_ccb)
{
assert(p_ccb != NULL);
@@ -194,14 +194,14 @@
}
/*******************************************************************************
-**
-** Function l2c_fcr_stop_timer
-**
-** Description This function stops the (monitor or transmission) timer.
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_stop_timer
+ *
+ * Description This function stops the (monitor or transmission) timer.
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2c_fcr_stop_timer (tL2C_CCB *p_ccb)
{
assert(p_ccb != NULL);
@@ -209,14 +209,14 @@
}
/*******************************************************************************
-**
-** Function l2c_fcr_cleanup
-**
-** Description This function cleans up the variable used for flow-control/retrans.
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_cleanup
+ *
+ * Description This function cleans up the variable used for flow-control/retrans.
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2c_fcr_cleanup (tL2C_CCB *p_ccb)
{
assert(p_ccb != NULL);
@@ -313,15 +313,15 @@
}
/*******************************************************************************
-**
-** Function l2c_fcr_clone_buf
-**
-** Description This function allocates and copies requested part of a buffer
-** at a new-offset.
-**
-** Returns pointer to new buffer
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_clone_buf
+ *
+ * Description This function allocates and copies requested part of a buffer
+ * at a new-offset.
+ *
+ * Returns pointer to new buffer
+ *
+ ******************************************************************************/
BT_HDR *l2c_fcr_clone_buf(BT_HDR *p_buf, uint16_t new_offset, uint16_t no_of_bytes)
{
assert(p_buf != NULL);
@@ -349,14 +349,14 @@
}
/*******************************************************************************
-**
-** Function l2c_fcr_is_flow_controlled
-**
-** Description This function checks if the CCB is flow controlled by peer.
-**
-** Returns The control word
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_is_flow_controlled
+ *
+ * Description This function checks if the CCB is flow controlled by peer.
+ *
+ * Returns The control word
+ *
+ ******************************************************************************/
bool l2c_fcr_is_flow_controlled (tL2C_CCB *p_ccb)
{
assert(p_ccb != NULL);
@@ -382,16 +382,16 @@
}
/*******************************************************************************
-**
-** Function prepare_I_frame
-**
-** Description This function sets the FCR variables in an I-frame that is
-** about to be sent to HCI for transmission. This may be the
-** first time the I-frame is sent, or a retransmission
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function prepare_I_frame
+ *
+ * Description This function sets the FCR variables in an I-frame that is
+ * about to be sent to HCI for transmission. This may be the
+ * first time the I-frame is sent, or a retransmission
+ *
+ * Returns -
+ *
+ ******************************************************************************/
static void prepare_I_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, bool is_retransmission)
{
assert(p_ccb != NULL);
@@ -486,14 +486,14 @@
}
/*******************************************************************************
-**
-** Function l2c_fcr_send_S_frame
-**
-** Description This function formats and sends an S-frame for transmission.
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_send_S_frame
+ *
+ * Description This function formats and sends an S-frame for transmission.
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2c_fcr_send_S_frame (tL2C_CCB *p_ccb, uint16_t function_code, uint16_t pf_bit)
{
assert(p_ccb != NULL);
@@ -577,15 +577,15 @@
/*******************************************************************************
-**
-** Function l2c_fcr_proc_pdu
-**
-** Description This function is the entry point for processing of a
-** received PDU when in flow control and/or retransmission modes.
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_proc_pdu
+ *
+ * Description This function is the entry point for processing of a
+ * received PDU when in flow control and/or retransmission modes.
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
{
assert(p_ccb != NULL);
@@ -803,15 +803,15 @@
}
/*******************************************************************************
-**
-** Function l2c_lcc_proc_pdu
-**
-** Description This function is the entry point for processing of a
-** received PDU when in LE Coc flow control modes.
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2c_lcc_proc_pdu
+ *
+ * Description This function is the entry point for processing of a
+ * received PDU when in LE Coc flow control modes.
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2c_lcc_proc_pdu(tL2C_CCB *p_ccb, BT_HDR *p_buf)
{
@@ -885,14 +885,14 @@
}
/*******************************************************************************
-**
-** Function l2c_fcr_proc_tout
-**
-** Description Handle a timeout. We should be in error recovery state.
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_proc_tout
+ *
+ * Description Handle a timeout. We should be in error recovery state.
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2c_fcr_proc_tout (tL2C_CCB *p_ccb)
{
assert(p_ccb != NULL);
@@ -924,14 +924,14 @@
/*******************************************************************************
-**
-** Function l2c_fcr_proc_ack_tout
-**
-** Description Send RR/RNR if we have not acked I frame
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_proc_ack_tout
+ *
+ * Description Send RR/RNR if we have not acked I frame
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2c_fcr_proc_ack_tout (tL2C_CCB *p_ccb)
{
assert(p_ccb != NULL);
@@ -953,14 +953,14 @@
/*******************************************************************************
-**
-** Function process_reqseq
-**
-** Description Handle receive sequence number
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function process_reqseq
+ *
+ * Description Handle receive sequence number
+ *
+ * Returns -
+ *
+ ******************************************************************************/
static bool process_reqseq (tL2C_CCB *p_ccb, uint16_t ctrl_word)
{
assert(p_ccb != NULL);
@@ -1046,14 +1046,14 @@
/*******************************************************************************
-**
-** Function process_s_frame
-**
-** Description Process an S frame
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function process_s_frame
+ *
+ * Description Process an S frame
+ *
+ * Returns -
+ *
+ ******************************************************************************/
static void process_s_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, uint16_t ctrl_word)
{
assert(p_ccb != NULL);
@@ -1132,14 +1132,14 @@
/*******************************************************************************
-**
-** Function process_i_frame
-**
-** Description Process an I frame
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function process_i_frame
+ *
+ * Description Process an I frame
+ *
+ * Returns -
+ *
+ ******************************************************************************/
static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, uint16_t ctrl_word, bool delay_ack)
{
assert(p_ccb != NULL);
@@ -1321,14 +1321,14 @@
/*******************************************************************************
-**
-** Function process_stream_frame
-**
-** Description This function processes frames in streaming mode
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function process_stream_frame
+ *
+ * Description This function processes frames in streaming mode
+ *
+ * Returns -
+ *
+ ******************************************************************************/
static void process_stream_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf)
{
assert(p_ccb != NULL);
@@ -1403,14 +1403,14 @@
/*******************************************************************************
-**
-** Function do_sar_reassembly
-**
-** Description Process SAR bits and re-assemble frame
-**
-** Returns true if all OK, else false
-**
-*******************************************************************************/
+ *
+ * Function do_sar_reassembly
+ *
+ * Description Process SAR bits and re-assemble frame
+ *
+ * Returns true if all OK, else false
+ *
+ ******************************************************************************/
static bool do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, uint16_t ctrl_word)
{
assert(p_ccb != NULL);
@@ -1526,14 +1526,14 @@
/*******************************************************************************
-**
-** Function retransmit_i_frames
-**
-** Description This function retransmits i-frames awaiting acks.
-**
-** Returns bool - true if retransmitted
-**
-*******************************************************************************/
+ *
+ * Function retransmit_i_frames
+ *
+ * Description This function retransmits i-frames awaiting acks.
+ *
+ * Returns bool - true if retransmitted
+ *
+ ******************************************************************************/
static bool retransmit_i_frames (tL2C_CCB *p_ccb, uint8_t tx_seq)
{
assert(p_ccb != NULL);
@@ -1647,14 +1647,14 @@
/*******************************************************************************
-**
-** Function l2c_fcr_get_next_xmit_sdu_seg
-**
-** Description Get the next SDU segment to transmit.
-**
-** Returns pointer to buffer with segment or NULL
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_get_next_xmit_sdu_seg
+ *
+ * Description Get the next SDU segment to transmit.
+ *
+ * Returns pointer to buffer with segment or NULL
+ *
+ ******************************************************************************/
BT_HDR *l2c_fcr_get_next_xmit_sdu_seg (tL2C_CCB *p_ccb, uint16_t max_packet_length)
{
assert(p_ccb != NULL);
@@ -1826,14 +1826,14 @@
}
/*******************************************************************************
-**
-** Function l2c_lcc_get_next_xmit_sdu_seg
-**
-** Description Get the next SDU segment to transmit for LE connection oriented channel
-**
-** Returns pointer to buffer with segment or NULL
-**
-*******************************************************************************/
+ *
+ * Function l2c_lcc_get_next_xmit_sdu_seg
+ *
+ * Description Get the next SDU segment to transmit for LE connection oriented channel
+ *
+ * Returns pointer to buffer with segment or NULL
+ *
+ ******************************************************************************/
BT_HDR *l2c_lcc_get_next_xmit_sdu_seg (tL2C_CCB *p_ccb, uint16_t max_packet_length)
{
bool first_seg = false; /* The segment is the first part of data */
@@ -1925,25 +1925,25 @@
}
/*******************************************************************************
-** Configuration negotiation functions
-**
-** The following functions are used in negotiating channel modes during
-** configuration
-********************************************************************************/
+ * Configuration negotiation functions
+ *
+ * The following functions are used in negotiating channel modes during
+ * configuration
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function l2c_fcr_chk_chan_modes
-**
-** Description Validates and adjusts if necessary, the FCR options
-** based on remote EXT features.
-**
-** Note: This assumes peer EXT Features have been received.
-** Basic mode is used if FCR Options have not been received
-**
-** Returns uint8_t - nonzero if can continue, '0' if no compatible channels
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_chk_chan_modes
+ *
+ * Description Validates and adjusts if necessary, the FCR options
+ * based on remote EXT features.
+ *
+ * Note: This assumes peer EXT Features have been received.
+ * Basic mode is used if FCR Options have not been received
+ *
+ * Returns uint8_t - nonzero if can continue, '0' if no compatible channels
+ *
+ ******************************************************************************/
uint8_t l2c_fcr_chk_chan_modes (tL2C_CCB *p_ccb)
{
assert(p_ccb != NULL);
@@ -1965,15 +1965,15 @@
}
/*******************************************************************************
-**
-** Function l2c_fcr_adj_our_req_options
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_adj_our_req_options
+ *
+ * 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
+ *
+ ******************************************************************************/
bool l2c_fcr_adj_our_req_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
assert(p_ccb != NULL);
@@ -2085,14 +2085,14 @@
/*******************************************************************************
-**
-** Function l2c_fcr_adj_monitor_retran_timeout
-**
-** Description Overrides monitor/retrans timer value based on controller
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_adj_monitor_retran_timeout
+ *
+ * Description Overrides monitor/retrans timer value based on controller
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void l2c_fcr_adj_monitor_retran_timeout (tL2C_CCB *p_ccb)
{
assert(p_ccb != NULL);
@@ -2122,16 +2122,16 @@
}
}
/*******************************************************************************
-**
-** Function l2c_fcr_adj_our_rsp_options
-**
-** 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.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_adj_our_rsp_options
+ *
+ * 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.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void l2c_fcr_adj_our_rsp_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
assert(p_ccb != NULL);
@@ -2163,17 +2163,17 @@
}
/*******************************************************************************
-**
-** 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
-** to resend using another supported optional channel.
-**
-** Returns true if resent configuration, False if channel matches or
-** cannot match.
-**
-*******************************************************************************/
+ *
+ * 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
+ * to resend using another supported optional channel.
+ *
+ * Returns true if resent configuration, False if channel matches or
+ * cannot match.
+ *
+ ******************************************************************************/
bool l2c_fcr_renegotiate_chan(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
assert(p_ccb != NULL);
@@ -2274,16 +2274,16 @@
/*******************************************************************************
-**
-** Function l2c_fcr_process_peer_cfg_req
-**
-** Description This function is called to process the FCR options passed
-** in the peer's configuration request.
-**
-** Returns uint8_t - L2CAP_PEER_CFG_OK, L2CAP_PEER_CFG_UNACCEPTABLE,
-** or L2CAP_PEER_CFG_DISCONNECT.
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_process_peer_cfg_req
+ *
+ * Description This function is called to process the FCR options passed
+ * in the peer's configuration request.
+ *
+ * Returns uint8_t - L2CAP_PEER_CFG_OK, L2CAP_PEER_CFG_UNACCEPTABLE,
+ * or L2CAP_PEER_CFG_DISCONNECT.
+ *
+ ******************************************************************************/
uint8_t l2c_fcr_process_peer_cfg_req(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
assert(p_ccb != NULL);
@@ -2406,17 +2406,17 @@
#if (L2CAP_ERTM_STATS == TRUE)
/*******************************************************************************
-**
-** Function l2c_fcr_collect_ack_delay
-**
-** Description collect throughput, delay, queue size of waiting ack
-**
-** Parameters
-** tL2C_CCB
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_fcr_collect_ack_delay
+ *
+ * Description collect throughput, delay, queue size of waiting ack
+ *
+ * Parameters
+ * tL2C_CCB
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_fcr_collect_ack_delay (tL2C_CCB *p_ccb, uint8_t num_bufs_acked)
{
uint32_t index;
diff --git a/stack/l2cap/l2c_int.h b/stack/l2cap/l2c_int.h
index bbc07c5..f3d263e 100644
--- a/stack/l2cap/l2c_int.h
+++ b/stack/l2cap/l2c_int.h
@@ -69,8 +69,8 @@
#define L2CAP_FCR_ACK_TIMEOUT_MS 200 /* 200 milliseconds */
/* Define the possible L2CAP channel states. The names of
-** the states may seem a bit strange, but they are taken from
-** the Bluetooth specification.
+ * the states may seem a bit strange, but they are taken from
+ * the Bluetooth specification.
*/
typedef enum
{
@@ -100,8 +100,8 @@
/* Define input events to the L2CAP link and channel state machines. The names
-** of the events may seem a bit strange, but they are taken from
-** the Bluetooth specification.
+ * of the events may seem a bit strange, but they are taken from
+ * the Bluetooth specification.
*/
#define L2CEVT_LP_CONNECT_CFM 0 /* Lower layer connect confirm */
#define L2CEVT_LP_CONNECT_CFM_NEG 1 /* Lower layer connect confirm (failed) */
@@ -223,7 +223,7 @@
/* Define a registration control block. Every application (e.g. RFCOMM, SDP,
-** TCS etc) that registers with L2CAP is assigned one of these.
+ * TCS etc) that registers with L2CAP is assigned one of these.
*/
#if (L2CAP_UCD_INCLUDED == TRUE)
#define L2C_UCD_RCB_ID 0x00
@@ -270,9 +270,9 @@
}tL2CAP_SEC_DATA;
/* Define a channel control block (CCB). There may be many channel control blocks
-** between the same two Bluetooth devices (i.e. on the same link).
-** Each CCB has unique local and remote CIDs. All channel control blocks on
-** the same physical link and are chained together.
+ * between the same two Bluetooth devices (i.e. on the same link).
+ * Each CCB has unique local and remote CIDs. All channel control blocks on
+ * the same physical link and are chained together.
*/
typedef struct t_l2c_ccb
{
@@ -345,7 +345,7 @@
} tL2C_CCB;
/***********************************************************************
-** Define a queue of linked CCBs.
+ * Define a queue of linked CCBs.
*/
typedef struct
{
@@ -376,7 +376,7 @@
#endif /* (L2CAP_ROUND_ROBIN_CHANNEL_SERVICE == TRUE) */
/* Define a link control block. There is one link control block between
-** this device and any other device (i.e. BD ADDR).
+ * this device and any other device (i.e. BD ADDR).
*/
typedef struct t_l2c_linkcb
{
@@ -521,8 +521,8 @@
/* Define a structure that contains the information about a connection.
-** This structure is used to pass between functions, and not all the
-** fields will always be filled in.
+ * This structure is used to pass between functions, and not all the
+ * fields will always be filled in.
*/
typedef struct
{
@@ -551,13 +551,13 @@
#endif
/* L2CAP global data
-************************************
+ ***********************************
*/
extern tL2C_CB l2cb;
/* Functions provided by l2c_main.cc
-************************************
+ ***********************************
*/
void l2c_init(void);
void l2c_free(void);
@@ -571,7 +571,7 @@
extern void l2c_process_held_packets (bool timed_out);
/* Functions provided by l2c_utils.cc
-************************************
+ ***********************************
*/
extern tL2C_LCB *l2cu_allocate_lcb (BD_ADDR p_bd_addr, bool is_bonding, tBT_TRANSPORT transport);
extern bool l2cu_start_post_bond_timer (uint16_t handle);
@@ -630,7 +630,7 @@
extern bool l2cu_is_ccb_active (tL2C_CCB *p_ccb);
/* Functions provided by l2c_ucd.cc
-************************************
+ ***********************************
*/
#if (L2CAP_UCD_INCLUDED == TRUE)
void l2c_ucd_delete_sec_pending_q(tL2C_LCB *p_lcb);
@@ -647,7 +647,7 @@
#endif
/* Functions provided for Broadcom Aware
-****************************************
+ ***************************************
*/
extern bool l2cu_check_feature_req (tL2C_LCB *p_lcb, uint8_t id, uint8_t *p_data, uint16_t data_len);
extern void l2cu_check_feature_rsp (tL2C_LCB *p_lcb, uint8_t id, uint8_t *p_data, uint16_t data_len);
@@ -676,7 +676,7 @@
extern void l2cu_adjust_out_mps (tL2C_CCB *p_ccb);
/* Functions provided by l2c_link.cc
-************************************
+ ***********************************
*/
extern bool l2c_link_hci_conn_req (BD_ADDR bd_addr);
extern bool l2c_link_hci_conn_comp (uint8_t status, uint16_t handle, BD_ADDR p_bda);
@@ -711,7 +711,7 @@
#endif
/* Functions provided by l2c_csm.cc
-************************************
+ ***********************************
*/
extern void l2c_csm_execute (tL2C_CCB *p_ccb, uint16_t event, void *p_data);
@@ -719,7 +719,7 @@
/* Functions provided by l2c_fcr.cc
-************************************
+ ***********************************
*/
extern void l2c_fcr_cleanup (tL2C_CCB *p_ccb);
extern void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf);
@@ -743,7 +743,7 @@
extern void l2c_fcr_stop_timer (tL2C_CCB *p_ccb);
/* Functions provided by l2c_ble.cc
-************************************
+ ***********************************
*/
extern bool l2cble_create_conn (tL2C_LCB *p_lcb);
extern void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, uint8_t *p, uint16_t pkt_len);
diff --git a/stack/l2cap/l2c_link.cc b/stack/l2cap/l2c_link.cc
index 618b166..657c145 100644
--- a/stack/l2cap/l2c_link.cc
+++ b/stack/l2cap/l2c_link.cc
@@ -49,15 +49,15 @@
static bool l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf);
/*******************************************************************************
-**
-** Function l2c_link_hci_conn_req
-**
-** Description This function is called when an HCI Connection Request
-** event is received.
-**
-** Returns true, if accept conn
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_hci_conn_req
+ *
+ * Description This function is called when an HCI Connection Request
+ * event is received.
+ *
+ * Returns true, if accept conn
+ *
+ ******************************************************************************/
bool l2c_link_hci_conn_req (BD_ADDR bd_addr)
{
tL2C_LCB *p_lcb;
@@ -147,15 +147,15 @@
}
/*******************************************************************************
-**
-** Function l2c_link_hci_conn_comp
-**
-** Description This function is called when an HCI Connection Complete
-** event is received.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_hci_conn_comp
+ *
+ * Description This function is called when an HCI Connection Complete
+ * event is received.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool l2c_link_hci_conn_comp (uint8_t status, uint16_t handle, BD_ADDR p_bda)
{
tL2C_CONN_INFO ci;
@@ -290,15 +290,15 @@
/*******************************************************************************
-**
-** Function l2c_link_sec_comp
-**
-** Description This function is called when required security procedures
-** are completed.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_sec_comp
+ *
+ * Description This function is called when required security procedures
+ * are completed.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_sec_comp (BD_ADDR p_bda,
UNUSED_ATTR tBT_TRANSPORT transport, void *p_ref_data,
uint8_t status)
@@ -359,15 +359,15 @@
/*******************************************************************************
-**
-** Function l2c_link_hci_disc_comp
-**
-** Description This function is called when an HCI Disconnect Complete
-** event is received.
-**
-** Returns true if the link is known about, else false
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_hci_disc_comp
+ *
+ * Description This function is called when an HCI Disconnect Complete
+ * event is received.
+ *
+ * Returns true if the link is known about, else false
+ *
+ ******************************************************************************/
bool l2c_link_hci_disc_comp (uint16_t handle, uint8_t reason)
{
tL2C_LCB *p_lcb;
@@ -501,15 +501,15 @@
/*******************************************************************************
-**
-** Function l2c_link_hci_qos_violation
-**
-** Description This function is called when an HCI QOS Violation
-** event is received.
-**
-** Returns true if the link is known about, else false
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_hci_qos_violation
+ *
+ * Description This function is called when an HCI QOS Violation
+ * event is received.
+ *
+ * Returns true if the link is known about, else false
+ *
+ ******************************************************************************/
bool l2c_link_hci_qos_violation (uint16_t handle)
{
tL2C_LCB *p_lcb;
@@ -535,14 +535,14 @@
/*******************************************************************************
-**
-** Function l2c_link_timeout
-**
-** Description This function is called when a link timer expires
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_timeout
+ *
+ * Description This function is called when a link timer expires
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_timeout (tL2C_LCB *p_lcb)
{
tL2C_CCB *p_ccb;
@@ -663,14 +663,14 @@
}
/*******************************************************************************
-**
-** Function l2c_info_resp_timer_timeout
-**
-** Description This function is called when an info request times out
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_info_resp_timer_timeout
+ *
+ * Description This function is called when an info request times out
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_info_resp_timer_timeout(void *data)
{
tL2C_LCB *p_lcb = (tL2C_LCB *)data;
@@ -715,20 +715,20 @@
}
/*******************************************************************************
-**
-** Function l2c_link_adjust_allocation
-**
-** Description This function is called when a link is created or removed
-** to calculate the amount of packets each link may send to
-** the HCI without an ack coming back.
-**
-** Currently, this is a simple allocation, dividing the
-** number of Controller Packets by the number of links. In
-** the future, QOS configuration should be examined.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_adjust_allocation
+ *
+ * Description This function is called when a link is created or removed
+ * to calculate the amount of packets each link may send to
+ * the HCI without an ack coming back.
+ *
+ * Currently, this is a simple allocation, dividing the
+ * number of Controller Packets by the number of links. In
+ * the future, QOS configuration should be examined.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_adjust_allocation (void)
{
uint16_t qq, yy, qq_remainder;
@@ -843,19 +843,19 @@
}
/*******************************************************************************
-**
-** Function l2c_link_adjust_chnl_allocation
-**
-** Description This function is called to calculate the amount of packets each
-** non-F&EC channel may have outstanding.
-**
-** Currently, this is a simple allocation, dividing the number
-** of packets allocated to the link by the number of channels. In
-** the future, QOS configuration should be examined.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_adjust_chnl_allocation
+ *
+ * Description This function is called to calculate the amount of packets each
+ * non-F&EC channel may have outstanding.
+ *
+ * Currently, this is a simple allocation, dividing the number
+ * of packets allocated to the link by the number of channels. In
+ * the future, QOS configuration should be examined.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_adjust_chnl_allocation (void)
{
uint8_t xx;
@@ -883,16 +883,16 @@
}
/*******************************************************************************
-**
-** Function l2c_link_processs_num_bufs
-**
-** Description This function is called when a "controller buffer size"
-** event is first received from the controller. It updates
-** the L2CAP values.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_processs_num_bufs
+ *
+ * Description This function is called when a "controller buffer size"
+ * event is first received from the controller. It updates
+ * the L2CAP values.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_processs_num_bufs (uint16_t num_lm_acl_bufs)
{
l2cb.num_lm_acl_bufs = l2cb.controller_xmit_window = num_lm_acl_bufs;
@@ -900,17 +900,17 @@
}
/*******************************************************************************
-**
-** Function l2c_link_pkts_rcvd
-**
-** Description This function is called from the HCI transport when it is time
-** tto send a "Host ready for packets" command. This is only when
-** host to controller flow control is used. If fills in the arrays
-** of numbers of packets and handles.
-**
-** Returns count of number of entries filled in
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_pkts_rcvd
+ *
+ * Description This function is called from the HCI transport when it is time
+ * tto send a "Host ready for packets" command. This is only when
+ * host to controller flow control is used. If fills in the arrays
+ * of numbers of packets and handles.
+ *
+ * Returns count of number of entries filled in
+ *
+ ******************************************************************************/
uint8_t l2c_link_pkts_rcvd (UNUSED_ATTR uint16_t *num_pkts,
UNUSED_ATTR uint16_t *handles)
{
@@ -920,15 +920,15 @@
}
/*******************************************************************************
-**
-** Function l2c_link_role_changed
-**
-** Description This function is called whan a link's master/slave role change
-** event is received. It simply updates the link control block.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_role_changed
+ *
+ * Description This function is called whan a link's master/slave role change
+ * event is received. It simply updates the link control block.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_role_changed (BD_ADDR bd_addr, uint8_t new_role, uint8_t hci_status)
{
tL2C_LCB *p_lcb;
@@ -960,18 +960,18 @@
}
/*******************************************************************************
-**
-** Function l2c_pin_code_request
-**
-** Description This function is called whan a pin-code request is received
-** on a connection. If there are no channels active yet on the
-** link, it extends the link first connection timer. Make sure
-** that inactivity timer is not extended if PIN code happens
-** to be after last ccb released.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_pin_code_request
+ *
+ * Description This function is called whan a pin-code request is received
+ * on a connection. If there are no channels active yet on the
+ * link, it extends the link first connection timer. Make sure
+ * that inactivity timer is not extended if PIN code happens
+ * to be after last ccb released.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_pin_code_request (BD_ADDR bd_addr)
{
tL2C_LCB *p_lcb = l2cu_find_lcb_by_bd_addr (bd_addr, BT_TRANSPORT_BR_EDR);
@@ -987,15 +987,15 @@
#if (L2CAP_WAKE_PARKED_LINK == TRUE)
/*******************************************************************************
-**
-** Function l2c_link_check_power_mode
-**
-** Description This function is called to check power mode.
-**
-** Returns true if link is going to be active from park
-** false if nothing to send or not in park mode
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_check_power_mode
+ *
+ * Description This function is called to check power mode.
+ *
+ * Returns true if link is going to be active from park
+ * false if nothing to send or not in park mode
+ *
+ ******************************************************************************/
bool l2c_link_check_power_mode (tL2C_LCB *p_lcb)
{
tBTM_PM_MODE mode;
@@ -1038,16 +1038,16 @@
#endif /* L2CAP_WAKE_PARKED_LINK == TRUE) */
/*******************************************************************************
-**
-** Function l2c_link_check_send_pkts
-**
-** Description This function is called to check if it can send packets
-** to the Host Controller. It may be passed the address of
-** a packet to send.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_check_send_pkts
+ *
+ * Description This function is called to check if it can send packets
+ * to the Host Controller. It may be passed the address of
+ * a packet to send.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf)
{
int xx;
@@ -1200,14 +1200,14 @@
}
/*******************************************************************************
-**
-** Function l2c_link_send_to_lower
-**
-** Description This function queues the buffer for HCI transmission
-**
-** Returns true for success, false for fail
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_send_to_lower
+ *
+ * Description This function queues the buffer for HCI transmission
+ *
+ * Returns true for success, false for fail
+ *
+ ******************************************************************************/
static bool l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf)
{
uint16_t num_segs;
@@ -1326,16 +1326,16 @@
}
/*******************************************************************************
-**
-** Function l2c_link_process_num_completed_pkts
-**
-** Description This function is called when a "number-of-completed-packets"
-** event is received from the controller. It updates all the
-** LCB transmit counts.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_process_num_completed_pkts
+ *
+ * Description This function is called when a "number-of-completed-packets"
+ * event is received from the controller. It updates all the
+ * LCB transmit counts.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_process_num_completed_pkts (uint8_t *p)
{
uint8_t num_handles, xx;
@@ -1451,15 +1451,15 @@
}
/*******************************************************************************
-**
-** Function l2c_link_segments_xmitted
-**
-** Description This function is called from the HCI Interface when an ACL
-** data packet segment is transmitted.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_link_segments_xmitted
+ *
+ * Description This function is called from the HCI Interface when an ACL
+ * data packet segment is transmitted.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_link_segments_xmitted (BT_HDR *p_msg)
{
uint8_t *p = (uint8_t *)(p_msg + 1) + p_msg->offset;
diff --git a/stack/l2cap/l2c_main.cc b/stack/l2cap/l2c_main.cc
index 9f7a6ca..7413a13 100644
--- a/stack/l2cap/l2c_main.cc
+++ b/stack/l2cap/l2c_main.cc
@@ -43,26 +43,26 @@
extern fixed_queue_t *btu_general_alarm_queue;
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void process_l2cap_cmd (tL2C_LCB *p_lcb, uint8_t *p, uint16_t pkt_len);
-/********************************************************************************/
+/******************************************************************************/
/* G L O B A L L 2 C A P D A T A */
-/********************************************************************************/
+/******************************************************************************/
tL2C_CB l2cb;
/*******************************************************************************
-**
-** Function l2c_rcv_acl_data
-**
-** Description This function is called from the HCI Interface when an ACL
-** data packet is received.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_rcv_acl_data
+ *
+ * Description This function is called from the HCI Interface when an ACL
+ * data packet is received.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_rcv_acl_data (BT_HDR *p_msg)
{
uint8_t *p = (uint8_t *)(p_msg + 1) + p_msg->offset;
@@ -256,15 +256,15 @@
}
/*******************************************************************************
-**
-** Function process_l2cap_cmd
-**
-** Description This function is called when a packet is received on the
-** L2CAP signalling CID
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function process_l2cap_cmd
+ *
+ * Description This function is called when a packet is received on the
+ * L2CAP signalling CID
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void process_l2cap_cmd (tL2C_LCB *p_lcb, uint8_t *p, uint16_t pkt_len)
{
uint8_t *p_pkt_end, *p_next_cmd, *p_cfg_end, *p_cfg_start;
@@ -750,16 +750,16 @@
}
/*******************************************************************************
-**
-** 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
-** badly behaved controllers.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * 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
+ * badly behaved controllers.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_process_held_packets(bool timed_out) {
if (list_is_empty(l2cb.rcv_pending_q))
return;
@@ -791,15 +791,15 @@
}
/*******************************************************************************
-**
-** Function l2c_init
-**
-** Description This function is called once at startup to initialize
-** all the L2CAP structures
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_init
+ *
+ * Description This function is called once at startup to initialize
+ * all the L2CAP structures
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2c_init (void)
{
int16_t xx;
@@ -889,16 +889,16 @@
}
/*******************************************************************************
-**
-** Function l2c_data_write
-**
-** Description API functions call this function to write data.
-**
-** Returns L2CAP_DW_SUCCESS, if data accepted, else false
-** L2CAP_DW_CONGESTED, if data accepted and the channel is congested
-** L2CAP_DW_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function l2c_data_write
+ *
+ * Description API functions call this function to write data.
+ *
+ * Returns L2CAP_DW_SUCCESS, if data accepted, else false
+ * L2CAP_DW_CONGESTED, if data accepted and the channel is congested
+ * L2CAP_DW_FAILED, if error
+ *
+ ******************************************************************************/
uint8_t l2c_data_write (uint16_t cid, BT_HDR *p_data, uint16_t flags)
{
tL2C_CCB *p_ccb;
diff --git a/stack/l2cap/l2c_ucd.cc b/stack/l2cap/l2c_ucd.cc
index 8d85be0..575a010 100644
--- a/stack/l2cap/l2c_ucd.cc
+++ b/stack/l2cap/l2c_ucd.cc
@@ -43,14 +43,14 @@
static bool l2c_ucd_connect ( BD_ADDR rem_bda );
/*******************************************************************************
-**
-** Function l2c_ucd_discover_cback
-**
-** Description UCD Discover callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_discover_cback
+ *
+ * Description UCD Discover callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_ucd_discover_cback (BD_ADDR rem_bda, uint8_t info_type, uint32_t data)
{
tL2C_RCB *p_rcb = &l2cb.rcb_pool[0];
@@ -82,14 +82,14 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_data_ind_cback
-**
-** Description UCD Data callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_data_ind_cback
+ *
+ * Description UCD Data callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_ucd_data_ind_cback (BD_ADDR rem_bda, BT_HDR *p_buf)
{
uint8_t *p;
@@ -117,14 +117,14 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_congestion_status_cback
-**
-** Description UCD Congestion Status callback
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_congestion_status_cback
+ *
+ * Description UCD Congestion Status callback
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_ucd_congestion_status_cback (BD_ADDR rem_bda, bool is_congested)
{
tL2C_RCB *p_rcb = &l2cb.rcb_pool[0];
@@ -151,58 +151,58 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_disconnect_ind_cback
-**
-** Description UCD disconnect callback (This prevent to access null pointer)
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_disconnect_ind_cback
+ *
+ * Description UCD disconnect callback (This prevent to access null pointer)
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_ucd_disconnect_ind_cback (uint16_t cid, bool result)
{
/* do nothing */
}
/*******************************************************************************
-**
-** Function l2c_ucd_config_ind_cback
-**
-** Description UCD config callback (This prevent to access null pointer)
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_config_ind_cback
+ *
+ * Description UCD config callback (This prevent to access null pointer)
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_ucd_config_ind_cback (uint16_t cid, tL2CAP_CFG_INFO *p_cfg)
{
/* do nothing */
}
/*******************************************************************************
-**
-** Function l2c_ucd_config_cfm_cback
-**
-** Description UCD config callback (This prevent to access null pointer)
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_config_cfm_cback
+ *
+ * Description UCD config callback (This prevent to access null pointer)
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void l2c_ucd_config_cfm_cback (uint16_t cid, tL2CAP_CFG_INFO *p_cfg)
{
/* do nothing */
}
/*******************************************************************************
-**
-** Function L2CA_UcdRegister
-**
-** Description Register PSM on UCD.
-**
-** Parameters: tL2CAP_UCD_CB_INFO
-**
-** Return value: true if successs
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdRegister
+ *
+ * Description Register PSM on UCD.
+ *
+ * Parameters: tL2CAP_UCD_CB_INFO
+ *
+ * Return value: true if successs
+ *
+ ******************************************************************************/
bool L2CA_UcdRegister ( uint16_t psm, tL2CAP_UCD_CB_INFO *p_cb_info )
{
tL2C_RCB *p_rcb;
@@ -259,16 +259,16 @@
}
/*******************************************************************************
-**
-** Function L2CA_UcdDeregister
-**
-** Description Deregister PSM on UCD.
-**
-** Parameters: PSM
-**
-** Return value: true if successs
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdDeregister
+ *
+ * Description Deregister PSM on UCD.
+ *
+ * Parameters: PSM
+ *
+ * Return value: true if successs
+ *
+ ******************************************************************************/
bool L2CA_UcdDeregister ( uint16_t psm )
{
tL2C_CCB *p_ccb;
@@ -318,20 +318,20 @@
}
/*******************************************************************************
-**
-** Function L2CA_UcdDiscover
-**
-** Description Discover UCD of remote device.
-**
-** Parameters: PSM
-** BD_ADDR of remote device
-** info_type : L2CAP_UCD_INFO_TYPE_RECEPTION
-** L2CAP_UCD_INFO_TYPE_MTU
-**
-**
-** Return value: true if successs
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdDiscover
+ *
+ * Description Discover UCD of remote device.
+ *
+ * Parameters: PSM
+ * BD_ADDR of remote device
+ * info_type : L2CAP_UCD_INFO_TYPE_RECEPTION
+ * L2CAP_UCD_INFO_TYPE_MTU
+ *
+ *
+ * Return value: true if successs
+ *
+ ******************************************************************************/
bool L2CA_UcdDiscover ( uint16_t psm, BD_ADDR rem_bda, uint8_t info_type )
{
tL2C_LCB *p_lcb;
@@ -382,22 +382,22 @@
}
/*******************************************************************************
-**
-** Function L2CA_UcdDataWrite
-**
-** Description Send UCD to remote device
-**
-** Parameters: PSM
-** BD Address of remote
-** Pointer to buffer of type BT_HDR
-** flags : L2CAP_FLUSHABLE_CH_BASED
-** L2CAP_FLUSHABLE_PKT
-** L2CAP_NON_FLUSHABLE_PKT
-**
-** Return value L2CAP_DW_SUCCESS, if data accepted
-** L2CAP_DW_FAILED, if error
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdDataWrite
+ *
+ * Description Send UCD to remote device
+ *
+ * Parameters: PSM
+ * BD Address of remote
+ * Pointer to buffer of type BT_HDR
+ * flags : L2CAP_FLUSHABLE_CH_BASED
+ * L2CAP_FLUSHABLE_PKT
+ * L2CAP_NON_FLUSHABLE_PKT
+ *
+ * Return value L2CAP_DW_SUCCESS, if data accepted
+ * L2CAP_DW_FAILED, if error
+ *
+ ******************************************************************************/
uint16_t L2CA_UcdDataWrite (uint16_t psm, BD_ADDR rem_bda, BT_HDR *p_buf, uint16_t flags)
{
tL2C_LCB *p_lcb;
@@ -478,17 +478,17 @@
}
/*******************************************************************************
-**
-** Function L2CA_UcdSetIdleTimeout
-**
-** Description Set UCD Idle timeout.
-**
-** Parameters: BD Addr
-** Timeout in second
-**
-** Return value: true if successs
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UcdSetIdleTimeout
+ *
+ * Description Set UCD Idle timeout.
+ *
+ * Parameters: BD Addr
+ * Timeout in second
+ *
+ * Return value: true if successs
+ *
+ ******************************************************************************/
bool L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, uint16_t timeout )
{
tL2C_LCB *p_lcb;
@@ -514,14 +514,14 @@
}
/*******************************************************************************
-**
-** Function L2CA_UCDSetTxPriority
-**
-** Description Sets the transmission priority for a connectionless channel.
-**
-** Returns true if a valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function L2CA_UCDSetTxPriority
+ *
+ * Description Sets the transmission priority for a connectionless channel.
+ *
+ * Returns true if a valid channel, else false
+ *
+ ******************************************************************************/
bool L2CA_UCDSetTxPriority ( BD_ADDR rem_bda, tL2CAP_CHNL_PRIORITY priority )
{
tL2C_LCB *p_lcb;
@@ -553,16 +553,16 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_connect
-**
-** Description Connect UCD to remote device.
-**
-** Parameters: BD_ADDR of remote device
-**
-** Return value: true if successs
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_connect
+ *
+ * Description Connect UCD to remote device.
+ *
+ * Parameters: BD_ADDR of remote device
+ *
+ * Return value: true if successs
+ *
+ ******************************************************************************/
static bool l2c_ucd_connect ( BD_ADDR rem_bda )
{
tL2C_LCB *p_lcb;
@@ -645,14 +645,14 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_delete_sec_pending_q
-**
-** Description discard all of UCD packets in security pending queue
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_delete_sec_pending_q
+ *
+ * Description discard all of UCD packets in security pending queue
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void l2c_ucd_delete_sec_pending_q(tL2C_LCB *p_lcb)
{
/* clean up any security pending UCD */
@@ -668,14 +668,14 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_check_pending_info_req
-**
-** Description check if any application is waiting for UCD information
-**
-** Return true if any pending UCD info request
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_check_pending_info_req
+ *
+ * Description check if any application is waiting for UCD information
+ *
+ * Return true if any pending UCD info request
+ *
+ ******************************************************************************/
bool l2c_ucd_check_pending_info_req(tL2C_CCB *p_ccb)
{
tL2C_RCB *p_rcb = &l2cb.rcb_pool[0];
@@ -745,15 +745,15 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_enqueue_pending_out_sec_q
-**
-** Description enqueue outgoing UCD packet into security pending queue
-** and check congestion
-**
-** Return None
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_enqueue_pending_out_sec_q
+ *
+ * Description enqueue outgoing UCD packet into security pending queue
+ * and check congestion
+ *
+ * Return None
+ *
+ ******************************************************************************/
void l2c_ucd_enqueue_pending_out_sec_q(tL2C_CCB *p_ccb, void *p_data)
{
fixed_queue_enqueue(p_ccb->p_lcb->ucd_out_sec_pending_q, p_data);
@@ -761,14 +761,14 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_check_pending_out_sec_q
-**
-** Description check outgoing security
-**
-** Return true if any UCD packet for security
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_check_pending_out_sec_q
+ *
+ * Description check outgoing security
+ *
+ * Return true if any UCD packet for security
+ *
+ ******************************************************************************/
bool l2c_ucd_check_pending_out_sec_q(tL2C_CCB *p_ccb)
{
BT_HDR *p_buf = (BT_HDR*)fixed_queue_try_peek_first(p_ccb->p_lcb->ucd_out_sec_pending_q);
@@ -790,15 +790,15 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_send_pending_out_sec_q
-**
-** Description dequeue UCD packet from security pending queue and
-** enqueue it into CCB
-**
-** Return None
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_send_pending_out_sec_q
+ *
+ * Description dequeue UCD packet from security pending queue and
+ * enqueue it into CCB
+ *
+ * Return None
+ *
+ ******************************************************************************/
void l2c_ucd_send_pending_out_sec_q(tL2C_CCB *p_ccb)
{
BT_HDR *p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_ccb->p_lcb->ucd_out_sec_pending_q);
@@ -811,15 +811,15 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_discard_pending_out_sec_q
-**
-** Description dequeue UCD packet from security pending queue and
-** discard it.
-**
-** Return None
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_discard_pending_out_sec_q
+ *
+ * Description dequeue UCD packet from security pending queue and
+ * discard it.
+ *
+ * Return None
+ *
+ ******************************************************************************/
void l2c_ucd_discard_pending_out_sec_q(tL2C_CCB *p_ccb)
{
BT_HDR *p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_ccb->p_lcb->ucd_out_sec_pending_q);
@@ -829,14 +829,14 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_check_pending_in_sec_q
-**
-** Description check incoming security
-**
-** Return true if any UCD packet for security
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_check_pending_in_sec_q
+ *
+ * Description check incoming security
+ *
+ * Return true if any UCD packet for security
+ *
+ ******************************************************************************/
bool l2c_ucd_check_pending_in_sec_q(tL2C_CCB *p_ccb)
{
BT_HDR *p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_ccb->p_lcb->ucd_in_sec_pending_q);
@@ -857,15 +857,15 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_send_pending_in_sec_q
-**
-** Description dequeue UCD packet from security pending queue and
-** send it to application
-**
-** Return None
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_send_pending_in_sec_q
+ *
+ * Description dequeue UCD packet from security pending queue and
+ * send it to application
+ *
+ * Return None
+ *
+ ******************************************************************************/
void l2c_ucd_send_pending_in_sec_q(tL2C_CCB *p_ccb)
{
BT_HDR *p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_ccb->p_lcb->ucd_in_sec_pending_q)
@@ -877,15 +877,15 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_discard_pending_in_sec_q
-**
-** Description dequeue UCD packet from security pending queue and
-** discard it.
-**
-** Return None
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_discard_pending_in_sec_q
+ *
+ * Description dequeue UCD packet from security pending queue and
+ * discard it.
+ *
+ * Return None
+ *
+ ******************************************************************************/
void l2c_ucd_discard_pending_in_sec_q(tL2C_CCB *p_ccb)
{
BT_HDR *p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_ccb->p_lcb->ucd_in_sec_pending_q);
@@ -893,15 +893,15 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_check_rx_pkts
-**
-** Description Check if UCD reception is registered.
-** Process received UCD packet if application is expecting.
-**
-** Return true if UCD reception is registered
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_check_rx_pkts
+ *
+ * Description Check if UCD reception is registered.
+ * Process received UCD packet if application is expecting.
+ *
+ * Return true if UCD reception is registered
+ *
+ ******************************************************************************/
bool l2c_ucd_check_rx_pkts(tL2C_LCB *p_lcb, BT_HDR *p_msg)
{
tL2C_CCB *p_ccb;
@@ -946,16 +946,16 @@
}
/*******************************************************************************
-**
-** Function l2c_ucd_process_event
-**
-** Description This is called from main state machine when LCID is connectionless
-** Process the event if it is for UCD.
-**
-** Return true if the event is consumed by UCD
-** false if the event needs to be processed by main state machine
-**
-*******************************************************************************/
+ *
+ * Function l2c_ucd_process_event
+ *
+ * Description This is called from main state machine when LCID is connectionless
+ * Process the event if it is for UCD.
+ *
+ * Return true if the event is consumed by UCD
+ * false if the event needs to be processed by main state machine
+ *
+ ******************************************************************************/
bool l2c_ucd_process_event(tL2C_CCB *p_ccb, uint16_t event, void *p_data)
{
/* if the event is not processed by this function, this variable will be set to false */
diff --git a/stack/l2cap/l2c_utils.cc b/stack/l2cap/l2c_utils.cc
index bbd6c49..d0f0ced 100644
--- a/stack/l2cap/l2c_utils.cc
+++ b/stack/l2cap/l2c_utils.cc
@@ -43,14 +43,14 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*******************************************************************************
-**
-** Function l2cu_allocate_lcb
-**
-** Description Look for an unused LCB
-**
-** Returns LCB address or NULL if none found
-**
-*******************************************************************************/
+ *
+ * Function l2cu_allocate_lcb
+ *
+ * Description Look for an unused LCB
+ *
+ * Returns LCB address or NULL if none found
+ *
+ ******************************************************************************/
tL2C_LCB *l2cu_allocate_lcb (BD_ADDR p_bd_addr, bool is_bonding, tBT_TRANSPORT transport)
{
int xx;
@@ -103,15 +103,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_update_lcb_4_bonding
-**
-** Description Mark the lcb for bonding. Used when bonding takes place on
-** an existing ACL connection. (Pre-Lisbon devices)
-**
-** Returns Nothing
-**
-*******************************************************************************/
+ *
+ * Function l2cu_update_lcb_4_bonding
+ *
+ * Description Mark the lcb for bonding. Used when bonding takes place on
+ * an existing ACL connection. (Pre-Lisbon devices)
+ *
+ * Returns Nothing
+ *
+ ******************************************************************************/
void l2cu_update_lcb_4_bonding (BD_ADDR p_bd_addr, bool is_bonding)
{
tL2C_LCB *p_lcb = l2cu_find_lcb_by_bd_addr (p_bd_addr, BT_TRANSPORT_BR_EDR);
@@ -126,15 +126,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_release_lcb
-**
-** Description Release an LCB. All timers will be stopped and freed,
-** channels dropped, buffers returned etc.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_release_lcb
+ *
+ * Description Release an LCB. All timers will be stopped and freed,
+ * channels dropped, buffers returned etc.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_release_lcb (tL2C_LCB *p_lcb)
{
tL2C_CCB *p_ccb;
@@ -257,15 +257,15 @@
/*******************************************************************************
-**
-** Function l2cu_find_lcb_by_bd_addr
-**
-** Description Look through all active LCBs for a match based on the
-** remote BD address.
-**
-** Returns pointer to matched LCB, or NULL if no match
-**
-*******************************************************************************/
+ *
+ * Function l2cu_find_lcb_by_bd_addr
+ *
+ * Description Look through all active LCBs for a match based on the
+ * remote BD address.
+ *
+ * Returns pointer to matched LCB, or NULL if no match
+ *
+ ******************************************************************************/
tL2C_LCB *l2cu_find_lcb_by_bd_addr (BD_ADDR p_bd_addr, tBT_TRANSPORT transport)
{
int xx;
@@ -286,34 +286,34 @@
}
/*******************************************************************************
-**
-** Function l2cu_get_conn_role
-**
-** Description Determine the desired role (master or slave) of a link.
-** If already got a slave link, this one must be a master. If
-** already got at least 1 link where we are the master, make this
-** also a master.
-**
-** Returns HCI_ROLE_MASTER or HCI_ROLE_SLAVE
-**
-*******************************************************************************/
+ *
+ * Function l2cu_get_conn_role
+ *
+ * Description Determine the desired role (master or slave) of a link.
+ * If already got a slave link, this one must be a master. If
+ * already got at least 1 link where we are the master, make this
+ * also a master.
+ *
+ * Returns HCI_ROLE_MASTER or HCI_ROLE_SLAVE
+ *
+ ******************************************************************************/
uint8_t l2cu_get_conn_role (tL2C_LCB *p_this_lcb)
{
return l2cb.desire_role;
}
/*******************************************************************************
-**
-** Function l2c_is_cmd_rejected
-**
-** Description Checks if cmd_code is command or response
-** If a command it will be rejected per spec.
-** This function is used when a illegal packet length is detected
-**
-** Returns bool - true if cmd_code is a command and it is rejected,
-** false if response code. (command not rejected)
-**
-*******************************************************************************/
+ *
+ * Function l2c_is_cmd_rejected
+ *
+ * Description Checks if cmd_code is command or response
+ * If a command it will be rejected per spec.
+ * This function is used when a illegal packet length is detected
+ *
+ * Returns bool - true if cmd_code is a command and it is rejected,
+ * false if response code. (command not rejected)
+ *
+ ******************************************************************************/
bool l2c_is_cmd_rejected (uint8_t cmd_code, uint8_t id, tL2C_LCB *p_lcb)
{
switch(cmd_code)
@@ -336,14 +336,14 @@
}
/*******************************************************************************
-**
-** Function l2cu_build_header
-**
-** Description Builds the L2CAP command packet header
-**
-** Returns Pointer to allocated packet or NULL if no resources
-**
-*******************************************************************************/
+ *
+ * Function l2cu_build_header
+ *
+ * Description Builds the L2CAP command packet header
+ *
+ * Returns Pointer to allocated packet or NULL if no resources
+ *
+ ******************************************************************************/
BT_HDR *l2cu_build_header (tL2C_LCB *p_lcb, uint16_t len, uint8_t cmd, uint8_t id)
{
BT_HDR *p_buf = (BT_HDR *)osi_malloc(L2CAP_CMD_BUF_SIZE);
@@ -389,15 +389,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_adj_id
-**
-** Description Checks for valid ID based on specified mask
-** and adjusts the id if invalid.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_adj_id
+ *
+ * Description Checks for valid ID based on specified mask
+ * and adjusts the id if invalid.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_adj_id (tL2C_LCB *p_lcb, uint8_t adj_mask)
{
if ((adj_mask & L2CAP_ADJ_ZERO_ID) && !p_lcb->id)
@@ -407,15 +407,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_cmd_reject
-**
-** Description Build and send an L2CAP "command reject" message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_cmd_reject
+ *
+ * Description Build and send an L2CAP "command reject" message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_cmd_reject (tL2C_LCB *p_lcb, uint16_t reason, uint8_t rem_id,
uint16_t p1, uint16_t p2)
{
@@ -454,15 +454,15 @@
/*******************************************************************************
-**
-** Function l2cu_send_peer_connect_req
-**
-** Description Build and send an L2CAP "connection request" message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_connect_req
+ *
+ * Description Build and send an L2CAP "connection request" message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_connect_req (tL2C_CCB *p_ccb)
{
BT_HDR *p_buf;
@@ -493,15 +493,15 @@
/*******************************************************************************
-**
-** Function l2cu_send_peer_connect_rsp
-**
-** Description Build and send an L2CAP "connection response" message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_connect_rsp
+ *
+ * Description Build and send an L2CAP "connection response" message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_connect_rsp (tL2C_CCB *p_ccb, uint16_t result, uint16_t status)
{
BT_HDR *p_buf;
@@ -536,16 +536,16 @@
/*******************************************************************************
-**
-** Function l2cu_reject_connection
-**
-** Description Build and send an L2CAP "connection response neg" message
-** to the peer. This function is called when there is no peer
-** CCB (non-existant PSM or no resources).
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_reject_connection
+ *
+ * Description Build and send an L2CAP "connection response neg" message
+ * to the peer. This function is called when there is no peer
+ * CCB (non-existant PSM or no resources).
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_reject_connection (tL2C_LCB *p_lcb, uint16_t remote_cid, uint8_t rem_id, uint16_t result)
{
BT_HDR *p_buf;
@@ -569,15 +569,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_config_req
-**
-** Description Build and send an L2CAP "configuration request" message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_config_req
+ *
+ * Description Build and send an L2CAP "configuration request" message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_config_req (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
BT_HDR *p_buf;
@@ -676,15 +676,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_config_rsp
-**
-** Description Build and send an L2CAP "configuration response" message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_config_rsp
+ *
+ * Description Build and send an L2CAP "configuration response" message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_config_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
BT_HDR *p_buf;
@@ -769,15 +769,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_config_rej
-**
-** Description Build and send an L2CAP "configuration reject" message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_config_rej
+ *
+ * Description Build and send an L2CAP "configuration reject" message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_config_rej (tL2C_CCB *p_ccb, uint8_t *p_data, uint16_t data_len, uint16_t rej_len)
{
uint16_t len, cfg_len, buf_space, len1;
@@ -890,15 +890,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_disc_req
-**
-** Description Build and send an L2CAP "disconnect request" message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_disc_req
+ *
+ * Description Build and send an L2CAP "disconnect request" message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_disc_req (tL2C_CCB *p_ccb)
{
BT_HDR *p_buf, *p_buf2;
@@ -945,19 +945,19 @@
/*******************************************************************************
-**
-** Function l2cu_send_peer_disc_rsp
-**
-** Description Build and send an L2CAP "disconnect response" message
-** to the peer.
-**
-** This function is passed the parameters for the disconnect
-** response instead of the CCB address, as it may be called
-** to send a disconnect response when there is no CCB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_disc_rsp
+ *
+ * Description Build and send an L2CAP "disconnect response" message
+ * to the peer.
+ *
+ * This function is passed the parameters for the disconnect
+ * response instead of the CCB address, as it may be called
+ * to send a disconnect response when there is no CCB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_disc_rsp (tL2C_LCB *p_lcb, uint8_t remote_id, uint16_t local_cid,
uint16_t remote_cid)
{
@@ -981,16 +981,16 @@
/*******************************************************************************
-**
-** Function l2cu_send_peer_echo_req
-**
-** Description Build and send an L2CAP "echo request" message
-** to the peer. Note that we do not currently allow
-** data in the echo request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_echo_req
+ *
+ * Description Build and send an L2CAP "echo request" message
+ * to the peer. Note that we do not currently allow
+ * data in the echo request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_echo_req (tL2C_LCB *p_lcb, uint8_t *p_data, uint16_t data_len)
{
BT_HDR *p_buf;
@@ -1018,15 +1018,15 @@
/*******************************************************************************
-**
-** Function l2cu_send_peer_echo_rsp
-**
-** Description Build and send an L2CAP "echo response" message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_echo_rsp
+ *
+ * Description Build and send an L2CAP "echo response" message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, uint8_t id, uint8_t *p_data, uint16_t data_len)
{
BT_HDR *p_buf;
@@ -1072,14 +1072,14 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_info_req
-**
-** Description Build and send an L2CAP "info request" message
-** to the peer.
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_info_req
+ *
+ * Description Build and send an L2CAP "info request" message
+ * to the peer.
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_info_req (tL2C_LCB *p_lcb, uint16_t info_type)
{
BT_HDR *p_buf;
@@ -1113,15 +1113,15 @@
/*******************************************************************************
-**
-** Function l2cu_send_peer_info_rsp
-**
-** Description Build and send an L2CAP "info response" message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_info_rsp
+ *
+ * Description Build and send an L2CAP "info response" message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_info_rsp (tL2C_LCB *p_lcb, uint8_t remote_id, uint16_t info_type)
{
BT_HDR *p_buf;
@@ -1234,15 +1234,15 @@
}
/******************************************************************************
-**
-** Function l2cu_enqueue_ccb
-**
-** Description queue CCB by priority. The first CCB is highest priority and
-** is served at first. The CCB is queued to an LLCB or an LCB.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function l2cu_enqueue_ccb
+ *
+ * Description queue CCB by priority. The first CCB is highest priority and
+ * is served at first. The CCB is queued to an LLCB or an LCB.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void l2cu_enqueue_ccb (tL2C_CCB *p_ccb)
{
tL2C_CCB *p_ccb1;
@@ -1327,14 +1327,14 @@
}
/******************************************************************************
-**
-** Function l2cu_dequeue_ccb
-**
-** Description dequeue CCB from a queue
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2cu_dequeue_ccb
+ *
+ * Description dequeue CCB from a queue
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2cu_dequeue_ccb (tL2C_CCB *p_ccb)
{
tL2C_CCB_Q *p_q = NULL;
@@ -1411,14 +1411,14 @@
}
/******************************************************************************
-**
-** Function l2cu_change_pri_ccb
-**
-** Description
-**
-** Returns -
-**
-*******************************************************************************/
+ *
+ * Function l2cu_change_pri_ccb
+ *
+ * Description
+ *
+ * Returns -
+ *
+ ******************************************************************************/
void l2cu_change_pri_ccb (tL2C_CCB *p_ccb, tL2CAP_CHNL_PRIORITY priority)
{
if (p_ccb->ccb_priority != priority)
@@ -1455,16 +1455,16 @@
}
/*******************************************************************************
-**
-** Function l2cu_allocate_ccb
-**
-** Description This function allocates a Channel Control Block and
-** attaches it to a link control block. The local CID
-** is also assigned.
-**
-** Returns pointer to CCB, or NULL if none
-**
-*******************************************************************************/
+ *
+ * Function l2cu_allocate_ccb
+ *
+ * Description This function allocates a Channel Control Block and
+ * attaches it to a link control block. The local CID
+ * is also assigned.
+ *
+ * Returns pointer to CCB, or NULL if none
+ *
+ ******************************************************************************/
tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, uint16_t cid)
{
tL2C_CCB *p_ccb;
@@ -1602,18 +1602,18 @@
}
/*******************************************************************************
-**
-** Function l2cu_start_post_bond_timer
-**
-** Description This function starts the ACL Link inactivity timer after
-** dedicated bonding
-** This timer can be longer than the normal link inactivity
-** timer for some platforms.
-**
-** Returns bool - true if idle timer started or disconnect initiated
-** false if there's one or more pending CCB's exist
-**
-*******************************************************************************/
+ *
+ * Function l2cu_start_post_bond_timer
+ *
+ * Description This function starts the ACL Link inactivity timer after
+ * dedicated bonding
+ * This timer can be longer than the normal link inactivity
+ * timer for some platforms.
+ *
+ * Returns bool - true if idle timer started or disconnect initiated
+ * false if there's one or more pending CCB's exist
+ *
+ ******************************************************************************/
bool l2cu_start_post_bond_timer (uint16_t handle)
{
tL2C_LCB *p_lcb = l2cu_find_lcb_by_handle(handle);
@@ -1648,16 +1648,16 @@
}
/*******************************************************************************
-**
-** Function l2cu_release_ccb
-**
-** Description This function releases a Channel Control Block. The timer
-** is stopped, any attached buffers freed, and the CCB is removed
-** from the link control block.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_release_ccb
+ *
+ * Description This function releases a Channel Control Block. The timer
+ * is stopped, any attached buffers freed, and the CCB is removed
+ * from the link control block.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_release_ccb (tL2C_CCB *p_ccb)
{
tL2C_LCB *p_lcb = p_ccb->p_lcb;
@@ -1742,15 +1742,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_find_ccb_by_remote_cid
-**
-** Description Look through all active CCBs on a link for a match based
-** on the remote CID.
-**
-** Returns pointer to matched CCB, or NULL if no match
-**
-*******************************************************************************/
+ *
+ * Function l2cu_find_ccb_by_remote_cid
+ *
+ * Description Look through all active CCBs on a link for a match based
+ * on the remote CID.
+ *
+ * Returns pointer to matched CCB, or NULL if no match
+ *
+ ******************************************************************************/
tL2C_CCB *l2cu_find_ccb_by_remote_cid (tL2C_LCB *p_lcb, uint16_t remote_cid)
{
tL2C_CCB *p_ccb;
@@ -1772,15 +1772,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_allocate_rcb
-**
-** Description Look through the Registration Control Blocks for a free
-** one.
-**
-** Returns Pointer to the RCB or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function l2cu_allocate_rcb
+ *
+ * Description Look through the Registration Control Blocks for a free
+ * one.
+ *
+ * Returns Pointer to the RCB or NULL if not found
+ *
+ ******************************************************************************/
tL2C_RCB *l2cu_allocate_rcb (uint16_t psm)
{
tL2C_RCB *p_rcb = &l2cb.rcb_pool[0];
@@ -1804,15 +1804,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_allocate_ble_rcb
-**
-** Description Look through the BLE Registration Control Blocks for a free
-** one.
-**
-** Returns Pointer to the BLE RCB or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function l2cu_allocate_ble_rcb
+ *
+ * Description Look through the BLE Registration Control Blocks for a free
+ * one.
+ *
+ * Returns Pointer to the BLE RCB or NULL if not found
+ *
+ ******************************************************************************/
tL2C_RCB *l2cu_allocate_ble_rcb (uint16_t psm)
{
tL2C_RCB *p_rcb = &l2cb.ble_rcb_pool[0];
@@ -1836,14 +1836,14 @@
}
/*******************************************************************************
-**
-** Function l2cu_release_rcb
-**
-** Description Mark an RCB as no longet in use
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_release_rcb
+ *
+ * Description Mark an RCB as no longet in use
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_release_rcb (tL2C_RCB *p_rcb)
{
p_rcb->in_use = false;
@@ -1852,13 +1852,13 @@
/*******************************************************************************
-**
-** Function l2cu_disconnect_chnl
-**
-** Description Disconnect a channel. Typically, this is due to either
-** receiving a bad configuration, bad packet or max_retries expiring.
-**
-*******************************************************************************/
+ *
+ * Function l2cu_disconnect_chnl
+ *
+ * Description Disconnect a channel. Typically, this is due to either
+ * receiving a bad configuration, bad packet or max_retries expiring.
+ *
+ ******************************************************************************/
void l2cu_disconnect_chnl (tL2C_CCB *p_ccb)
{
uint16_t local_cid = p_ccb->local_cid;
@@ -1884,15 +1884,15 @@
/*******************************************************************************
-**
-** Function l2cu_find_rcb_by_psm
-**
-** Description Look through the Registration Control Blocks to see if
-** anyone registered to handle the PSM in question
-**
-** Returns Pointer to the RCB or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function l2cu_find_rcb_by_psm
+ *
+ * Description Look through the Registration Control Blocks to see if
+ * anyone registered to handle the PSM in question
+ *
+ * Returns Pointer to the RCB or NULL if not found
+ *
+ ******************************************************************************/
tL2C_RCB *l2cu_find_rcb_by_psm (uint16_t psm)
{
tL2C_RCB *p_rcb = &l2cb.rcb_pool[0];
@@ -1909,15 +1909,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_find_ble_rcb_by_psm
-**
-** Description Look through the BLE Registration Control Blocks to see if
-** anyone registered to handle the PSM in question
-**
-** Returns Pointer to the BLE RCB or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function l2cu_find_ble_rcb_by_psm
+ *
+ * Description Look through the BLE Registration Control Blocks to see if
+ * anyone registered to handle the PSM in question
+ *
+ * Returns Pointer to the BLE RCB or NULL if not found
+ *
+ ******************************************************************************/
tL2C_RCB *l2cu_find_ble_rcb_by_psm (uint16_t psm)
{
tL2C_RCB *p_rcb = &l2cb.ble_rcb_pool[0];
@@ -1934,24 +1934,24 @@
}
/*******************************************************************************
-**
-** Function l2cu_process_peer_cfg_req
-**
-** Description This function is called when the peer sends us a "config request"
-** message. It extracts the configuration of interest and saves
-** it in the CCB.
-**
-** Note: Negotiation of the FCR channel type is handled internally,
-** all others are passed to the upper layer.
-**
-** Returns uint8_t - L2CAP_PEER_CFG_OK if passed to upper layer,
-** L2CAP_PEER_CFG_UNACCEPTABLE if automatically responded to
-** because parameters are unnacceptable from a specification
-** point of view.
-** L2CAP_PEER_CFG_DISCONNECT if no compatible channel modes
-** between the two devices, and shall be closed.
-**
-*******************************************************************************/
+ *
+ * Function l2cu_process_peer_cfg_req
+ *
+ * Description This function is called when the peer sends us a "config request"
+ * message. It extracts the configuration of interest and saves
+ * it in the CCB.
+ *
+ * Note: Negotiation of the FCR channel type is handled internally,
+ * all others are passed to the upper layer.
+ *
+ * Returns uint8_t - L2CAP_PEER_CFG_OK if passed to upper layer,
+ * L2CAP_PEER_CFG_UNACCEPTABLE if automatically responded to
+ * because parameters are unnacceptable from a specification
+ * point of view.
+ * L2CAP_PEER_CFG_DISCONNECT if no compatible channel modes
+ * between the two devices, and shall be closed.
+ *
+ ******************************************************************************/
uint8_t l2cu_process_peer_cfg_req (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
bool mtu_ok = true;
@@ -2076,16 +2076,16 @@
/*******************************************************************************
-**
-** Function l2cu_process_peer_cfg_rsp
-**
-** Description This function is called when the peer sends us a "config response"
-** message. It extracts the configuration of interest and saves
-** it in the CCB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_process_peer_cfg_rsp
+ *
+ * Description This function is called when the peer sends us a "config response"
+ * message. It extracts the configuration of interest and saves
+ * it in the CCB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_process_peer_cfg_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
/* If we wanted QoS and the peer sends us a positive response with QoS, use his values */
@@ -2113,16 +2113,16 @@
}
/*******************************************************************************
-**
-** Function l2cu_process_our_cfg_req
-**
-** Description This function is called when we send a "config request"
-** message. It extracts the configuration of interest and saves
-** it in the CCB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_process_our_cfg_req
+ *
+ * Description This function is called when we send a "config request"
+ * message. It extracts the configuration of interest and saves
+ * it in the CCB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_process_our_cfg_req (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
tL2C_LCB *p_lcb;
@@ -2206,16 +2206,16 @@
/*******************************************************************************
-**
-** Function l2cu_process_our_cfg_rsp
-**
-** Description This function is called when we send the peer a "config response"
-** message. It extracts the configuration of interest and saves
-** it in the CCB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_process_our_cfg_rsp
+ *
+ * Description This function is called when we send the peer a "config response"
+ * message. It extracts the configuration of interest and saves
+ * it in the CCB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_process_our_cfg_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
{
/* If peer wants QoS, we are allowed to change the values in a positive response */
@@ -2229,15 +2229,15 @@
/*******************************************************************************
-**
-** Function l2cu_device_reset
-**
-** Description This function is called when reset of the device is
-** completed. For all active connection simulate HCI_DISC
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_device_reset
+ *
+ * Description This function is called when reset of the device is
+ * completed. For all active connection simulate HCI_DISC
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_device_reset (void)
{
int xx;
@@ -2254,14 +2254,14 @@
}
/*******************************************************************************
-**
-** Function l2cu_create_conn
-**
-** Description This function initiates an acl connection via HCI
-**
-** Returns true if successful, false if get buffer fails.
-**
-*******************************************************************************/
+ *
+ * Function l2cu_create_conn
+ *
+ * Description This function initiates an acl connection via HCI
+ *
+ * Returns true if successful, false if get buffer fails.
+ *
+ ******************************************************************************/
bool l2cu_create_conn (tL2C_LCB *p_lcb, tBT_TRANSPORT transport)
{
int xx;
@@ -2337,14 +2337,14 @@
}
/*******************************************************************************
-**
-** Function l2cu_get_num_hi_priority
-**
-** Description Gets the number of high priority channels.
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function l2cu_get_num_hi_priority
+ *
+ * Description Gets the number of high priority channels.
+ *
+ * Returns
+ *
+ ******************************************************************************/
uint8_t l2cu_get_num_hi_priority (void)
{
uint8_t no_hi = 0;
@@ -2363,15 +2363,15 @@
/*******************************************************************************
-**
-** Function l2cu_create_conn_after_switch
-**
-** 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 get buffer fails.
-**
-*******************************************************************************/
+ *
+ * Function l2cu_create_conn_after_switch
+ *
+ * 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 get buffer fails.
+ *
+ ******************************************************************************/
bool l2cu_create_conn_after_switch (tL2C_LCB *p_lcb)
{
@@ -2438,15 +2438,15 @@
/*******************************************************************************
-**
-** Function l2cu_find_lcb_by_state
-**
-** Description Look through all active LCBs for a match based on the
-** LCB state.
-**
-** Returns pointer to first matched LCB, or NULL if no match
-**
-*******************************************************************************/
+ *
+ * Function l2cu_find_lcb_by_state
+ *
+ * Description Look through all active LCBs for a match based on the
+ * LCB state.
+ *
+ * Returns pointer to first matched LCB, or NULL if no match
+ *
+ ******************************************************************************/
tL2C_LCB *l2cu_find_lcb_by_state (tL2C_LINK_STATE state)
{
uint16_t i;
@@ -2466,17 +2466,17 @@
/*******************************************************************************
-**
-** 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
+ *
+ * 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
idle timeout is running), or if last ccb on the link
is in disconnecting state.
-**
-** Returns true if any of above conditions met, false otherwise
-**
-*******************************************************************************/
+ *
+ * Returns true if any of above conditions met, false otherwise
+ *
+ ******************************************************************************/
bool l2cu_lcb_disconnecting (void)
{
tL2C_LCB *p_lcb;
@@ -2516,16 +2516,16 @@
/*******************************************************************************
-**
-** Function l2cu_set_acl_priority
-**
-** Description Sets the transmission priority for a channel.
-** (For initial implementation only two values are valid.
-** L2CAP_PRIORITY_NORMAL and L2CAP_PRIORITY_HIGH).
-**
-** Returns true if a valid channel, else false
-**
-*******************************************************************************/
+ *
+ * Function l2cu_set_acl_priority
+ *
+ * Description Sets the transmission priority for a channel.
+ * (For initial implementation only two values are valid.
+ * L2CAP_PRIORITY_NORMAL and L2CAP_PRIORITY_HIGH).
+ *
+ * Returns true if a valid channel, else false
+ *
+ ******************************************************************************/
bool l2cu_set_acl_priority (BD_ADDR bd_addr, uint8_t priority, bool reset_after_rs)
{
@@ -2573,14 +2573,14 @@
#if (L2CAP_NON_FLUSHABLE_PB_INCLUDED == TRUE)
/******************************************************************************
-**
-** Function l2cu_set_non_flushable_pbf
-**
-** Description set L2CAP_PKT_START_NON_FLUSHABLE if controller supoorts
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_set_non_flushable_pbf
+ *
+ * Description set L2CAP_PKT_START_NON_FLUSHABLE if controller supoorts
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_set_non_flushable_pbf (bool is_supported)
{
if (is_supported)
@@ -2591,15 +2591,15 @@
#endif
/*******************************************************************************
-**
-** Function l2cu_resubmit_pending_sec_req
-**
-** Description This function is called when required security procedures
-** are completed and any pending requests can be re-submitted.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_resubmit_pending_sec_req
+ *
+ * Description This function is called when required security procedures
+ * are completed and any pending requests can be re-submitted.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_resubmit_pending_sec_req (BD_ADDR p_bda)
{
tL2C_LCB *p_lcb;
@@ -2649,15 +2649,15 @@
#if (L2CAP_CONFORMANCE_TESTING == TRUE)
/*******************************************************************************
-**
-** Function l2cu_set_info_rsp_mask
-**
-** Description This function allows the script wrapper to change the
-** info resp mask for conformance testing.
-**
-** Returns pointer to CCB, or NULL if none
-**
-*******************************************************************************/
+ *
+ * Function l2cu_set_info_rsp_mask
+ *
+ * Description This function allows the script wrapper to change the
+ * info resp mask for conformance testing.
+ *
+ * Returns pointer to CCB, or NULL if none
+ *
+ ******************************************************************************/
void l2cu_set_info_rsp_mask (uint32_t mask)
{
l2cb.test_info_resp = mask;
@@ -2665,14 +2665,14 @@
#endif /* L2CAP_CONFORMANCE_TESTING */
/*******************************************************************************
-**
-** Function l2cu_adjust_out_mps
-**
-** Description Sets our MPS based on current controller capabilities
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_adjust_out_mps
+ *
+ * Description Sets our MPS based on current controller capabilities
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_adjust_out_mps (tL2C_CCB *p_ccb)
{
uint16_t packet_size;
@@ -2710,14 +2710,14 @@
/*******************************************************************************
-**
-** Function l2cu_initialize_fixed_ccb
-**
-** Description Initialize a fixed channel's CCB
-**
-** Returns true or false
-**
-*******************************************************************************/
+ *
+ * Function l2cu_initialize_fixed_ccb
+ *
+ * Description Initialize a fixed channel's CCB
+ *
+ * Returns true or false
+ *
+ ******************************************************************************/
bool l2cu_initialize_fixed_ccb (tL2C_LCB *p_lcb, uint16_t fixed_cid, tL2CAP_FCR_OPTS *p_fcr)
{
#if (L2CAP_NUM_FIXED_CHNLS > 0)
@@ -2773,16 +2773,16 @@
}
/*******************************************************************************
-**
-** Function l2cu_no_dynamic_ccbs
-**
-** Description Handles the case when there are no more dynamic CCBs. If there
-** are any fixed CCBs, start the longest of the fixed CCB timeouts,
-** otherwise start the default link idle timeout or disconnect.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_no_dynamic_ccbs
+ *
+ * Description Handles the case when there are no more dynamic CCBs. If there
+ * are any fixed CCBs, start the longest of the fixed CCB timeouts,
+ * otherwise start the default link idle timeout or disconnect.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
{
tBTM_STATUS rc;
@@ -2850,14 +2850,14 @@
#if (L2CAP_NUM_FIXED_CHNLS > 0)
/*******************************************************************************
-**
-** Function l2cu_process_fixed_chnl_resp
-**
-** Description handle a fixed channel response (or lack thereof)
-** if the link failed, or a fixed channel response was
-** not received, the bitfield is all zeros.
-**
-*******************************************************************************/
+ *
+ * Function l2cu_process_fixed_chnl_resp
+ *
+ * Description handle a fixed channel response (or lack thereof)
+ * if the link failed, or a fixed channel response was
+ * not received, the bitfield is all zeros.
+ *
+ ******************************************************************************/
void l2cu_process_fixed_chnl_resp (tL2C_LCB *p_lcb)
{
if (p_lcb->transport == BT_TRANSPORT_BR_EDR)
@@ -2906,15 +2906,15 @@
/*******************************************************************************
-**
-** Function l2cu_process_fixed_disc_cback
-**
-** Description send l2cap fixed channel disconnection callback to application
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_process_fixed_disc_cback
+ *
+ * Description send l2cap fixed channel disconnection callback to application
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_process_fixed_disc_cback (tL2C_LCB *p_lcb)
{
#if (L2CAP_NUM_FIXED_CHNLS > 0)
@@ -2949,15 +2949,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_ble_par_req
-**
-** Description Build and send a BLE parameter update request message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_ble_par_req
+ *
+ * Description Build and send a BLE parameter update request message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_ble_par_req (tL2C_LCB *p_lcb, uint16_t min_int, uint16_t max_int,
uint16_t latency, uint16_t timeout)
{
@@ -2987,15 +2987,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_ble_par_rsp
-**
-** Description Build and send a BLE parameter update response message
-** to the peer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_ble_par_rsp
+ *
+ * Description Build and send a BLE parameter update response message
+ * to the peer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_ble_par_rsp (tL2C_LCB *p_lcb, uint16_t reason, uint8_t rem_id)
{
BT_HDR *p_buf;
@@ -3017,15 +3017,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_ble_credit_based_conn_req
-**
-** Description Build and send a BLE packet to establish LE connection oriented
-** L2CAP channel.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_ble_credit_based_conn_req
+ *
+ * Description Build and send a BLE packet to establish LE connection oriented
+ * L2CAP channel.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_ble_credit_based_conn_req (tL2C_CCB *p_ccb)
{
BT_HDR *p_buf;
@@ -3073,15 +3073,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_reject_ble_connection
-**
-** Description Build and send an L2CAP "Credit based connection res" message
-** to the peer. This function is called for non-success cases.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_reject_ble_connection
+ *
+ * Description Build and send an L2CAP "Credit based connection res" message
+ * to the peer. This function is called for non-success cases.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_reject_ble_connection (tL2C_LCB *p_lcb, uint8_t rem_id, uint16_t result)
{
BT_HDR *p_buf;
@@ -3107,15 +3107,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_ble_credit_based_conn_res
-**
-** Description Build and send an L2CAP "Credit based connection res" message
-** to the peer. This function is called in case of success.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_ble_credit_based_conn_res
+ *
+ * Description Build and send an L2CAP "Credit based connection res" message
+ * to the peer. This function is called in case of success.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_ble_credit_based_conn_res (tL2C_CCB *p_ccb, uint16_t result)
{
BT_HDR *p_buf;
@@ -3142,15 +3142,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_ble_flow_control_credit
-**
-** Description Build and send a BLE packet to give credits to peer device
-** for LE connection oriented L2CAP channel.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_ble_flow_control_credit
+ *
+ * Description Build and send a BLE packet to give credits to peer device
+ * for LE connection oriented L2CAP channel.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_ble_flow_control_credit(tL2C_CCB *p_ccb, uint16_t credit_value)
{
BT_HDR *p_buf;
@@ -3184,15 +3184,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_send_peer_ble_credit_based_conn_req
-**
-** Description Build and send a BLE packet to disconnect LE connection oriented
-** L2CAP channel.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function l2cu_send_peer_ble_credit_based_conn_req
+ *
+ * Description Build and send a BLE packet to disconnect LE connection oriented
+ * L2CAP channel.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void l2cu_send_peer_ble_credit_based_disconn_req(tL2C_CCB *p_ccb)
{
BT_HDR *p_buf;
@@ -3227,19 +3227,19 @@
/*******************************************************************************
-** Functions used by both Full and Light Stack
-********************************************************************************/
+ * Functions used by both Full and Light Stack
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function l2cu_find_lcb_by_handle
-**
-** Description Look through all active LCBs for a match based on the
-** HCI handle.
-**
-** Returns pointer to matched LCB, or NULL if no match
-**
-*******************************************************************************/
+ *
+ * Function l2cu_find_lcb_by_handle
+ *
+ * Description Look through all active LCBs for a match based on the
+ * HCI handle.
+ *
+ * Returns pointer to matched LCB, or NULL if no match
+ *
+ ******************************************************************************/
tL2C_LCB *l2cu_find_lcb_by_handle (uint16_t handle)
{
int xx;
@@ -3258,16 +3258,16 @@
}
/*******************************************************************************
-**
-** Function l2cu_find_ccb_by_cid
-**
-** Description Look through all active CCBs on a link for a match based
-** on the local CID. If passed the link pointer is NULL, all
-** active links are searched.
-**
-** Returns pointer to matched CCB, or NULL if no match
-**
-*******************************************************************************/
+ *
+ * Function l2cu_find_ccb_by_cid
+ *
+ * Description Look through all active CCBs on a link for a match based
+ * on the local CID. If passed the link pointer is NULL, all
+ * active links are searched.
+ *
+ * Returns pointer to matched CCB, or NULL if no match
+ *
+ ******************************************************************************/
tL2C_CCB *l2cu_find_ccb_by_cid (tL2C_LCB *p_lcb, uint16_t local_cid)
{
tL2C_CCB *p_ccb = NULL;
@@ -3321,15 +3321,15 @@
#if (L2CAP_ROUND_ROBIN_CHANNEL_SERVICE == TRUE)
/******************************************************************************
-**
-** Function l2cu_get_next_channel_in_rr
-**
-** Description get the next channel to send on a link. It also adjusts the
-** CCB queue to do a basic priority and round-robin scheduling.
-**
-** Returns pointer to CCB or NULL
-**
-*******************************************************************************/
+ *
+ * Function l2cu_get_next_channel_in_rr
+ *
+ * Description get the next channel to send on a link. It also adjusts the
+ * CCB queue to do a basic priority and round-robin scheduling.
+ *
+ * Returns pointer to CCB or NULL
+ *
+ ******************************************************************************/
static tL2C_CCB *l2cu_get_next_channel_in_rr(tL2C_LCB *p_lcb)
{
tL2C_CCB *p_serve_ccb = NULL;
@@ -3435,15 +3435,15 @@
#else /* (L2CAP_ROUND_ROBIN_CHANNEL_SERVICE == TRUE) */
/******************************************************************************
-**
-** Function l2cu_get_next_channel
-**
-** Description get the next channel to send on a link bassed on priority
-** scheduling.
-**
-** Returns pointer to CCB or NULL
-**
-*******************************************************************************/
+ *
+ * Function l2cu_get_next_channel
+ *
+ * Description get the next channel to send on a link bassed on priority
+ * scheduling.
+ *
+ * Returns pointer to CCB or NULL
+ *
+ ******************************************************************************/
static tL2C_CCB *l2cu_get_next_channel(tL2C_LCB *p_lcb)
{
tL2C_CCB *p_ccb;
@@ -3477,15 +3477,15 @@
#endif /* (L2CAP_ROUND_ROBIN_CHANNEL_SERVICE == TRUE) */
/******************************************************************************
-**
-** Function l2cu_get_next_buffer_to_send
-**
-** Description get the next buffer to send on a link. It also adjusts the
-** CCB queue to do a basic priority and round-robin scheduling.
-**
-** Returns pointer to buffer or NULL
-**
-*******************************************************************************/
+ *
+ * Function l2cu_get_next_buffer_to_send
+ *
+ * Description get the next buffer to send on a link. It also adjusts the
+ * CCB queue to do a basic priority and round-robin scheduling.
+ *
+ * Returns pointer to buffer or NULL
+ *
+ ******************************************************************************/
BT_HDR *l2cu_get_next_buffer_to_send (tL2C_LCB *p_lcb)
{
tL2C_CCB *p_ccb;
@@ -3604,14 +3604,14 @@
}
/******************************************************************************
-**
-** Function l2cu_set_acl_hci_header
-**
-** Description Set HCI handle for ACL packet
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function l2cu_set_acl_hci_header
+ *
+ * Description Set HCI handle for ACL packet
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void l2cu_set_acl_hci_header (BT_HDR *p_buf, tL2C_CCB *p_ccb)
{
uint8_t *p;
@@ -3666,14 +3666,14 @@
}
/******************************************************************************
-**
-** Function l2cu_check_channel_congestion
-**
-** Description check if any change in congestion status
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function l2cu_check_channel_congestion
+ *
+ * Description check if any change in congestion status
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void l2cu_check_channel_congestion (tL2C_CCB *p_ccb)
{
size_t q_count = fixed_queue_length(p_ccb->xmit_hold_q);
@@ -3782,15 +3782,15 @@
}
/*******************************************************************************
-**
-** Function l2cu_is_ccb_active
-**
-** Description Check if Channel Control Block is in use or released
-**
-** Returns bool - true if Channel Control Block is in use
-** false if p_ccb is null or is released.
-**
-*******************************************************************************/
+ *
+ * Function l2cu_is_ccb_active
+ *
+ * Description Check if Channel Control Block is in use or released
+ *
+ * Returns bool - true if Channel Control Block is in use
+ * false if p_ccb is null or is released.
+ *
+ ******************************************************************************/
bool l2cu_is_ccb_active (tL2C_CCB *p_ccb)
{
return (p_ccb && p_ccb->in_use);
diff --git a/stack/mcap/mca_api.cc b/stack/mcap/mca_api.cc
index ed8808a..de97f90 100644
--- a/stack/mcap/mca_api.cc
+++ b/stack/mcap/mca_api.cc
@@ -36,17 +36,17 @@
/*******************************************************************************
-**
-** Function mca_process_timeout
-**
-** Description This function is called by BTU when an MCA timer
-** expires.
-**
-** This function is for use internal to the stack only.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_process_timeout
+ *
+ * Description This function is called by BTU when an MCA timer
+ * expires.
+ *
+ * This function is for use internal to the stack only.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_ccb_timer_timeout(void *data)
{
tMCA_CCB *p_ccb = (tMCA_CCB *)data;
@@ -55,15 +55,15 @@
}
/*******************************************************************************
-**
-** Function MCA_Init
-**
-** Description Initialize MCAP main control block.
-** This function is called at stack start up.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function MCA_Init
+ *
+ * Description Initialize MCAP main control block.
+ * This function is called at stack start up.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void MCA_Init(void)
{
memset(&mca_cb, 0, sizeof(tMCA_CB));
@@ -76,26 +76,26 @@
}
/*******************************************************************************
-**
-** Function MCA_SetTraceLevel
-**
-** Description This function sets the debug trace level for MCA.
-** If 0xff is passed, the current trace level is returned.
-**
-** Input Parameters:
-** level: The level to set the MCA tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new trace level or current trace level if
-** the input parameter is 0xff.
-**
-*******************************************************************************/
+ *
+ * Function MCA_SetTraceLevel
+ *
+ * Description This function sets the debug trace level for MCA.
+ * If 0xff is passed, the current trace level is returned.
+ *
+ * Input Parameters:
+ * level: The level to set the MCA tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new trace level or current trace level if
+ * the input parameter is 0xff.
+ *
+ ******************************************************************************/
uint8_t MCA_SetTraceLevel (uint8_t level)
{
if (level != 0xFF)
@@ -105,17 +105,17 @@
}
/*******************************************************************************
-**
-** Function MCA_Register
-**
-** Description This function registers an MCAP implementation.
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function MCA_Register
+ *
+ * Description This function registers an MCAP implementation.
+ * 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.
+ *
+ ******************************************************************************/
tMCA_HANDLE MCA_Register(tMCA_REG *p_reg, tMCA_CTRL_CBACK *p_cback)
{
tMCA_RCB *p_rcb;
@@ -175,16 +175,16 @@
/*******************************************************************************
-**
-** Function MCA_Deregister
-**
-** Description This function is called to deregister an MCAP implementation.
-** Before this function can be called, all control and data
-** channels must be removed with MCA_DisconnectReq and MCA_CloseReq.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function MCA_Deregister
+ *
+ * Description This function is called to deregister an MCAP implementation.
+ * Before this function can be called, all control and data
+ * channels must be removed with MCA_DisconnectReq and MCA_CloseReq.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void MCA_Deregister(tMCA_HANDLE handle)
{
tMCA_RCB *p_rcb = mca_rcb_by_handle(handle);
@@ -202,17 +202,17 @@
/*******************************************************************************
-**
-** Function MCA_CreateDep
-**
-** 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.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_CreateDep
+ *
+ * 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.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_CreateDep(tMCA_HANDLE handle, tMCA_DEP *p_dep, tMCA_CS *p_cs)
{
tMCA_RESULT result = MCA_BAD_HANDLE;
@@ -271,18 +271,18 @@
/*******************************************************************************
-**
-** Function MCA_DeleteDep
-**
-** Description Delete a data endpoint. This function is called when
-** the implementation is no longer using a data endpoint.
-** If this function is called when the endpoint is connected
-** the connection is closed and the data endpoint
-** is removed.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_DeleteDep
+ *
+ * Description Delete a data endpoint. This function is called when
+ * the implementation is no longer using a data endpoint.
+ * If this function is called when the endpoint is connected
+ * the connection is closed and the data endpoint
+ * is removed.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_DeleteDep(tMCA_HANDLE handle, tMCA_DEP dep)
{
tMCA_RESULT result = MCA_BAD_HANDLE;
@@ -316,21 +316,21 @@
}
/*******************************************************************************
-**
-** Function MCA_ConnectReq
-**
-** 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.
-** This control channel is identified by the tMCA_CL.
-** If the connection attempt fails, an MCA_DISCONNECT_IND_EVT is
-** reported. The security mask parameter overrides the outgoing
-** security mask set in MCA_Register().
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_ConnectReq
+ *
+ * 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.
+ * This control channel is identified by the tMCA_CL.
+ * If the connection attempt fails, an MCA_DISCONNECT_IND_EVT is
+ * reported. The security mask parameter overrides the outgoing
+ * security mask set in MCA_Register().
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle, BD_ADDR bd_addr,
uint16_t ctrl_psm, uint16_t sec_mask)
{
@@ -376,18 +376,18 @@
/*******************************************************************************
-**
-** Function MCA_DisconnectReq
-**
-** Description This function disconnect an MCAP control channel
-** 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.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_DisconnectReq
+ *
+ * Description This function disconnect an MCAP control channel
+ * 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.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_DisconnectReq(tMCA_CL mcl)
{
tMCA_RESULT result = MCA_BAD_HANDLE;
@@ -404,22 +404,22 @@
/*******************************************************************************
-**
-** Function MCA_CreateMdl
-**
-** 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
-** 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.
-** When the data channel is open successfully, a MCA_OPEN_CFM_EVT
-** is reported. This data channel is identified as tMCA_DL.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_CreateMdl
+ *
+ * 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
+ * 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.
+ * When the data channel is open successfully, a MCA_OPEN_CFM_EVT
+ * is reported. This data channel is identified as tMCA_DL.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_CreateMdl(tMCA_CL mcl, tMCA_DEP dep, uint16_t data_psm,
uint16_t mdl_id, uint8_t peer_dep_id,
uint8_t cfg, const tMCA_CHNL_CFG *p_chnl_cfg)
@@ -482,19 +482,19 @@
/*******************************************************************************
-**
-** Function MCA_CreateMdlRsp
-**
-** Description This function sends a CREATE_MDL response to the peer device
-** in response to a received MCA_CREATE_IND_EVT.
-** If the rsp_code is successful, a data channel is open
-** with the given p_chnl_cfg
-** When the data channel is open successfully, a MCA_OPEN_IND_EVT
-** is reported. This data channel is identified as tMCA_DL.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_CreateMdlRsp
+ *
+ * Description This function sends a CREATE_MDL response to the peer device
+ * in response to a received MCA_CREATE_IND_EVT.
+ * If the rsp_code is successful, a data channel is open
+ * with the given p_chnl_cfg
+ * When the data channel is open successfully, a MCA_OPEN_IND_EVT
+ * is reported. This data channel is identified as tMCA_DL.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_CreateMdlRsp(tMCA_CL mcl, tMCA_DEP dep,
uint16_t mdl_id, uint8_t cfg, uint8_t rsp_code,
const tMCA_CHNL_CFG *p_chnl_cfg)
@@ -553,16 +553,16 @@
}
/*******************************************************************************
-**
-** Function MCA_CloseReq
-**
-** Description Close a data channel. When the channel is closed, an
-** MCA_CLOSE_CFM_EVT is sent to the application via the
-** control callback function for this handle.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_CloseReq
+ *
+ * Description Close a data channel. When the channel is closed, an
+ * MCA_CLOSE_CFM_EVT is sent to the application via the
+ * control callback function for this handle.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_CloseReq(tMCA_DL mdl)
{
tMCA_RESULT result = MCA_BAD_HANDLE;
@@ -579,20 +579,20 @@
/*******************************************************************************
-**
-** Function MCA_ReconnectMdl
-**
-** Description This function sends a RECONNECT_MDL request to the peer device.
-** When the response is received, a MCA_RECONNECT_CFM_EVT is reported.
-** If p_chnl_cfg is NULL, the data channel is not initiated until
-** MCA_DataChnlCfg is called to provide the p_chnl_cfg.
-** If the response is successful, a data channel is open.
-** When the data channel is open successfully, a MCA_OPEN_CFM_EVT
-** is reported.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_ReconnectMdl
+ *
+ * Description This function sends a RECONNECT_MDL request to the peer device.
+ * When the response is received, a MCA_RECONNECT_CFM_EVT is reported.
+ * If p_chnl_cfg is NULL, the data channel is not initiated until
+ * MCA_DataChnlCfg is called to provide the p_chnl_cfg.
+ * If the response is successful, a data channel is open.
+ * When the data channel is open successfully, a MCA_OPEN_CFM_EVT
+ * is reported.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_ReconnectMdl(tMCA_CL mcl, tMCA_DEP dep, uint16_t data_psm,
uint16_t mdl_id, const tMCA_CHNL_CFG *p_chnl_cfg)
{
@@ -645,18 +645,18 @@
/*******************************************************************************
-**
-** Function MCA_ReconnectMdlRsp
-**
-** Description This function sends a RECONNECT_MDL response to the peer device
-** in response to a MCA_RECONNECT_IND_EVT event.
-** If the response is successful, a data channel is open.
-** When the data channel is open successfully, a MCA_OPEN_IND_EVT
-** is reported.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_ReconnectMdlRsp
+ *
+ * Description This function sends a RECONNECT_MDL response to the peer device
+ * in response to a MCA_RECONNECT_IND_EVT event.
+ * If the response is successful, a data channel is open.
+ * When the data channel is open successfully, a MCA_OPEN_IND_EVT
+ * is reported.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_ReconnectMdlRsp(tMCA_CL mcl, tMCA_DEP dep,
uint16_t mdl_id, uint8_t rsp_code,
const tMCA_CHNL_CFG *p_chnl_cfg)
@@ -713,17 +713,17 @@
/*******************************************************************************
-**
-** Function MCA_DataChnlCfg
-**
-** Description This function initiates a data channel connection toward the
-** connected peer device.
-** When the data channel is open successfully, a MCA_OPEN_CFM_EVT
-** is reported. This data channel is identified as tMCA_DL.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_DataChnlCfg
+ *
+ * Description This function initiates a data channel connection toward the
+ * connected peer device.
+ * When the data channel is open successfully, a MCA_OPEN_CFM_EVT
+ * is reported. This data channel is identified as tMCA_DL.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_DataChnlCfg(tMCA_CL mcl, const tMCA_CHNL_CFG *p_chnl_cfg)
{
tMCA_RESULT result = MCA_BAD_HANDLE;
@@ -762,15 +762,15 @@
/*******************************************************************************
-**
-** Function MCA_Abort
-**
-** Description This function sends a ABORT_MDL request to the peer device.
-** When the response is received, a MCA_ABORT_CFM_EVT is reported.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_Abort
+ *
+ * Description This function sends a ABORT_MDL request to the peer device.
+ * When the response is received, a MCA_ABORT_CFM_EVT is reported.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_Abort(tMCA_CL mcl)
{
tMCA_RESULT result = MCA_BAD_HANDLE;
@@ -807,15 +807,15 @@
/*******************************************************************************
-**
-** Function MCA_Delete
-**
-** Description This function sends a DELETE_MDL request to the peer device.
-** When the response is received, a MCA_DELETE_CFM_EVT is reported.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_Delete
+ *
+ * Description This function sends a DELETE_MDL request to the peer device.
+ * When the response is received, a MCA_DELETE_CFM_EVT is reported.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_Delete(tMCA_CL mcl, uint16_t mdl_id)
{
tMCA_RESULT result = MCA_BAD_HANDLE;
@@ -846,23 +846,23 @@
}
/*******************************************************************************
-**
-** Function MCA_WriteReq
-**
-** 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.
-** This allows enough space in the buffer for the L2CAP header.
-**
-** The memory pointed to by p_pkt must be a GKI buffer
-** allocated by the application. This buffer will be freed
-** by the protocol stack; the application must not free
-** this buffer.
-**
-** Returns MCA_SUCCESS if successful, otherwise error.
-**
-*******************************************************************************/
+ *
+ * Function MCA_WriteReq
+ *
+ * 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.
+ * This allows enough space in the buffer for the L2CAP header.
+ *
+ * The memory pointed to by p_pkt must be a GKI buffer
+ * allocated by the application. This buffer will be freed
+ * by the protocol stack; the application must not free
+ * this buffer.
+ *
+ * Returns MCA_SUCCESS if successful, otherwise error.
+ *
+ ******************************************************************************/
tMCA_RESULT MCA_WriteReq(tMCA_DL mdl, BT_HDR *p_pkt)
{
tMCA_RESULT result = MCA_BAD_HANDLE;
@@ -887,14 +887,14 @@
}
/*******************************************************************************
-**
-** Function MCA_GetL2CapChannel
-**
-** Description Get the L2CAP CID used by the given data channel handle.
-**
-** Returns L2CAP channel ID if successful, otherwise 0.
-**
-*******************************************************************************/
+ *
+ * Function MCA_GetL2CapChannel
+ *
+ * Description Get the L2CAP CID used by the given data channel handle.
+ *
+ * Returns L2CAP channel ID if successful, otherwise 0.
+ *
+ ******************************************************************************/
uint16_t MCA_GetL2CapChannel (tMCA_DL mdl)
{
uint16_t lcid = 0;
diff --git a/stack/mcap/mca_cact.cc b/stack/mcap/mca_cact.cc
index e07ec4a..0f49e06 100644
--- a/stack/mcap/mca_cact.cc
+++ b/stack/mcap/mca_cact.cc
@@ -38,17 +38,17 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/*******************************************************************************
-**
-** Function mca_ccb_rsp_tout
-**
-** Description This function processes the response timeout.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_rsp_tout
+ *
+ * Description This function processes the response timeout.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_rsp_tout(tMCA_CCB *p_ccb,
UNUSED_ATTR tMCA_CCB_EVT *p_data)
{
@@ -58,14 +58,14 @@
}
/*******************************************************************************
-**
-** Function mca_ccb_report_event
-**
-** Description This function reports the given event.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_report_event
+ *
+ * Description This function reports the given event.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_report_event(tMCA_CCB *p_ccb, uint8_t event, tMCA_CTRL *p_data)
{
if (p_ccb && p_ccb->p_rcb && p_ccb->p_rcb->p_cback)
@@ -73,28 +73,28 @@
}
/*******************************************************************************
-**
-** Function mca_ccb_free_msg
-**
-** Description This function frees the received message.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_free_msg
+ *
+ * Description This function frees the received message.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_free_msg(UNUSED_ATTR tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
osi_free(p_data);
}
/*******************************************************************************
-**
-** Function mca_ccb_snd_req
-**
-** Description This function builds a request and sends it to the peer.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_snd_req
+ *
+ * Description This function builds a request and sends it to the peer.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_snd_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
tMCA_CCB_MSG *p_msg = (tMCA_CCB_MSG *)p_data;
@@ -150,15 +150,15 @@
}
/*******************************************************************************
-**
-** Function mca_ccb_snd_rsp
-**
-** Description This function builds a response and sends it to
-** the peer.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_snd_rsp
+ *
+ * Description This function builds a response and sends it to
+ * the peer.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_snd_rsp(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
tMCA_CCB_MSG *p_msg = (tMCA_CCB_MSG *)p_data;
@@ -201,14 +201,14 @@
}
/*******************************************************************************
-**
-** Function mca_ccb_do_disconn
-**
-** Description This function closes a control channel.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_do_disconn
+ *
+ * Description This function closes a control channel.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_do_disconn (tMCA_CCB *p_ccb,
UNUSED_ATTR tMCA_CCB_EVT *p_data)
{
@@ -217,14 +217,14 @@
}
/*******************************************************************************
-**
-** Function mca_ccb_cong
-**
-** Description This function sets the congestion state for the CCB.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_cong
+ *
+ * Description This function sets the congestion state for the CCB.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_cong(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
MCA_TRACE_DEBUG ("mca_ccb_cong cong=%d/%d", p_ccb->cong, p_data->llcong);
@@ -242,16 +242,16 @@
}
/*******************************************************************************
-**
-** 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
-** report the event.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * 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
+ * report the event.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
BT_HDR *p_pkt = &p_data->hdr;
@@ -438,16 +438,16 @@
}
/*******************************************************************************
-**
-** 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 results.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * 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 results.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_hdl_rsp(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
BT_HDR *p_pkt = &p_data->hdr;
@@ -540,15 +540,15 @@
}
/*******************************************************************************
-**
-** Function mca_ccb_ll_open
-**
-** Description This function is called to report MCA_CONNECT_IND_EVT event.
-** It also clears the congestion flag (ccb.cong).
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_ll_open
+ *
+ * Description This function is called to report MCA_CONNECT_IND_EVT event.
+ * It also clears the congestion flag (ccb.cong).
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_ll_open (tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
tMCA_CTRL evt_data;
@@ -559,15 +559,15 @@
}
/*******************************************************************************
-**
-** Function mca_ccb_dl_open
-**
-** Description This function is called when data channel is open.
-** It clears p_tx_req to allow other message exchage on this CL.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_dl_open
+ *
+ * Description This function is called when data channel is open.
+ * It clears p_tx_req to allow other message exchage on this CL.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_dl_open (tMCA_CCB *p_ccb,
UNUSED_ATTR tMCA_CCB_EVT *p_data)
{
diff --git a/stack/mcap/mca_csm.cc b/stack/mcap/mca_csm.cc
index 3b30a21..c879465 100644
--- a/stack/mcap/mca_csm.cc
+++ b/stack/mcap/mca_csm.cc
@@ -31,8 +31,8 @@
#include "btu.h"
/*****************************************************************************
-** data channel state machine constants and types
-*****************************************************************************/
+ * data channel state machine constants and types
+ ****************************************************************************/
enum
{
MCA_CCB_FREE_MSG,
@@ -152,32 +152,32 @@
};
/*******************************************************************************
-**
-** Function mca_stop_timer
-**
-** Description This function is stop a MCAP timer
-**
-** This function is for use internal to MCAP only.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_stop_timer
+ *
+ * Description This function is stop a MCAP timer
+ *
+ * This function is for use internal to MCAP only.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_stop_timer(tMCA_CCB *p_ccb)
{
alarm_cancel(p_ccb->mca_ccb_timer);
}
/*******************************************************************************
-**
-** Function mca_ccb_event
-**
-** Description This function is the CCB state machine main function.
-** It uses the state and action function tables to execute
-** action functions.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_event
+ *
+ * Description This function is the CCB state machine main function.
+ * It uses the state and action function tables to execute
+ * action functions.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_event(tMCA_CCB *p_ccb, uint8_t event, tMCA_CCB_EVT *p_data)
{
tMCA_CCB_ST_TBL state_table;
@@ -200,16 +200,16 @@
}
/*******************************************************************************
-**
-** Function mca_ccb_by_bd
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_by_bd
+ *
+ * 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.
+ *
+ ******************************************************************************/
tMCA_CCB *mca_ccb_by_bd(tMCA_HANDLE handle, BD_ADDR bd_addr)
{
tMCA_CCB *p_ccb = NULL;
@@ -234,16 +234,16 @@
}
/*******************************************************************************
-**
-** 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
-** be allocated it returns NULL.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * 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
+ * be allocated it returns NULL.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
tMCA_CCB *mca_ccb_alloc(tMCA_HANDLE handle, BD_ADDR bd_addr)
{
tMCA_CCB *p_ccb = NULL;
@@ -275,14 +275,14 @@
/*******************************************************************************
-**
-** Function mca_ccb_dealloc
-**
-** Description This function deallocates a CCB.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_dealloc
+ *
+ * Description This function deallocates a CCB.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_ccb_dealloc(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
tMCA_CTRL evt_data;
@@ -314,31 +314,31 @@
}
/*******************************************************************************
-**
-** Function mca_ccb_to_hdl
-**
-** Description This function converts a pointer to a CCB to a tMCA_CL
-** and returns the value.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_to_hdl
+ *
+ * Description This function converts a pointer to a CCB to a tMCA_CL
+ * and returns the value.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
tMCA_CL mca_ccb_to_hdl(tMCA_CCB *p_ccb)
{
return (uint8_t) (p_ccb - mca_cb.ccb + 1);
}
/*******************************************************************************
-**
-** Function mca_ccb_by_hdl
-**
-** 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.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_by_hdl
+ *
+ * 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.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
tMCA_CCB *mca_ccb_by_hdl(tMCA_CL mcl)
{
tMCA_CCB * p_ccb = NULL;
@@ -349,14 +349,14 @@
/*******************************************************************************
-**
-** Function mca_ccb_uses_mdl_id
-**
-** Description This function checkes if a given mdl_id is in use.
-**
-** Returns true, if the given mdl_id is currently used in the MCL.
-**
-*******************************************************************************/
+ *
+ * Function mca_ccb_uses_mdl_id
+ *
+ * Description This function checkes if a given mdl_id is in use.
+ *
+ * Returns true, if the given mdl_id is currently used in the MCL.
+ *
+ ******************************************************************************/
bool mca_ccb_uses_mdl_id(tMCA_CCB *p_ccb, uint16_t mdl_id)
{
bool uses = false;
diff --git a/stack/mcap/mca_dact.cc b/stack/mcap/mca_dact.cc
index daafb96..60782f4 100644
--- a/stack/mcap/mca_dact.cc
+++ b/stack/mcap/mca_dact.cc
@@ -32,14 +32,14 @@
#include "osi/include/osi.h"
/*******************************************************************************
-**
-** Function mca_dcb_report_cong
-**
-** Description This function is called to report the congestion flag.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_report_cong
+ *
+ * Description This function is called to report the congestion flag.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_dcb_report_cong (tMCA_DCB *p_dcb)
{
tMCA_CTRL evt_data;
@@ -51,16 +51,16 @@
}
/*******************************************************************************
-**
-** Function mca_dcb_tc_open
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_tc_open
+ *
+ * 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.
+ *
+ ******************************************************************************/
void mca_dcb_tc_open (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
{
tMCA_CTRL evt_data;
@@ -78,14 +78,14 @@
}
/*******************************************************************************
-**
-** Function mca_dcb_cong
-**
-** Description This function sets the congestion state for the DCB.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_cong
+ *
+ * Description This function sets the congestion state for the DCB.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_dcb_cong (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
{
p_dcb->cong = p_data->llcong;
@@ -93,28 +93,28 @@
}
/*******************************************************************************
-**
-** Function mca_dcb_free_data
-**
-** Description This function frees the received message.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_free_data
+ *
+ * Description This function frees the received message.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_dcb_free_data(UNUSED_ATTR tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
{
osi_free(p_data);
}
/*******************************************************************************
-**
-** Function mca_dcb_do_disconn
-**
-** Description This function closes a data channel.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_do_disconn
+ *
+ * Description This function closes a data channel.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_dcb_do_disconn (tMCA_DCB *p_dcb,
UNUSED_ATTR tMCA_DCB_EVT *p_data)
{
@@ -130,14 +130,14 @@
}
/*******************************************************************************
-**
-** Function mca_dcb_snd_data
-**
-** Description This function sends the data from application to the peer device.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_snd_data
+ *
+ * Description This function sends the data from application to the peer device.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_dcb_snd_data (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
{
uint8_t status;
@@ -152,15 +152,15 @@
}
/*******************************************************************************
-**
-** Function mca_dcb_hdl_data
-**
-** Description This function reports the received data through the data
-** callback function.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_hdl_data
+ *
+ * Description This function reports the received data through the data
+ * callback function.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_dcb_hdl_data (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
{
(*p_dcb->p_cs->p_data_cback) (mca_dcb_to_hdl(p_dcb), (BT_HDR *)p_data);
diff --git a/stack/mcap/mca_dsm.cc b/stack/mcap/mca_dsm.cc
index bf6dee4..3a59a1e 100644
--- a/stack/mcap/mca_dsm.cc
+++ b/stack/mcap/mca_dsm.cc
@@ -29,8 +29,8 @@
#include "mca_int.h"
/*****************************************************************************
-** data channel state machine constants and types
-*****************************************************************************/
+ * data channel state machine constants and types
+ ****************************************************************************/
enum
{
MCA_DCB_TC_OPEN,
@@ -122,16 +122,16 @@
};
/*******************************************************************************
-**
-** Function mca_dcb_event
-**
-** Description This function is the DCB state machine main function.
-** It uses the state and action function tables to execute
-** action functions.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_event
+ *
+ * Description This function is the DCB state machine main function.
+ * It uses the state and action function tables to execute
+ * action functions.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_dcb_event(tMCA_DCB *p_dcb, uint8_t event, tMCA_DCB_EVT *p_data)
{
tMCA_DCB_ST_TBL state_table;
@@ -156,15 +156,15 @@
}
/*******************************************************************************
-**
-** Function mca_dcb_alloc
-**
-** Description This function is called to allocate an DCB.
-** It initializes the DCB with the data passed to the function.
-**
-** Returns tMCA_DCB *
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_alloc
+ *
+ * Description This function is called to allocate an DCB.
+ * It initializes the DCB with the data passed to the function.
+ *
+ * Returns tMCA_DCB *
+ *
+ ******************************************************************************/
tMCA_DCB *mca_dcb_alloc(tMCA_CCB*p_ccb, tMCA_DEP dep)
{
tMCA_DCB *p_dcb = NULL, *p_dcb_tmp;
@@ -196,15 +196,15 @@
}
/*******************************************************************************
-**
-** Function mca_dep_free_mdl
-**
-** Description This function is called to check the number of free mdl for
-** the given dep.
-**
-** Returns the number of free mdl for the given dep
-**
-*******************************************************************************/
+ *
+ * Function mca_dep_free_mdl
+ *
+ * Description This function is called to check the number of free mdl for
+ * the given dep.
+ *
+ * Returns the number of free mdl for the given dep
+ *
+ ******************************************************************************/
uint8_t mca_dep_free_mdl(tMCA_CCB *p_ccb, tMCA_DEP dep)
{
tMCA_DCB *p_dcb;
@@ -240,14 +240,14 @@
}
/*******************************************************************************
-**
-** Function mca_dcb_dealloc
-**
-** Description This function deallocates an DCB.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_dealloc
+ *
+ * Description This function deallocates an DCB.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_dcb_dealloc(tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
{
tMCA_CCB *p_ccb = p_dcb->p_ccb;
@@ -272,31 +272,31 @@
}
/*******************************************************************************
-**
-** Function mca_dcb_to_hdl
-**
-** Description This function converts a pointer to an DCB to a handle (tMCA_DL).
-** It returns the handle.
-**
-** Returns tMCA_DL.
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_to_hdl
+ *
+ * Description This function converts a pointer to an DCB to a handle (tMCA_DL).
+ * It returns the handle.
+ *
+ * Returns tMCA_DL.
+ *
+ ******************************************************************************/
tMCA_DL mca_dcb_to_hdl(tMCA_DCB *p_dcb)
{
return (uint8_t) (p_dcb - mca_cb.dcb + 1);
}
/*******************************************************************************
-**
-** Function mca_dcb_by_hdl
-**
-** Description This function finds the DCB for a handle (tMCA_DL).
-** It returns a pointer to the DCB.
-** If no DCB matches the handle it returns NULL.
-**
-** Returns tMCA_DCB *
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_by_hdl
+ *
+ * Description This function finds the DCB for a handle (tMCA_DL).
+ * It returns a pointer to the DCB.
+ * If no DCB matches the handle it returns NULL.
+ *
+ * Returns tMCA_DCB *
+ *
+ ******************************************************************************/
tMCA_DCB *mca_dcb_by_hdl(tMCA_DL hdl)
{
tMCA_DCB * p_dcb = NULL;
@@ -306,15 +306,15 @@
}
/*******************************************************************************
-**
-** Function mca_dcb_close_by_mdl_id
-**
-** Description This function finds the DCB for a mdl_id and
-** disconnect the mdl
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_dcb_close_by_mdl_id
+ *
+ * Description This function finds the DCB for a mdl_id and
+ * disconnect the mdl
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_dcb_close_by_mdl_id(tMCA_CCB*p_ccb, uint16_t mdl_id)
{
tMCA_DCB *p_dcb;
diff --git a/stack/mcap/mca_int.h b/stack/mcap/mca_int.h
index accda78..de90c6b 100644
--- a/stack/mcap/mca_int.h
+++ b/stack/mcap/mca_int.h
@@ -32,16 +32,16 @@
#endif
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* INT initiates the L2CAP channel */
#define MCA_ACP 0
#define MCA_INT 1
/*****************************************************************************
-** Type Definitions
-*****************************************************************************/
+ * Type Definitions
+ ****************************************************************************/
/* Header structure for api/received request/response. */
typedef struct {
@@ -340,12 +340,12 @@
extern void mca_l2c_data_ind_cback(uint16_t lcid, BT_HDR *p_buf);
/*****************************************************************************
-** global data
-*****************************************************************************/
+ * global data
+ ****************************************************************************/
/******************************************************************************
-** Main Control Block
-*******************************************************************************/
+ * Main Control Block
+ ******************************************************************************/
extern tMCA_CB mca_cb;
/* L2CAP callback registration structure */
diff --git a/stack/mcap/mca_l2c.cc b/stack/mcap/mca_l2c.cc
index 91c203c..17aeba0 100644
--- a/stack/mcap/mca_l2c.cc
+++ b/stack/mcap/mca_l2c.cc
@@ -62,15 +62,15 @@
/*******************************************************************************
-**
-** Function mca_sec_check_complete_term
-**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_sec_check_complete_term
+ *
+ * Description The function called when Security Manager finishes
+ * verification of the service side connection
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void mca_sec_check_complete_term (BD_ADDR bd_addr,
UNUSED_ATTR tBT_TRANSPORT transport, void *p_ref_data,
uint8_t res)
@@ -109,15 +109,15 @@
}
/*******************************************************************************
-**
-** Function mca_sec_check_complete_orig
-**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_sec_check_complete_orig
+ *
+ * Description The function called when Security Manager finishes
+ * verification of the service side connection
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void mca_sec_check_complete_orig (UNUSED_ATTR BD_ADDR bd_addr, UNUSED_ATTR tBT_TRANSPORT transport, void *p_ref_data,
uint8_t res)
{
@@ -142,14 +142,14 @@
}
}
/*******************************************************************************
-**
-** Function mca_l2c_cconn_ind_cback
-**
-** Description This is the L2CAP connect indication callback function.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_cconn_ind_cback
+ *
+ * Description This is the L2CAP connect indication callback function.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_l2c_cconn_ind_cback(BD_ADDR bd_addr, uint16_t lcid, uint16_t psm, uint8_t id)
{
tMCA_HANDLE handle = mca_handle_by_cpsm(psm);
@@ -219,15 +219,15 @@
}
/*******************************************************************************
-**
-** Function mca_l2c_dconn_ind_cback
-**
-** Description This is the L2CAP connect indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_dconn_ind_cback
+ *
+ * Description This is the L2CAP connect indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_l2c_dconn_ind_cback(BD_ADDR bd_addr, uint16_t lcid, uint16_t psm, uint8_t id)
{
tMCA_HANDLE handle = mca_handle_by_dpsm(psm);
@@ -286,15 +286,15 @@
}
/*******************************************************************************
-**
-** Function mca_l2c_connect_cfm_cback
-**
-** Description This is the L2CAP connect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_connect_cfm_cback
+ *
+ * Description This is the L2CAP connect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_l2c_connect_cfm_cback(uint16_t lcid, uint16_t result)
{
tMCA_TC_TBL *p_tbl;
@@ -357,15 +357,15 @@
}
/*******************************************************************************
-**
-** Function mca_l2c_config_cfm_cback
-**
-** Description This is the L2CAP config confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_config_cfm_cback
+ *
+ * Description This is the L2CAP config confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_l2c_config_cfm_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tMCA_TC_TBL *p_tbl;
@@ -400,15 +400,15 @@
}
/*******************************************************************************
-**
-** Function mca_l2c_config_ind_cback
-**
-** Description This is the L2CAP config indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_config_ind_cback
+ *
+ * Description This is the L2CAP config indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_l2c_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tMCA_TC_TBL *p_tbl;
@@ -454,15 +454,15 @@
}
/*******************************************************************************
-**
-** Function mca_l2c_disconnect_ind_cback
-**
-** Description This is the L2CAP disconnect indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_disconnect_ind_cback
+ *
+ * Description This is the L2CAP disconnect indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_l2c_disconnect_ind_cback(uint16_t lcid, bool ack_needed)
{
tMCA_TC_TBL *p_tbl;
@@ -488,15 +488,15 @@
}
/*******************************************************************************
-**
-** Function mca_l2c_disconnect_cfm_cback
-**
-** Description This is the L2CAP disconnect confirm callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_disconnect_cfm_cback
+ *
+ * Description This is the L2CAP disconnect confirm callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_l2c_disconnect_cfm_cback(uint16_t lcid, uint16_t result)
{
tMCA_TC_TBL *p_tbl;
@@ -514,15 +514,15 @@
/*******************************************************************************
-**
-** Function mca_l2c_congestion_ind_cback
-**
-** Description This is the L2CAP congestion indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_congestion_ind_cback
+ *
+ * Description This is the L2CAP congestion indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_l2c_congestion_ind_cback(uint16_t lcid, bool is_congested)
{
tMCA_TC_TBL *p_tbl;
@@ -536,15 +536,15 @@
}
/*******************************************************************************
-**
-** Function mca_l2c_data_ind_cback
-**
-** Description This is the L2CAP data indication callback function.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_data_ind_cback
+ *
+ * Description This is the L2CAP data indication callback function.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void mca_l2c_data_ind_cback(uint16_t lcid, BT_HDR *p_buf)
{
tMCA_TC_TBL *p_tbl;
@@ -561,14 +561,14 @@
/*******************************************************************************
-**
-** Function mca_l2c_open_req
-**
-** Description This function calls L2CA_ConnectReq() to initiate a L2CAP channel.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_l2c_open_req
+ *
+ * Description This function calls L2CA_ConnectReq() to initiate a L2CAP channel.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
uint16_t mca_l2c_open_req(BD_ADDR bd_addr, uint16_t psm, const tMCA_CHNL_CFG *p_chnl_cfg)
{
tL2CAP_ERTM_INFO ertm_info;
diff --git a/stack/mcap/mca_main.cc b/stack/mcap/mca_main.cc
index f2255b0..3d04ba5 100644
--- a/stack/mcap/mca_main.cc
+++ b/stack/mcap/mca_main.cc
@@ -36,8 +36,8 @@
tMCA_CB mca_cb;
/*****************************************************************************
-** constants
-*****************************************************************************/
+ * constants
+ ****************************************************************************/
/* table of standard opcode message size */
const uint8_t mca_std_msg_len[MCA_NUM_STANDARD_OPCODE] = {
@@ -54,15 +54,15 @@
/*******************************************************************************
-**
-** Function mca_handle_by_cpsm
-**
-** Description This function returns the handle for the given control
-** channel PSM. 0, if not found.
-**
-** Returns the MCA handle.
-**
-*******************************************************************************/
+ *
+ * Function mca_handle_by_cpsm
+ *
+ * Description This function returns the handle for the given control
+ * channel PSM. 0, if not found.
+ *
+ * Returns the MCA handle.
+ *
+ ******************************************************************************/
tMCA_HANDLE mca_handle_by_cpsm(uint16_t psm)
{
int i;
@@ -81,15 +81,15 @@
}
/*******************************************************************************
-**
-** Function mca_handle_by_dpsm
-**
-** Description This function returns the handle for the given data
-** channel PSM. 0, if not found.
-**
-** Returns the MCA handle.
-**
-*******************************************************************************/
+ *
+ * Function mca_handle_by_dpsm
+ *
+ * Description This function returns the handle for the given data
+ * channel PSM. 0, if not found.
+ *
+ * Returns the MCA handle.
+ *
+ ******************************************************************************/
tMCA_HANDLE mca_handle_by_dpsm(uint16_t psm)
{
int i;
@@ -108,15 +108,15 @@
}
/*******************************************************************************
-**
-** Function mca_tc_tbl_calloc
-**
-** Description This function allocates a transport table for the given
-** control channel.
-**
-** Returns The tranport table.
-**
-*******************************************************************************/
+ *
+ * Function mca_tc_tbl_calloc
+ *
+ * Description This function allocates a transport table for the given
+ * control channel.
+ *
+ * Returns The tranport table.
+ *
+ ******************************************************************************/
tMCA_TC_TBL * mca_tc_tbl_calloc(tMCA_CCB *p_ccb)
{
tMCA_TC_TBL *p_tbl = mca_cb.tc.tc_tbl;
@@ -149,15 +149,15 @@
}
/*******************************************************************************
-**
-** Function mca_tc_tbl_dalloc
-**
-** Description This function allocates a transport table for the given
-** data channel.
-**
-** Returns The tranport table.
-**
-*******************************************************************************/
+ *
+ * Function mca_tc_tbl_dalloc
+ *
+ * Description This function allocates a transport table for the given
+ * data channel.
+ *
+ * Returns The tranport table.
+ *
+ ******************************************************************************/
tMCA_TC_TBL * mca_tc_tbl_dalloc(tMCA_DCB *p_dcb)
{
tMCA_TC_TBL *p_tbl = mca_cb.tc.tc_tbl;
@@ -190,15 +190,15 @@
}
/*******************************************************************************
-**
-** Function mca_tc_tbl_by_lcid
-**
-** Description Find the transport channel table entry by LCID.
-**
-**
-** Returns The tranport table.
-**
-*******************************************************************************/
+ *
+ * Function mca_tc_tbl_by_lcid
+ *
+ * Description Find the transport channel table entry by LCID.
+ *
+ *
+ * Returns The tranport table.
+ *
+ ******************************************************************************/
tMCA_TC_TBL *mca_tc_tbl_by_lcid(uint16_t lcid)
{
uint8_t idx;
@@ -216,15 +216,15 @@
}
/*******************************************************************************
-**
-** Function mca_free_tc_tbl_by_lcid
-**
-** Description Find the transport table entry by LCID
-** and free the tc_tbl
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_free_tc_tbl_by_lcid
+ *
+ * Description Find the transport table entry by LCID
+ * and free the tc_tbl
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_free_tc_tbl_by_lcid(uint16_t lcid)
{
uint8_t idx;
@@ -242,14 +242,14 @@
/*******************************************************************************
-**
-** Function mca_set_cfg_by_tbl
-**
-** Description Set the L2CAP configuration information
-**
-** Returns none.
-**
-*******************************************************************************/
+ *
+ * Function mca_set_cfg_by_tbl
+ *
+ * Description Set the L2CAP configuration information
+ *
+ * Returns none.
+ *
+ ******************************************************************************/
void mca_set_cfg_by_tbl(tL2CAP_CFG_INFO *p_cfg, tMCA_TC_TBL *p_tbl)
{
tMCA_DCB *p_dcb;
@@ -282,18 +282,18 @@
}
/*******************************************************************************
-**
-** Function mca_tc_close_ind
-**
-** Description This function is called by the L2CAP interface when the
-** L2CAP channel is closed. It looks up the CCB or DCB for
-** the channel and sends it a close event. The reason
-** parameter is the same value passed by the L2CAP
-** callback function.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function mca_tc_close_ind
+ *
+ * Description This function is called by the L2CAP interface when the
+ * L2CAP channel is closed. It looks up the CCB or DCB for
+ * the channel and sends it a close event. The reason
+ * parameter is the same value passed by the L2CAP
+ * callback function.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void mca_tc_close_ind(tMCA_TC_TBL *p_tbl, uint16_t reason)
{
tMCA_CCB *p_ccb;
@@ -337,16 +337,16 @@
}
/*******************************************************************************
-**
-** Function mca_tc_open_ind
-**
-** Description This function is called by the L2CAP interface when
-** the L2CAP channel is opened. It looks up the CCB or DCB
-** for the channel and sends it an open event.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function mca_tc_open_ind
+ *
+ * Description This function is called by the L2CAP interface when
+ * the L2CAP channel is opened. It looks up the CCB or DCB
+ * for the channel and sends it an open event.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void mca_tc_open_ind(tMCA_TC_TBL *p_tbl)
{
tMCA_CCB *p_ccb;
@@ -389,19 +389,19 @@
/*******************************************************************************
-**
-** Function mca_tc_cong_ind
-**
-** Description This function is called by the L2CAP interface layer when
-** L2CAP calls the congestion callback. It looks up the CCB
-** or DCB 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.
-**
-*******************************************************************************/
+ *
+ * Function mca_tc_cong_ind
+ *
+ * Description This function is called by the L2CAP interface layer when
+ * L2CAP calls the congestion callback. It looks up the CCB
+ * or DCB 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.
+ *
+ ******************************************************************************/
void mca_tc_cong_ind(tMCA_TC_TBL *p_tbl, bool is_congested)
{
tMCA_CCB *p_ccb;
@@ -429,16 +429,16 @@
/*******************************************************************************
-**
-** Function mca_tc_data_ind
-**
-** Description This function is called by the L2CAP interface layer when
-** incoming data is received from L2CAP. It looks up the CCB
-** or DCB for the channel and routes the data accordingly.
-**
-** Returns Nothing.
-**
-*******************************************************************************/
+ *
+ * Function mca_tc_data_ind
+ *
+ * Description This function is called by the L2CAP interface layer when
+ * incoming data is received from L2CAP. It looks up the CCB
+ * or DCB for the channel and routes the data accordingly.
+ *
+ * Returns Nothing.
+ *
+ ******************************************************************************/
void mca_tc_data_ind(tMCA_TC_TBL *p_tbl, BT_HDR *p_buf)
{
tMCA_CCB *p_ccb;
@@ -504,15 +504,15 @@
}
/*******************************************************************************
-**
-** Function mca_rcb_alloc
-**
-** Description This function allocates a registration control block.
-** If no free RCB is available, it returns NULL.
-**
-** Returns tMCA_RCB *
-**
-*******************************************************************************/
+ *
+ * Function mca_rcb_alloc
+ *
+ * Description This function allocates a registration control block.
+ * If no free RCB is available, it returns NULL.
+ *
+ * Returns tMCA_RCB *
+ *
+ ******************************************************************************/
tMCA_RCB * mca_rcb_alloc(tMCA_REG *p_reg)
{
int i;
@@ -531,14 +531,14 @@
}
/*******************************************************************************
-**
-** Function mca_rcb_dealloc
-**
-** Description This function deallocates the RCB with the given handle.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_rcb_dealloc
+ *
+ * Description This function deallocates the RCB with the given handle.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void mca_rcb_dealloc(tMCA_HANDLE handle)
{
int i;
@@ -573,31 +573,31 @@
}
/*******************************************************************************
-**
-** Function mca_rcb_to_handle
-**
-** Description This function converts a pointer to an RCB to
-** a handle (tMCA_HANDLE). It returns the handle.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function mca_rcb_to_handle
+ *
+ * Description This function converts a pointer to an RCB to
+ * a handle (tMCA_HANDLE). It returns the handle.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
tMCA_HANDLE mca_rcb_to_handle(tMCA_RCB *p_rcb)
{
return(uint8_t) (p_rcb - mca_cb.rcb + 1);
}
/*******************************************************************************
-**
-** Function mca_rcb_by_handle
-**
-** Description This function finds the RCB for a handle (tMCA_HANDLE).
-** It returns a pointer to the RCB. If no RCB matches the
-** handle it returns NULL.
-**
-** Returns tMCA_RCB *
-**
-*******************************************************************************/
+ *
+ * Function mca_rcb_by_handle
+ *
+ * Description This function finds the RCB for a handle (tMCA_HANDLE).
+ * It returns a pointer to the RCB. If no RCB matches the
+ * handle it returns NULL.
+ *
+ * Returns tMCA_RCB *
+ *
+ ******************************************************************************/
tMCA_RCB *mca_rcb_by_handle(tMCA_HANDLE handle)
{
tMCA_RCB *p_rcb = NULL;
@@ -610,14 +610,14 @@
}
/*******************************************************************************
-**
-** Function mca_is_valid_dep_id
-**
-** Description This function checks if the given dep_id is valid.
-**
-** Returns true, if this is a valid local dep_id
-**
-*******************************************************************************/
+ *
+ * Function mca_is_valid_dep_id
+ *
+ * Description This function checks if the given dep_id is valid.
+ *
+ * Returns true, if this is a valid local dep_id
+ *
+ ******************************************************************************/
bool mca_is_valid_dep_id(tMCA_RCB *p_rcb, tMCA_DEP dep)
{
bool valid = false;
diff --git a/stack/pan/pan_api.cc b/stack/pan/pan_api.cc
index 19da970..412caa7 100644
--- a/stack/pan/pan_api.cc
+++ b/stack/pan/pan_api.cc
@@ -38,19 +38,19 @@
/*******************************************************************************
-**
-** Function PAN_Register
-**
-** Description This function is called by the application to register
-** its callbacks with PAN profile. The application then
-** should set the PAN role explicitly.
-**
-** Parameters: p_register - contains all callback function pointers
-**
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function PAN_Register
+ *
+ * Description This function is called by the application to register
+ * its callbacks with PAN profile. The application then
+ * should set the PAN role explicitly.
+ *
+ * Parameters: p_register - contains all callback function pointers
+ *
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void PAN_Register (tPAN_REGISTER *p_register)
{
BTM_SetDiscoverability (BTM_GENERAL_DISCOVERABLE, 0, 0);
@@ -75,20 +75,20 @@
/*******************************************************************************
-**
-** Function PAN_Deregister
-**
-** Description This function is called by the application to de-register
-** its callbacks with PAN profile. This will make the PAN to
-** become inactive. This will deregister PAN services from SDP
-** and close all active connections
-**
-** Parameters: none
-**
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function PAN_Deregister
+ *
+ * Description This function is called by the application to de-register
+ * its callbacks with PAN profile. This will make the PAN to
+ * become inactive. This will deregister PAN services from SDP
+ * and close all active connections
+ *
+ * Parameters: none
+ *
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void PAN_Deregister (void)
{
pan_cb.pan_bridge_req_cb = NULL;
@@ -108,29 +108,29 @@
/*******************************************************************************
-**
-** Function PAN_SetRole
-**
-** Description This function is called by the application to set the PAN
-** profile role. This should be called after PAN_Register.
-** This can be called any time to change the PAN role
-**
-** Parameters: role - is bit map of roles to be active
-** PAN_ROLE_CLIENT is for PANU role
-** PAN_ROLE_GN_SERVER is for GN role
-** PAN_ROLE_NAP_SERVER is for NAP role
-** sec_mask - Security mask for different roles
-** It is array of uint8_t. The byte represent the
-** security for roles PANU, GN and NAP in order
-** p_user_name - Service name for PANU role
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_SetRole
+ *
+ * Description This function is called by the application to set the PAN
+ * profile role. This should be called after PAN_Register.
+ * This can be called any time to change the PAN role
+ *
+ * Parameters: role - is bit map of roles to be active
+ * PAN_ROLE_CLIENT is for PANU role
+ * PAN_ROLE_GN_SERVER is for GN role
+ * PAN_ROLE_NAP_SERVER is for NAP role
+ * sec_mask - Security mask for different roles
+ * It is array of uint8_t. The byte represent the
+ * security for roles PANU, GN and NAP in order
+ * p_user_name - Service name for PANU role
+ * 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
+ *
+ ******************************************************************************/
tPAN_RESULT PAN_SetRole (uint8_t role,
uint8_t *sec_mask,
const char *p_user_name,
@@ -260,28 +260,28 @@
/*******************************************************************************
-**
-** Function PAN_Connect
-**
-** 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
-** src_role - Role of the local device for the connection
-** dst_role - Role of the remote device for the connection
-** PAN_ROLE_CLIENT is for PANU 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
-** this can be because of the combination of
-** src and dst roles may not be valid or
-** allowed at that point of time
-**
-*******************************************************************************/
+ *
+ * Function PAN_Connect
+ *
+ * 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
+ * src_role - Role of the local device for the connection
+ * dst_role - Role of the remote device for the connection
+ * PAN_ROLE_CLIENT is for PANU 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
+ * this can be because of the combination of
+ * src and dst roles may not be valid or
+ * allowed at that point of time
+ *
+ ******************************************************************************/
tPAN_RESULT PAN_Connect (BD_ADDR rem_bda, uint8_t src_role, uint8_t dst_role, uint16_t *handle)
{
tPAN_CONN *pcb;
@@ -422,18 +422,18 @@
/*******************************************************************************
-**
-** Function PAN_Disconnect
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_Disconnect
+ *
+ * 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
+ *
+ ******************************************************************************/
tPAN_RESULT PAN_Disconnect (uint16_t handle)
{
tPAN_CONN *pcb;
@@ -468,27 +468,27 @@
/*******************************************************************************
-**
-** Function PAN_Write
-**
-** Description This sends data over the PAN connections. If this is called
-** on GN or NAP side and the packet is multicast or broadcast
-** it will be sent on all the links. Otherwise the correct link
-** is found based on the destination address and forwarded on it.
-**
-** Parameters: handle - handle for the connection
-** dst - MAC or BD Addr of the destination device
-** src - MAC or BD Addr of the source who sent this packet
-** protocol - protocol of the ethernet packet like IP or ARP
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_Write
+ *
+ * Description This sends data over the PAN connections. If this is called
+ * on GN or NAP side and the packet is multicast or broadcast
+ * it will be sent on all the links. Otherwise the correct link
+ * is found based on the destination address and forwarded on it.
+ *
+ * Parameters: handle - handle for the connection
+ * dst - MAC or BD Addr of the destination device
+ * src - MAC or BD Addr of the source who sent this packet
+ * protocol - protocol of the ethernet packet like IP or ARP
+ * 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
+ *
+ ******************************************************************************/
tPAN_RESULT PAN_Write(uint16_t handle, BD_ADDR dst, BD_ADDR src, uint16_t protocol, uint8_t *p_data, uint16_t len, bool ext)
{
if (pan_cb.role == PAN_ROLE_INACTIVE || !pan_cb.num_conns) {
@@ -519,28 +519,28 @@
/*******************************************************************************
-**
-** Function PAN_WriteBuf
-**
-** Description This sends data over the PAN connections. If this is called
-** on GN or NAP side and the packet is multicast or broadcast
-** it will be sent on all the links. Otherwise the correct link
-** is found based on the destination address and forwarded on it
-** If the return value is not PAN_SUCCESS the application should
-** take care of releasing the message buffer
-**
-** Parameters: handle - handle for the connection
-** dst - MAC or BD Addr of the destination device
-** src - MAC or BD Addr of the source who sent this packet
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_WriteBuf
+ *
+ * Description This sends data over the PAN connections. If this is called
+ * on GN or NAP side and the packet is multicast or broadcast
+ * it will be sent on all the links. Otherwise the correct link
+ * is found based on the destination address and forwarded on it
+ * If the return value is not PAN_SUCCESS the application should
+ * take care of releasing the message buffer
+ *
+ * Parameters: handle - handle for the connection
+ * dst - MAC or BD Addr of the destination device
+ * src - MAC or BD Addr of the source who sent this packet
+ * 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
+ *
+ ******************************************************************************/
tPAN_RESULT PAN_WriteBuf (uint16_t handle, BD_ADDR dst, BD_ADDR src, uint16_t protocol, BT_HDR *p_buf, bool ext)
{
tPAN_CONN *pcb;
@@ -634,21 +634,21 @@
/*******************************************************************************
-**
-** Function PAN_SetProtocolFilters
-**
-** Description This function is used to set protocol filters on the peer
-**
-** Parameters: handle - handle for the connection
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_SetProtocolFilters
+ *
+ * Description This function is used to set protocol filters on the peer
+ *
+ * Parameters: handle - handle for the connection
+ * 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
+ *
+ ******************************************************************************/
tPAN_RESULT PAN_SetProtocolFilters (uint16_t handle,
uint16_t num_filters,
uint16_t *p_start_array,
@@ -679,21 +679,21 @@
/*******************************************************************************
-**
-** Function PAN_SetMulticastFilters
-**
-** Description This function is used to set multicast filters on the peer
-**
-** Parameters: handle - handle for the connection
-** 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
-**
-*******************************************************************************/
+ *
+ * Function PAN_SetMulticastFilters
+ *
+ * Description This function is used to set multicast filters on the peer
+ *
+ * Parameters: handle - handle for the connection
+ * 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
+ *
+ ******************************************************************************/
tBNEP_RESULT PAN_SetMulticastFilters (uint16_t handle,
uint16_t num_mcast_filters,
uint8_t *p_start_array,
@@ -724,15 +724,15 @@
/*******************************************************************************
-**
-** Function PAN_SetTraceLevel
-**
-** Description This function sets the trace level for PAN. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function PAN_SetTraceLevel
+ *
+ * Description This function sets the trace level for PAN. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
uint8_t PAN_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
@@ -744,16 +744,16 @@
}
/*******************************************************************************
-**
-** Function PAN_Init
-**
-** Description This function initializes the PAN module variables
-**
-** Parameters: none
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function PAN_Init
+ *
+ * Description This function initializes the PAN module variables
+ *
+ * Parameters: none
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void PAN_Init (void)
{
memset (&pan_cb, 0, sizeof (tPAN_CB));
diff --git a/stack/pan/pan_int.h b/stack/pan/pan_int.h
index 7779724..6622774 100644
--- a/stack/pan/pan_int.h
+++ b/stack/pan/pan_int.h
@@ -32,8 +32,8 @@
#endif
/*
-** This role is used to shutdown the profile. Used internally
-** Applications should call PAN_Deregister to shutdown the profile
+ * This role is used to shutdown the profile. Used internally
+ * Applications should call PAN_Deregister to shutdown the profile
*/
#define PAN_ROLE_INACTIVE 0
@@ -100,7 +100,7 @@
*/
extern tPAN_CB pan_cb;
-/*******************************************************************************/
+/******************************************************************************/
extern void pan_register_with_bnep (void);
extern void pan_conn_ind_cb (uint16_t handle,
BD_ADDR p_bda,
@@ -142,7 +142,7 @@
extern void pan_release_pcb (tPAN_CONN *p_pcb);
extern void pan_dump_status (void);
-/********************************************************************************/
+/******************************************************************************/
#ifdef __cplusplus
}
diff --git a/stack/pan/pan_main.cc b/stack/pan/pan_main.cc
index a73cfd8..8e563de 100644
--- a/stack/pan/pan_main.cc
+++ b/stack/pan/pan_main.cc
@@ -44,16 +44,16 @@
/*******************************************************************************
-**
-** Function pan_register_with_bnep
-**
-** Description This function registers PAN profile with BNEP
-**
-** Parameters: none
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function pan_register_with_bnep
+ *
+ * Description This function registers PAN profile with BNEP
+ *
+ * Parameters: none
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void pan_register_with_bnep (void)
{
tBNEP_REGISTER reg_info;
@@ -73,23 +73,23 @@
/*******************************************************************************
-**
-** Function pan_conn_ind_cb
-**
-** Description This function is registered with BNEP as connection indication
-** callback. BNEP will call this when there is connection
-** request from the peer. PAN should call BNEP_ConnectResp to
-** indicate whether to accept the connection or reject
-**
-** Parameters: handle - handle for the connection
-** p_bda - BD Addr of the peer requesting the connection
-** 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
-**
-*******************************************************************************/
+ *
+ * Function pan_conn_ind_cb
+ *
+ * Description This function is registered with BNEP as connection indication
+ * callback. BNEP will call this when there is connection
+ * request from the peer. PAN should call BNEP_ConnectResp to
+ * indicate whether to accept the connection or reject
+ *
+ * Parameters: handle - handle for the connection
+ * p_bda - BD Addr of the peer requesting the connection
+ * 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
+ *
+ ******************************************************************************/
void pan_conn_ind_cb (uint16_t handle,
BD_ADDR p_bda,
tBT_UUID *remote_uuid,
@@ -309,24 +309,24 @@
/*******************************************************************************
-**
-** Function pan_connect_state_cb
-**
-** Description This function is registered with BNEP as connection state
-** change callback. BNEP will call this when the connection
-** is established successfully or terminated
-**
-** Parameters: handle - handle for the connection given in the connection
-** indication callback
-** rem_bda - remote device bd addr
-** result - indicates whether the connection is up or down
-** BNEP_SUCCESS if the connection is up
-** all other values indicates appropriate errors
-** is_role_change - flag to indicate that it is a role change
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function pan_connect_state_cb
+ *
+ * Description This function is registered with BNEP as connection state
+ * change callback. BNEP will call this when the connection
+ * is established successfully or terminated
+ *
+ * Parameters: handle - handle for the connection given in the connection
+ * indication callback
+ * rem_bda - remote device bd addr
+ * result - indicates whether the connection is up or down
+ * BNEP_SUCCESS if the connection is up
+ * all other values indicates appropriate errors
+ * is_role_change - flag to indicate that it is a role change
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void pan_connect_state_cb (uint16_t handle,
UNUSED_ATTR BD_ADDR rem_bda, tBNEP_RESULT result,
bool is_role_change)
@@ -411,25 +411,25 @@
/*******************************************************************************
-**
-** Function pan_data_ind_cb
-**
-** Description This function is registered with BNEP as data indication
-** callback. BNEP will call this when the peer sends any data
-** on this connection
-**
-** Parameters: handle - handle for the connection
-** src - source BD Addr
-** dst - destination BD Addr
-** protocol - Network protocol of the Eth packet
-** p_data - pointer to the data
-** len - length of the data
-** fw_ext_present - to indicate whether the data contains any
-** extension headers before the payload
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function pan_data_ind_cb
+ *
+ * Description This function is registered with BNEP as data indication
+ * callback. BNEP will call this when the peer sends any data
+ * on this connection
+ *
+ * Parameters: handle - handle for the connection
+ * src - source BD Addr
+ * dst - destination BD Addr
+ * protocol - Network protocol of the Eth packet
+ * p_data - pointer to the data
+ * len - length of the data
+ * fw_ext_present - to indicate whether the data contains any
+ * extension headers before the payload
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void pan_data_ind_cb (uint16_t handle,
uint8_t *src,
uint8_t *dst,
@@ -517,24 +517,24 @@
/*******************************************************************************
-**
-** Function pan_data_buf_ind_cb
-**
-** Description This function is registered with BNEP as data buffer indication
-** callback. BNEP will call this when the peer sends any data
-** on this connection. PAN is responsible to release the buffer
-**
-** Parameters: handle - handle for the connection
-** src - source BD Addr
-** dst - destination BD Addr
-** protocol - Network protocol of the Eth packet
-** p_buf - pointer to the data buffer
-** ext - to indicate whether the data contains any
-** extension headers before the payload
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function pan_data_buf_ind_cb
+ *
+ * Description This function is registered with BNEP as data buffer indication
+ * callback. BNEP will call this when the peer sends any data
+ * on this connection. PAN is responsible to release the buffer
+ *
+ * Parameters: handle - handle for the connection
+ * src - source BD Addr
+ * dst - destination BD Addr
+ * protocol - Network protocol of the Eth packet
+ * p_buf - pointer to the data buffer
+ * ext - to indicate whether the data contains any
+ * extension headers before the payload
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void pan_data_buf_ind_cb (uint16_t handle,
uint8_t *src,
uint8_t *dst,
@@ -634,18 +634,18 @@
}
/*******************************************************************************
-**
-** Function pan_proto_filt_ind_cb
-**
-** Description This function is registered with BNEP to receive tx data
-** flow status
-**
-** Parameters: handle - handle for the connection
-** event - flow status
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function pan_proto_filt_ind_cb
+ *
+ * Description This function is registered with BNEP to receive tx data
+ * flow status
+ *
+ * Parameters: handle - handle for the connection
+ * event - flow status
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void pan_tx_data_flow_cb (uint16_t handle,
tBNEP_RESULT event)
{
@@ -657,25 +657,25 @@
}
/*******************************************************************************
-**
-** Function pan_proto_filt_ind_cb
-**
-** Description This function is registered with BNEP as proto filter indication
-** callback. BNEP will call this when the peer sends any protocol
-** filter set for the connection or to indicate the result of the
-** protocol filter set by the local device
-**
-** Parameters: handle - handle for the connection
-** indication - true if this is indication
-** false if it is called to give the result of local
-** device protocol filter set
-** result - This gives the result of the filter set operation
-** num_filters - number of filters set by the peer device
-** p_filters - pointer to the filters set by the peer device
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function pan_proto_filt_ind_cb
+ *
+ * Description This function is registered with BNEP as proto filter indication
+ * callback. BNEP will call this when the peer sends any protocol
+ * filter set for the connection or to indicate the result of the
+ * protocol filter set by the local device
+ *
+ * Parameters: handle - handle for the connection
+ * indication - true if this is indication
+ * false if it is called to give the result of local
+ * device protocol filter set
+ * result - This gives the result of the filter set operation
+ * num_filters - number of filters set by the peer device
+ * p_filters - pointer to the filters set by the peer device
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void pan_proto_filt_ind_cb (uint16_t handle,
bool indication,
tBNEP_RESULT result,
@@ -691,25 +691,25 @@
/*******************************************************************************
-**
-** Function pan_mcast_filt_ind_cb
-**
-** Description This function is registered with BNEP as mcast filter indication
-** callback. BNEP will call this when the peer sends any multicast
-** filter set for the connection or to indicate the result of the
-** multicast filter set by the local device
-**
-** Parameters: handle - handle for the connection
-** indication - true if this is indication
-** false if it is called to give the result of local
-** device multicast filter set
-** result - This gives the result of the filter set operation
-** num_filters - number of filters set by the peer device
-** p_filters - pointer to the filters set by the peer device
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function pan_mcast_filt_ind_cb
+ *
+ * Description This function is registered with BNEP as mcast filter indication
+ * callback. BNEP will call this when the peer sends any multicast
+ * filter set for the connection or to indicate the result of the
+ * multicast filter set by the local device
+ *
+ * Parameters: handle - handle for the connection
+ * indication - true if this is indication
+ * false if it is called to give the result of local
+ * device multicast filter set
+ * result - This gives the result of the filter set operation
+ * num_filters - number of filters set by the peer device
+ * p_filters - pointer to the filters set by the peer device
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void pan_mcast_filt_ind_cb (uint16_t handle,
bool indication,
tBNEP_RESULT result,
diff --git a/stack/pan/pan_utils.cc b/stack/pan/pan_utils.cc
index 3a5d030..ccf34e9 100644
--- a/stack/pan/pan_utils.cc
+++ b/stack/pan/pan_utils.cc
@@ -50,14 +50,14 @@
};
/*******************************************************************************
-**
-** Function pan_register_with_sdp
-**
-** Description
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function pan_register_with_sdp
+ *
+ * Description
+ *
+ * Returns
+ *
+ ******************************************************************************/
uint32_t pan_register_with_sdp (uint16_t uuid, uint8_t sec_mask,
const char *p_name, const char *p_desc)
{
@@ -165,14 +165,14 @@
/*******************************************************************************
-**
-** Function pan_allocate_pcb
-**
-** Description
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function pan_allocate_pcb
+ *
+ * Description
+ *
+ * Returns
+ *
+ ******************************************************************************/
tPAN_CONN *pan_allocate_pcb (BD_ADDR p_bda, uint16_t handle)
{
uint16_t i;
@@ -206,14 +206,14 @@
/*******************************************************************************
-**
-** Function pan_get_pcb_by_handle
-**
-** Description
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function pan_get_pcb_by_handle
+ *
+ * Description
+ *
+ * Returns
+ *
+ ******************************************************************************/
tPAN_CONN *pan_get_pcb_by_handle (uint16_t handle)
{
uint16_t i;
@@ -230,14 +230,14 @@
/*******************************************************************************
-**
-** Function pan_get_pcb_by_addr
-**
-** Description
-**
-** Returns
-**
-*******************************************************************************/
+ *
+ * Function pan_get_pcb_by_addr
+ *
+ * Description
+ *
+ * Returns
+ *
+ ******************************************************************************/
tPAN_CONN *pan_get_pcb_by_addr (BD_ADDR p_bda)
{
uint16_t i;
@@ -264,14 +264,14 @@
/*******************************************************************************
-**
-** Function pan_close_all_connections
-**
-** Description
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function pan_close_all_connections
+ *
+ * Description
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void pan_close_all_connections (void)
{
uint16_t i;
@@ -292,14 +292,14 @@
/*******************************************************************************
-**
-** Function pan_release_pcb
-**
-** Description This function releases a PCB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function pan_release_pcb
+ *
+ * Description This function releases a PCB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void pan_release_pcb (tPAN_CONN *p_pcb)
{
/* Drop any response pointer we may be holding */
@@ -309,15 +309,15 @@
/*******************************************************************************
-**
-** Function pan_dump_status
-**
-** Description This function dumps the pan control block and connection
-** blocks information
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function pan_dump_status
+ *
+ * Description This function dumps the pan control block and connection
+ * blocks information
+ *
+ * Returns none
+ *
+ ******************************************************************************/
void pan_dump_status (void)
{
#if (PAN_SUPPORTS_DEBUG_DUMP == TRUE)
diff --git a/stack/rfcomm/port_api.cc b/stack/rfcomm/port_api.cc
index 3b6f773..cfec6a8 100644
--- a/stack/rfcomm/port_api.cc
+++ b/stack/rfcomm/port_api.cc
@@ -79,36 +79,36 @@
};
/*******************************************************************************
-**
-** Function RFCOMM_CreateConnection
-**
-** Description RFCOMM_CreateConnection function is used from the application
-** to establish serial port connection to the peer device,
-** or allow RFCOMM to accept a connection from the peer
-** application.
-**
-** Parameters: scn - Service Channel Number as registered with
-** the SDP (server) or obtained using SDP from
-** the peer device (client).
-** is_server - true if requesting application is a server
-** mtu - Maximum frame size the application can accept
-** bd_addr - BD_ADDR of the peer (client)
-** mask - specifies events to be enabled. A value
-** of zero disables all events.
-** p_handle - OUT pointer to the handle.
-** p_mgmt_cb - pointer to callback function to receive
-** connection up/down events.
-** Notes:
-**
-** Server can call this function with the same scn parameter multiple times if
-** it is ready to accept multiple simulteneous connections.
-**
-** DLCI for the connection is (scn * 2 + 1) if client originates connection on
-** existing none initiator multiplexer channel. Otherwise it is (scn * 2).
-** For the server DLCI can be changed later if client will be calling it using
-** (scn * 2 + 1) dlci.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_CreateConnection
+ *
+ * Description RFCOMM_CreateConnection function is used from the application
+ * to establish serial port connection to the peer device,
+ * or allow RFCOMM to accept a connection from the peer
+ * application.
+ *
+ * Parameters: scn - Service Channel Number as registered with
+ * the SDP (server) or obtained using SDP from
+ * the peer device (client).
+ * is_server - true if requesting application is a server
+ * mtu - Maximum frame size the application can accept
+ * bd_addr - BD_ADDR of the peer (client)
+ * mask - specifies events to be enabled. A value
+ * of zero disables all events.
+ * p_handle - OUT pointer to the handle.
+ * p_mgmt_cb - pointer to callback function to receive
+ * connection up/down events.
+ * Notes:
+ *
+ * Server can call this function with the same scn parameter multiple times if
+ * it is ready to accept multiple simulteneous connections.
+ *
+ * DLCI for the connection is (scn * 2 + 1) if client originates connection on
+ * existing none initiator multiplexer channel. Otherwise it is (scn * 2).
+ * For the server DLCI can be changed later if client will be calling it using
+ * (scn * 2 + 1) dlci.
+ *
+ ******************************************************************************/
int RFCOMM_CreateConnection (uint16_t uuid, uint8_t scn, bool is_server,
uint16_t mtu, BD_ADDR bd_addr, uint16_t *p_handle,
tPORT_CALLBACK *p_mgmt_cb)
@@ -234,14 +234,14 @@
}
/*******************************************************************************
-**
-** Function RFCOMM_RemoveConnection
-**
-** Description This function is called to close the specified connection.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_RemoveConnection
+ *
+ * Description This function is called to close the specified connection.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ *
+ ******************************************************************************/
int RFCOMM_RemoveConnection (uint16_t handle)
{
tPORT *p_port;
@@ -271,14 +271,14 @@
}
/*******************************************************************************
-**
-** Function RFCOMM_RemoveServer
-**
-** Description This function is called to close the server port.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_RemoveServer
+ *
+ * Description This function is called to close the server port.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ *
+ ******************************************************************************/
int RFCOMM_RemoveServer (uint16_t handle)
{
tPORT *p_port;
@@ -312,20 +312,20 @@
}
/*******************************************************************************
-**
-** Function PORT_SetEventCallback
-**
-** Description This function is called to provide an address of the
-** function which will be called when one of the events
-** specified in the mask occures.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_callback - address of the callback function which should
-** be called from the RFCOMM when an event
-** specified in the mask occures.
-**
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetEventCallback
+ *
+ * Description This function is called to provide an address of the
+ * function which will be called when one of the events
+ * specified in the mask occures.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_callback - address of the callback function which should
+ * be called from the RFCOMM when an event
+ * specified in the mask occures.
+ *
+ *
+ ******************************************************************************/
int PORT_SetEventCallback (uint16_t port_handle, tPORT_CALLBACK *p_port_cb)
{
tPORT *p_port;
@@ -350,14 +350,14 @@
return (PORT_SUCCESS);
}
/*******************************************************************************
-**
-** Function PORT_ClearKeepHandleFlag
-**
-** Description This function is called to clear the keep handle flag
-** which will cause not to keep the port handle open when closed
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-**
-*******************************************************************************/
+ *
+ * Function PORT_ClearKeepHandleFlag
+ *
+ * Description This function is called to clear the keep handle flag
+ * which will cause not to keep the port handle open when closed
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ *
+ ******************************************************************************/
int PORT_ClearKeepHandleFlag (uint16_t port_handle)
{
@@ -375,18 +375,18 @@
}
/*******************************************************************************
-**
-** Function PORT_SetDataCallback
-**
-** Description This function is when a data packet is received
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_callback - address of the callback function which should
-** be called from the RFCOMM when data packet
-** is received.
-**
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetDataCallback
+ *
+ * Description This function is when a data packet is received
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_callback - address of the callback function which should
+ * be called from the RFCOMM when data packet
+ * is received.
+ *
+ *
+ ******************************************************************************/
int PORT_SetDataCallback (uint16_t port_handle, tPORT_DATA_CALLBACK *p_port_cb)
{
tPORT *p_port;
@@ -411,18 +411,18 @@
return (PORT_SUCCESS);
}
/*******************************************************************************
-**
-** Function PORT_SetCODataCallback
-**
-** Description This function is when a data packet is received
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_callback - address of the callback function which should
-** be called from the RFCOMM when data packet
-** is received.
-**
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetCODataCallback
+ *
+ * Description This function is when a data packet is received
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_callback - address of the callback function which should
+ * be called from the RFCOMM when data packet
+ * is received.
+ *
+ *
+ ******************************************************************************/
int PORT_SetDataCOCallback (uint16_t port_handle, tPORT_DATA_CO_CALLBACK *p_port_cb)
{
tPORT *p_port;
@@ -448,15 +448,15 @@
}
/*******************************************************************************
-**
-** Function PORT_SetEventMask
-**
-** Description This function is called to close the specified connection.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** mask - Bitmask of the events the host is interested in
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetEventMask
+ *
+ * Description This function is called to close the specified connection.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * mask - Bitmask of the events the host is interested in
+ *
+ ******************************************************************************/
int PORT_SetEventMask (uint16_t port_handle, uint32_t mask)
{
tPORT *p_port;
@@ -482,17 +482,17 @@
}
/*******************************************************************************
-**
-** Function PORT_CheckConnection
-**
-** Description This function returns PORT_SUCCESS if connection referenced
-** by handle is up and running
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** bd_addr - OUT bd_addr of the peer
-** p_lcid - OUT L2CAP's LCID
-**
-*******************************************************************************/
+ *
+ * Function PORT_CheckConnection
+ *
+ * Description This function returns PORT_SUCCESS if connection referenced
+ * by handle is up and running
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * bd_addr - OUT bd_addr of the peer
+ * p_lcid - OUT L2CAP's LCID
+ *
+ ******************************************************************************/
int PORT_CheckConnection (uint16_t handle, BD_ADDR bd_addr, uint16_t *p_lcid)
{
tPORT *p_port;
@@ -527,16 +527,16 @@
}
/*******************************************************************************
-**
-** Function PORT_IsOpening
-**
-** Description This function returns true if there is any RFCOMM connection
-** opening in process.
-**
-** Parameters: true if any connection opening is found
-** bd_addr - bd_addr of the peer
-**
-*******************************************************************************/
+ *
+ * Function PORT_IsOpening
+ *
+ * Description This function returns true if there is any RFCOMM connection
+ * opening in process.
+ *
+ * Parameters: true if any connection opening is found
+ * bd_addr - bd_addr of the peer
+ *
+ ******************************************************************************/
bool PORT_IsOpening (BD_ADDR bd_addr)
{
uint8_t xx, yy;
@@ -583,18 +583,18 @@
}
/*******************************************************************************
-**
-** Function PORT_SetState
-**
-** Description This function configures connection according to the
-** specifications in the tPORT_STATE structure.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_settings - Pointer to a tPORT_STATE structure containing
-** configuration information for the connection.
-**
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetState
+ *
+ * Description This function configures connection according to the
+ * specifications in the tPORT_STATE structure.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_settings - Pointer to a tPORT_STATE structure containing
+ * configuration information for the connection.
+ *
+ *
+ ******************************************************************************/
int PORT_SetState (uint16_t handle, tPORT_STATE *p_settings)
{
tPORT *p_port;
@@ -635,15 +635,15 @@
}
/*******************************************************************************
-**
-** Function PORT_GetRxQueueCnt
-**
-** Description This function return number of buffers on the rx queue.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_rx_queue_count - Pointer to return queue count in.
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetRxQueueCnt
+ *
+ * Description This function return number of buffers on the rx queue.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_rx_queue_count - Pointer to return queue count in.
+ *
+ ******************************************************************************/
int PORT_GetRxQueueCnt (uint16_t handle, uint16_t *p_rx_queue_count)
{
tPORT *p_port;
@@ -677,17 +677,17 @@
}
/*******************************************************************************
-**
-** Function PORT_GetState
-**
-** Description This function is called to fill tPORT_STATE structure
-** with the curremt control settings for the port
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_settings - Pointer to a tPORT_STATE structure in which
-** configuration information is returned.
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetState
+ *
+ * Description This function is called to fill tPORT_STATE structure
+ * with the curremt control settings for the port
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_settings - Pointer to a tPORT_STATE structure in which
+ * configuration information is returned.
+ *
+ ******************************************************************************/
int PORT_GetState (uint16_t handle, tPORT_STATE *p_settings)
{
tPORT *p_port;
@@ -717,16 +717,16 @@
}
/*******************************************************************************
-**
-** Function PORT_Control
-**
-** Description This function directs a specified connection to pass control
-** control information to the peer device.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** signal = specify the function to be passed
-**
-*******************************************************************************/
+ *
+ * Function PORT_Control
+ *
+ * Description This function directs a specified connection to pass control
+ * control information to the peer device.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * signal = specify the function to be passed
+ *
+ ******************************************************************************/
int PORT_Control (uint16_t handle, uint8_t signal)
{
tPORT *p_port;
@@ -802,17 +802,17 @@
}
/*******************************************************************************
-**
-** Function PORT_FlowControl
-**
-** Description This function directs a specified connection to pass
-** flow control message to the peer device. Enable flag passed
-** shows if port can accept more data.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** enable - enables data flow
-**
-*******************************************************************************/
+ *
+ * Function PORT_FlowControl
+ *
+ * Description This function directs a specified connection to pass
+ * flow control message to the peer device. Enable flag passed
+ * shows if port can accept more data.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * enable - enables data flow
+ *
+ ******************************************************************************/
int PORT_FlowControl (uint16_t handle, bool enable)
{
tPORT *p_port;
@@ -879,18 +879,18 @@
return (PORT_SUCCESS);
}
/*******************************************************************************
-**
-** Function PORT_FlowControl_MaxCredit
-**
-** Description This function directs a specified connection to pass
-** flow control message to the peer device. Enable flag passed
-** shows if port can accept more data. It also sends max credit
-** when data flow enabled
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** enable - enables data flow
-**
-*******************************************************************************/
+ *
+ * Function PORT_FlowControl_MaxCredit
+ *
+ * Description This function directs a specified connection to pass
+ * flow control message to the peer device. Enable flag passed
+ * shows if port can accept more data. It also sends max credit
+ * when data flow enabled
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * enable - enables data flow
+ *
+ ******************************************************************************/
int PORT_FlowControl_MaxCredit (uint16_t handle, bool enable)
{
@@ -959,18 +959,18 @@
}
/*******************************************************************************
-**
-** Function PORT_GetModemStatus
-**
-** Description This function retrieves modem control signals. Normally
-** application will call this function after a callback
-** function is called with notification that one of signals
-** has been changed.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_signal - specify the pointer to control signals info
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetModemStatus
+ *
+ * Description This function retrieves modem control signals. Normally
+ * application will call this function after a callback
+ * function is called with notification that one of signals
+ * has been changed.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_signal - specify the pointer to control signals info
+ *
+ ******************************************************************************/
int PORT_GetModemStatus (uint16_t handle, uint8_t *p_signal)
{
tPORT *p_port;
@@ -995,21 +995,21 @@
}
/*******************************************************************************
-**
-** Function PORT_ClearError
-**
-** Description This function retreives information about a communications
-** error and reports current status of a connection. The
-** function should be called when an error occures to clear
-** the connection error flag and to enable additional read
-** and write operations.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_errors - pointer of the variable to receive error codes
-** p_status - pointer to the tPORT_STATUS structur to receive
-** connection status
-**
-*******************************************************************************/
+ *
+ * Function PORT_ClearError
+ *
+ * Description This function retreives information about a communications
+ * error and reports current status of a connection. The
+ * function should be called when an error occures to clear
+ * the connection error flag and to enable additional read
+ * and write operations.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_errors - pointer of the variable to receive error codes
+ * p_status - pointer to the tPORT_STATUS structur to receive
+ * connection status
+ *
+ ******************************************************************************/
int PORT_ClearError (uint16_t handle, uint16_t *p_errors, tPORT_STATUS *p_status)
{
tPORT *p_port;
@@ -1039,15 +1039,15 @@
}
/*******************************************************************************
-**
-** Function PORT_SendError
-**
-** Description This function send a communications error to the peer device
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** errors - receive error codes
-**
-*******************************************************************************/
+ *
+ * Function PORT_SendError
+ *
+ * Description This function send a communications error to the peer device
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * errors - receive error codes
+ *
+ ******************************************************************************/
int PORT_SendError (uint16_t handle, uint8_t errors)
{
tPORT *p_port;
@@ -1076,16 +1076,16 @@
}
/*******************************************************************************
-**
-** Function PORT_GetQueueStatus
-**
-** Description This function reports current status of a connection.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_status - pointer to the tPORT_STATUS structur to receive
-** connection status
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetQueueStatus
+ *
+ * Description This function reports current status of a connection.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_status - pointer to the tPORT_STATUS structur to receive
+ * connection status
+ *
+ ******************************************************************************/
int PORT_GetQueueStatus (uint16_t handle, tPORT_STATUS *p_status)
{
tPORT *p_port;
@@ -1124,16 +1124,16 @@
}
/*******************************************************************************
-**
-** Function PORT_Purge
-**
-** Description This function discards all the data from the output or
-** input queues of the specified connection.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** purge_flags - specify the action to take.
-**
-*******************************************************************************/
+ *
+ * Function PORT_Purge
+ *
+ * Description This function discards all the data from the output or
+ * input queues of the specified connection.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * purge_flags - specify the action to take.
+ *
+ ******************************************************************************/
int PORT_Purge (uint16_t handle, uint8_t purge_flags)
{
tPORT *p_port;
@@ -1199,18 +1199,18 @@
}
/*******************************************************************************
-**
-** Function PORT_ReadData
-**
-** Description Normally not GKI aware application will call this function
-** after receiving PORT_EV_RXCHAR event.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_data - Data area
-** max_len - Byte count requested
-** p_len - Byte count received
-**
-*******************************************************************************/
+ *
+ * Function PORT_ReadData
+ *
+ * Description Normally not GKI aware application will call this function
+ * after receiving PORT_EV_RXCHAR event.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_data - Data area
+ * max_len - Byte count requested
+ * p_len - Byte count received
+ *
+ ******************************************************************************/
int PORT_ReadData (uint16_t handle, char *p_data, uint16_t max_len, uint16_t *p_len)
{
tPORT *p_port;
@@ -1308,16 +1308,16 @@
}
/*******************************************************************************
-**
-** Function PORT_Read
-**
-** Description Normally application will call this function after receiving
-** PORT_EV_RXCHAR event.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** pp_buf - pointer to address of buffer with data,
-**
-*******************************************************************************/
+ *
+ * Function PORT_Read
+ *
+ * Description Normally application will call this function after receiving
+ * PORT_EV_RXCHAR event.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * pp_buf - pointer to address of buffer with data,
+ *
+ ******************************************************************************/
int PORT_Read (uint16_t handle, BT_HDR **pp_buf)
{
tPORT *p_port;
@@ -1365,16 +1365,16 @@
}
/*******************************************************************************
-**
-** Function port_write
-**
-** Description This function when a data packet is received from the apper
-** layer task.
-**
-** Parameters: p_port - pointer to address of port control block
-** p_buf - pointer to address of buffer with data,
-**
-*******************************************************************************/
+ *
+ * Function port_write
+ *
+ * Description This function when a data packet is received from the apper
+ * layer task.
+ *
+ * Parameters: p_port - pointer to address of port control block
+ * p_buf - pointer to address of buffer with data,
+ *
+ ******************************************************************************/
static int port_write (tPORT *p_port, BT_HDR *p_buf)
{
/* We should not allow to write data in to server port when connection is not opened */
@@ -1429,16 +1429,16 @@
}
/*******************************************************************************
-**
-** Function PORT_Write
-**
-** Description This function when a data packet is received from the apper
-** layer task.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** pp_buf - pointer to address of buffer with data,
-**
-*******************************************************************************/
+ *
+ * Function PORT_Write
+ *
+ * Description This function when a data packet is received from the apper
+ * layer task.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * pp_buf - pointer to address of buffer with data,
+ *
+ ******************************************************************************/
int PORT_Write (uint16_t handle, BT_HDR *p_buf)
{
tPORT *p_port;
@@ -1493,17 +1493,17 @@
return (PORT_SUCCESS);
}
/*******************************************************************************
-**
-** Function PORT_WriteDataCO
-**
-** Description Normally not GKI aware application will call this function
-** to send data to the port by callout functions
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** fd - socket fd
-** p_len - Byte count returned
-**
-*******************************************************************************/
+ *
+ * Function PORT_WriteDataCO
+ *
+ * Description Normally not GKI aware application will call this function
+ * to send data to the port by callout functions
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * fd - socket fd
+ * p_len - Byte count returned
+ *
+ ******************************************************************************/
int PORT_WriteDataCO (uint16_t handle, int* p_len)
{
@@ -1646,18 +1646,18 @@
}
/*******************************************************************************
-**
-** Function PORT_WriteData
-**
-** Description Normally not GKI aware application will call this function
-** to send data to the port.
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_data - Data area
-** max_len - Byte count requested
-** p_len - Byte count received
-**
-*******************************************************************************/
+ *
+ * Function PORT_WriteData
+ *
+ * Description Normally not GKI aware application will call this function
+ * to send data to the port.
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_data - Data area
+ * max_len - Byte count requested
+ * p_len - Byte count received
+ *
+ ******************************************************************************/
int PORT_WriteData (uint16_t handle, const char *p_data, uint16_t max_len,
uint16_t *p_len)
{
@@ -1768,16 +1768,16 @@
}
/*******************************************************************************
-**
-** Function PORT_Test
-**
-** Description Application can call this function to send RFCOMM Test frame
-**
-** Parameters: handle - Handle returned in the RFCOMM_CreateConnection
-** p_data - Data area
-** max_len - Byte count requested
-**
-*******************************************************************************/
+ *
+ * Function PORT_Test
+ *
+ * Description Application can call this function to send RFCOMM Test frame
+ *
+ * Parameters: handle - Handle returned in the RFCOMM_CreateConnection
+ * p_data - Data area
+ * max_len - Byte count requested
+ *
+ ******************************************************************************/
int PORT_Test (uint16_t handle, uint8_t *p_data, uint16_t len)
{
tPORT *p_port;
@@ -1812,12 +1812,12 @@
}
/*******************************************************************************
-**
-** Function RFCOMM_Init
-**
-** Description This function is called to initialize RFCOMM layer
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_Init
+ *
+ * Description This function is called to initialize RFCOMM layer
+ *
+ ******************************************************************************/
void RFCOMM_Init (void)
{
memset (&rfc_cb, 0, sizeof (tRFC_CB)); /* Init RFCOMM control block */
@@ -1834,15 +1834,15 @@
}
/*******************************************************************************
-**
-** Function PORT_SetTraceLevel
-**
-** Description This function sets the trace level for RFCOMM. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function PORT_SetTraceLevel
+ *
+ * Description This function sets the trace level for RFCOMM. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
uint8_t PORT_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
@@ -1852,15 +1852,15 @@
}
/*******************************************************************************
-**
-** Function PORT_GetResultString
-**
-** Description This function returns the human-readable string for a given
-** result code.
-**
-** Returns a pointer to the human-readable string for the given result.
-**
-*******************************************************************************/
+ *
+ * Function PORT_GetResultString
+ *
+ * Description This function returns the human-readable string for a given
+ * result code.
+ *
+ * Returns a pointer to the human-readable string for the given result.
+ *
+ ******************************************************************************/
const char *PORT_GetResultString (const uint8_t result_code) {
if (result_code > PORT_ERR_MAX) {
return result_code_strings[PORT_ERR_MAX];
diff --git a/stack/rfcomm/port_int.h b/stack/rfcomm/port_int.h
index e30685b..58b0e15 100644
--- a/stack/rfcomm/port_int.h
+++ b/stack/rfcomm/port_int.h
@@ -48,14 +48,14 @@
#define PORT_EVENT_FLOW_CONTROL (9 | BT_EVT_TO_BTU_SP_EVT)
/*
-** Flow control configuration values for the mux
+ * Flow control configuration values for the mux
*/
#define PORT_FC_UNDEFINED 0 /* mux flow control mechanism not defined yet */
#define PORT_FC_TS710 1 /* use TS 07.10 flow control */
#define PORT_FC_CREDIT 2 /* use RFCOMM credit based flow control */
/*
-** Define Port Data Transfere control block
+ * Define Port Data Transfere control block
*/
typedef struct
{
@@ -67,7 +67,7 @@
} tPORT_DATA;
/*
-** Port control structure used to pass modem info
+ * Port control structure used to pass modem info
*/
typedef struct
{
@@ -92,7 +92,7 @@
/*
-** RFCOMM multiplexer Control Block
+ * RFCOMM multiplexer Control Block
*/
typedef struct
{
@@ -118,7 +118,7 @@
/*
-** RFCOMM Port Connection Control Block
+ * RFCOMM Port Connection Control Block
*/
typedef struct {
#define RFC_PORT_STATE_IDLE 0
@@ -144,7 +144,7 @@
/*
-** Define control block containing information about PORT connection
+ * Define control block containing information about PORT connection
*/
typedef struct
{
@@ -220,7 +220,7 @@
} tPORT_CB;
/*
-** Functions provided by the port_utils.cc
+ * Functions provided by the port_utils.cc
*/
extern tPORT *port_allocate_port (uint8_t dlci, BD_ADDR bd_addr);
extern void port_set_defaults (tPORT *p_port);
@@ -235,7 +235,7 @@
extern void port_flow_control_peer(tPORT *p_port, bool enable, uint16_t count);
/*
-** Functions provided by the port_rfc.cc
+ * Functions provided by the port_rfc.cc
*/
extern int port_open_continue (tPORT *p_port);
extern void port_start_port_open (tPORT *p_port);
diff --git a/stack/rfcomm/port_rfc.cc b/stack/rfcomm/port_rfc.cc
index 143b6ac..a10914e 100644
--- a/stack/rfcomm/port_rfc.cc
+++ b/stack/rfcomm/port_rfc.cc
@@ -38,7 +38,7 @@
#include "rfcdefs.h"
/*
-** Local function definitions
+ * Local function definitions
*/
uint32_t port_rfc_send_tx_data (tPORT *p_port);
void port_rfc_closed (tPORT *p_port, uint8_t res);
@@ -46,15 +46,15 @@
/*******************************************************************************
-**
-** Function port_open_continue
-**
-** Description This function is called after security manager completes
-** required security checks.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function port_open_continue
+ *
+ * Description This function is called after security manager completes
+ * required security checks.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
int port_open_continue (tPORT *p_port)
{
tRFC_MCB *p_mcb;
@@ -100,15 +100,15 @@
/*******************************************************************************
-**
-** Function port_start_control
-**
-** Description This function is called in the BTU_TASK context to
-** send control information
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function port_start_control
+ *
+ * Description This function is called in the BTU_TASK context to
+ * send control information
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void port_start_control (tPORT *p_port)
{
tRFC_MCB *p_mcb = p_port->rfc.p_mcb;
@@ -121,15 +121,15 @@
/*******************************************************************************
-**
-** Function port_start_par_neg
-**
-** Description This function is called in the BTU_TASK context to
-** send configuration information
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function port_start_par_neg
+ *
+ * Description This function is called in the BTU_TASK context to
+ * send configuration information
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void port_start_par_neg (tPORT *p_port)
{
tRFC_MCB *p_mcb = p_port->rfc.p_mcb;
@@ -142,15 +142,15 @@
/*******************************************************************************
-**
-** Function port_start_close
-**
-** Description This function is called in the BTU_TASK context to
-** release DLC
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function port_start_close
+ *
+ * Description This function is called in the BTU_TASK context to
+ * release DLC
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void port_start_close (tPORT *p_port)
{
tRFC_MCB *p_mcb = p_port->rfc.p_mcb;
@@ -192,15 +192,15 @@
/*******************************************************************************
-**
-** Function PORT_StartCnf
-**
-** Description This function is called from the RFCOMM layer when
-** establishing of the multiplexer channel is completed.
-** Continue establishing of the connection for all ports that
-** are in the OPENING state
-**
-*******************************************************************************/
+ *
+ * Function PORT_StartCnf
+ *
+ * Description This function is called from the RFCOMM layer when
+ * establishing of the multiplexer channel is completed.
+ * Continue establishing of the connection for all ports that
+ * are in the OPENING state
+ *
+ ******************************************************************************/
void PORT_StartCnf (tRFC_MCB *p_mcb, uint16_t result)
{
tPORT *p_port;
@@ -253,15 +253,15 @@
/*******************************************************************************
-**
-** Function PORT_StartInd
-**
-** Description This function is called from the RFCOMM layer when
-** some peer device wants to establish a multiplexer
-** connection. Check if there are any ports open with this
-** or not assigned multiplexer.
-**
-*******************************************************************************/
+ *
+ * Function PORT_StartInd
+ *
+ * Description This function is called from the RFCOMM layer when
+ * some peer device wants to establish a multiplexer
+ * connection. Check if there are any ports open with this
+ * or not assigned multiplexer.
+ *
+ ******************************************************************************/
void PORT_StartInd (tRFC_MCB *p_mcb)
{
tPORT *p_port;
@@ -285,15 +285,15 @@
/*******************************************************************************
-**
-** Function PORT_ParNegInd
-**
-** Description This function is called from the RFCOMM layer to change
-** DLCI parameters (currently only MTU is negotiated).
-** If can not find the port do not accept the request.
-** Otherwise save the MTU size supported by the peer.
-**
-*******************************************************************************/
+ *
+ * Function PORT_ParNegInd
+ *
+ * Description This function is called from the RFCOMM layer to change
+ * DLCI parameters (currently only MTU is negotiated).
+ * If can not find the port do not accept the request.
+ * Otherwise save the MTU size supported by the peer.
+ *
+ ******************************************************************************/
void PORT_ParNegInd (tRFC_MCB *p_mcb, uint8_t dlci, uint16_t mtu, uint8_t cl, uint8_t k)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
@@ -375,16 +375,16 @@
/*******************************************************************************
-**
-** Function PORT_ParNegCnf
-**
-** Description This function is called from the RFCOMM layer to change
-** DLCI parameters (currently only MTU is negotiated).
-** Save the MTU size supported by the peer.
-** If the confirmation is received during the port opening
-** procedure send EstablishRequest to continue.
-**
-*******************************************************************************/
+ *
+ * Function PORT_ParNegCnf
+ *
+ * Description This function is called from the RFCOMM layer to change
+ * DLCI parameters (currently only MTU is negotiated).
+ * Save the MTU size supported by the peer.
+ * If the confirmation is received during the port opening
+ * procedure send EstablishRequest to continue.
+ *
+ ******************************************************************************/
void PORT_ParNegCnf (tRFC_MCB *p_mcb, uint8_t dlci, uint16_t mtu, uint8_t cl, uint8_t k)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
@@ -434,18 +434,18 @@
/*******************************************************************************
-**
-** 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
-** has a handle to the port control block otherwise the control
-** block should be found based on the muliplexer channel and
-** dlci. The block should be allocated allocated before
-** meaning that application already made open.
-**
-*******************************************************************************/
+ *
+ * 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
+ * has a handle to the port control block otherwise the control
+ * block should be found based on the muliplexer channel and
+ * dlci. The block should be allocated allocated before
+ * meaning that application already made open.
+ *
+ ******************************************************************************/
void PORT_DlcEstablishInd (tRFC_MCB *p_mcb, uint8_t dlci, uint16_t mtu)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
@@ -489,15 +489,15 @@
/*******************************************************************************
-**
-** Function PORT_DlcEstablishCnf
-**
-** 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
-** successfull.
-**
-*******************************************************************************/
+ *
+ * Function PORT_DlcEstablishCnf
+ *
+ * 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
+ * successfull.
+ *
+ ******************************************************************************/
void PORT_DlcEstablishCnf (tRFC_MCB *p_mcb, uint8_t dlci, uint16_t mtu, uint16_t result)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
@@ -539,16 +539,16 @@
/*******************************************************************************
-**
-** Function PORT_PortNegInd
-**
-** 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
-** allocated before meaning that application already made open.
-**
-*******************************************************************************/
+ *
+ * Function PORT_PortNegInd
+ *
+ * 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
+ * allocated before meaning that application already made open.
+ *
+ ******************************************************************************/
void PORT_PortNegInd (tRFC_MCB *p_mcb, uint8_t dlci, tPORT_STATE *p_pars,
uint16_t param_mask)
{
@@ -575,13 +575,13 @@
/*******************************************************************************
-**
-** Function PORT_PortNegCnf
-**
-** Description This function is called from the RFCOMM layer to change
-** state for the port. Propagate change to the user.
-**
-*******************************************************************************/
+ *
+ * Function PORT_PortNegCnf
+ *
+ * Description This function is called from the RFCOMM layer to change
+ * state for the port. Propagate change to the user.
+ *
+ ******************************************************************************/
void PORT_PortNegCnf (tRFC_MCB *p_mcb, uint8_t dlci,
UNUSED_ATTR tPORT_STATE *p_pars, uint16_t result)
{
@@ -617,13 +617,13 @@
/*******************************************************************************
-**
-** Function PORT_ControlInd
-**
-** Description This function is called from the RFCOMM layer on the modem
-** signal change. Propagate change to the user.
-**
-*******************************************************************************/
+ *
+ * Function PORT_ControlInd
+ *
+ * Description This function is called from the RFCOMM layer on the modem
+ * signal change. Propagate change to the user.
+ *
+ ******************************************************************************/
void PORT_ControlInd (tRFC_MCB *p_mcb, uint8_t dlci, tPORT_CTRL *p_pars)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
@@ -676,13 +676,13 @@
/*******************************************************************************
-**
-** Function PORT_ControlCnf
-**
-** Description This function is called from the RFCOMM layer when
-** peer acknowleges change of the modem signals.
-**
-*******************************************************************************/
+ *
+ * Function PORT_ControlCnf
+ *
+ * Description This function is called from the RFCOMM layer when
+ * peer acknowleges change of the modem signals.
+ *
+ ******************************************************************************/
void PORT_ControlCnf (tRFC_MCB *p_mcb, uint8_t dlci,
UNUSED_ATTR tPORT_CTRL *p_pars)
{
@@ -714,13 +714,13 @@
/*******************************************************************************
-**
-** Function PORT_LineStatusInd
-**
-** Description This function is called from the RFCOMM layer when
-** peer indicates change in the line status
-**
-*******************************************************************************/
+ *
+ * Function PORT_LineStatusInd
+ *
+ * Description This function is called from the RFCOMM layer when
+ * peer indicates change in the line status
+ *
+ ******************************************************************************/
void PORT_LineStatusInd (tRFC_MCB *p_mcb, uint8_t dlci, uint8_t line_status)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
@@ -748,13 +748,13 @@
/*******************************************************************************
-**
-** Function PORT_DlcReleaseInd
-**
-** Description This function is called from the RFCOMM layer when
-** DLC connection is released.
-**
-*******************************************************************************/
+ *
+ * Function PORT_DlcReleaseInd
+ *
+ * Description This function is called from the RFCOMM layer when
+ * DLC connection is released.
+ *
+ ******************************************************************************/
void PORT_DlcReleaseInd (tRFC_MCB *p_mcb, uint8_t dlci)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
@@ -769,13 +769,13 @@
/*******************************************************************************
-**
-** Function PORT_CloseInd
-**
-** Description This function is called from the RFCOMM layer when
-** multiplexer connection is released.
-**
-*******************************************************************************/
+ *
+ * Function PORT_CloseInd
+ *
+ * Description This function is called from the RFCOMM layer when
+ * multiplexer connection is released.
+ *
+ ******************************************************************************/
void PORT_CloseInd (tRFC_MCB *p_mcb)
{
tPORT *p_port;
@@ -795,13 +795,13 @@
}
/*******************************************************************************
-**
-** Function Port_TimeOutCloseMux
-**
-** Description This function is called when RFCOMM timesout on a command
-** as a result multiplexer connection is closed.
-**
-*******************************************************************************/
+ *
+ * Function Port_TimeOutCloseMux
+ *
+ * Description This function is called when RFCOMM timesout on a command
+ * as a result multiplexer connection is closed.
+ *
+ ******************************************************************************/
void Port_TimeOutCloseMux (tRFC_MCB *p_mcb)
{
tPORT *p_port;
@@ -821,13 +821,13 @@
/*******************************************************************************
-**
-** Function PORT_DataInd
-**
-** Description This function is called from the RFCOMM layer when data
-** buffer is received from the peer.
-**
-*******************************************************************************/
+ *
+ * Function PORT_DataInd
+ *
+ * Description This function is called from the RFCOMM layer when data
+ * buffer is received from the peer.
+ *
+ ******************************************************************************/
void PORT_DataInd (tRFC_MCB *p_mcb, uint8_t dlci, BT_HDR *p_buf)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
@@ -922,13 +922,13 @@
/*******************************************************************************
-**
-** Function PORT_FlowInd
-**
-** Description This function is called from the RFCOMM layer on the flow
-** control signal change. Propagate change to the user.
-**
-*******************************************************************************/
+ *
+ * Function PORT_FlowInd
+ *
+ * Description This function is called from the RFCOMM layer on the flow
+ * control signal change. Propagate change to the user.
+ *
+ ******************************************************************************/
void PORT_FlowInd (tRFC_MCB *p_mcb, uint8_t dlci, bool enable_data)
{
tPORT *p_port = (tPORT *)NULL;
@@ -984,12 +984,12 @@
/*******************************************************************************
-**
-** Function port_rfc_send_tx_data
-**
-** Description This function is when forward data can be sent to the peer
-**
-*******************************************************************************/
+ *
+ * Function port_rfc_send_tx_data
+ *
+ * Description This function is when forward data can be sent to the peer
+ *
+ ******************************************************************************/
uint32_t port_rfc_send_tx_data (tPORT *p_port)
{
uint32_t events = 0;
@@ -1040,12 +1040,12 @@
/*******************************************************************************
-**
-** Function port_rfc_closed
-**
-** Description This function when RFCOMM side of port is closed
-**
-*******************************************************************************/
+ *
+ * Function port_rfc_closed
+ *
+ * Description This function when RFCOMM side of port is closed
+ *
+ ******************************************************************************/
void port_rfc_closed (tPORT *p_port, uint8_t res)
{
uint8_t old_signals;
@@ -1108,15 +1108,15 @@
/*******************************************************************************
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * 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
+ *
+ ******************************************************************************/
void port_get_credits (tPORT *p_port, uint8_t k)
{
p_port->credit_tx = k;
diff --git a/stack/rfcomm/port_utils.cc b/stack/rfcomm/port_utils.cc
index 706062c..7f5f5a8 100644
--- a/stack/rfcomm/port_utils.cc
+++ b/stack/rfcomm/port_utils.cc
@@ -51,17 +51,17 @@
/*******************************************************************************
-**
-** Function port_allocate_port
-**
-** 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
-** clients.
-**
-** Returns Pointer to the PORT or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function port_allocate_port
+ *
+ * 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
+ * clients.
+ *
+ * Returns Pointer to the PORT or NULL if not found
+ *
+ ******************************************************************************/
tPORT *port_allocate_port (uint8_t dlci, BD_ADDR bd_addr)
{
tPORT *p_port = &rfc_cb.port.port[0];
@@ -102,13 +102,13 @@
/*******************************************************************************
-**
-** Function port_set_defaults
-**
-** Description Set defualt port parameters
-**
-**
-*******************************************************************************/
+ *
+ * Function port_set_defaults
+ *
+ * Description Set defualt port parameters
+ *
+ *
+ ******************************************************************************/
void port_set_defaults (tPORT *p_port)
{
p_port->ev_mask = 0;
@@ -135,16 +135,16 @@
}
/*******************************************************************************
-**
-** Function port_select_mtu
-**
-** Description Select MTU which will best serve connection from our
-** point of view.
-** If our device is 1.2 or lower we calculate how many DH5s
-** fit into 1 RFCOMM buffer.
-**
-**
-*******************************************************************************/
+ *
+ * Function port_select_mtu
+ *
+ * Description Select MTU which will best serve connection from our
+ * point of view.
+ * If our device is 1.2 or lower we calculate how many DH5s
+ * fit into 1 RFCOMM buffer.
+ *
+ *
+ ******************************************************************************/
void port_select_mtu (tPORT *p_port)
{
uint16_t packet_size;
@@ -200,14 +200,14 @@
}
/*******************************************************************************
-**
-** Function port_release_port
-**
-** Description Release port control block.
-**
-** Returns Pointer to the PORT or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function port_release_port
+ *
+ * Description Release port control block.
+ *
+ * Returns Pointer to the PORT or NULL if not found
+ *
+ ******************************************************************************/
void port_release_port(tPORT *p_port)
{
RFCOMM_TRACE_DEBUG("%s p_port: %p state: %d keep_handle: %d", __func__,
@@ -277,13 +277,13 @@
}
/*******************************************************************************
-**
-** Function port_find_mcb
-**
-** Description This function checks if connection exists to device with
-** the BD_ADDR.
-**
-*******************************************************************************/
+ *
+ * Function port_find_mcb
+ *
+ * Description This function checks if connection exists to device with
+ * the BD_ADDR.
+ *
+ ******************************************************************************/
tRFC_MCB *port_find_mcb (BD_ADDR bd_addr)
{
int i;
@@ -308,17 +308,17 @@
/*******************************************************************************
-**
-** Function port_find_mcb_dlci_port
-**
-** 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.
-**
-** Returns Pointer to the PORT or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function port_find_mcb_dlci_port
+ *
+ * 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.
+ *
+ * Returns Pointer to the PORT or NULL if not found
+ *
+ ******************************************************************************/
tPORT *port_find_mcb_dlci_port (tRFC_MCB *p_mcb, uint8_t dlci)
{
uint8_t inx;
@@ -341,14 +341,14 @@
/*******************************************************************************
-**
-** Function port_find_dlci_port
-**
-** Description Find port with DLCI not assigned to multiplexer channel
-**
-** Returns Pointer to the PORT or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function port_find_dlci_port
+ *
+ * Description Find port with DLCI not assigned to multiplexer channel
+ *
+ * Returns Pointer to the PORT or NULL if not found
+ *
+ ******************************************************************************/
tPORT *port_find_dlci_port (uint8_t dlci)
{
uint16_t i;
@@ -376,14 +376,14 @@
/*******************************************************************************
-**
-** Function port_find_port
-**
-** Description Find port with DLCI, BD_ADDR
-**
-** Returns Pointer to the PORT or NULL if not found
-**
-*******************************************************************************/
+ *
+ * Function port_find_port
+ *
+ * Description Find port with DLCI, BD_ADDR
+ *
+ * Returns Pointer to the PORT or NULL if not found
+ *
+ ******************************************************************************/
tPORT *port_find_port (uint8_t dlci, BD_ADDR bd_addr)
{
uint16_t i;
@@ -404,16 +404,16 @@
/*******************************************************************************
-**
-** 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
-** flow control type.
-**
-** Returns event mask to be returned to the application
-**
-*******************************************************************************/
+ *
+ * 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
+ * flow control type.
+ *
+ * Returns event mask to be returned to the application
+ *
+ ******************************************************************************/
uint32_t port_flow_control_user (tPORT *p_port)
{
uint32_t event = 0;
@@ -442,14 +442,14 @@
/*******************************************************************************
-**
-** Function port_get_signal_changes
-**
-** Description Check modem signals that has been changed
-**
-** Returns event mask to be returned to the application
-**
-*******************************************************************************/
+ *
+ * Function port_get_signal_changes
+ *
+ * Description Check modem signals that has been changed
+ *
+ * Returns event mask to be returned to the application
+ *
+ ******************************************************************************/
uint32_t port_get_signal_changes (tPORT *p_port, uint8_t old_signals, uint8_t signal)
{
uint8_t changed_signals = (signal ^ old_signals);
@@ -486,16 +486,16 @@
}
/*******************************************************************************
-**
-** Function port_flow_control_peer
-**
-** Description Send flow control messages to the peer for both enabling
-** and disabling flow control, for both credit-based and
-** TS 07.10 flow control mechanisms.
-**
-** Returns nothing
-**
-*******************************************************************************/
+ *
+ * Function port_flow_control_peer
+ *
+ * Description Send flow control messages to the peer for both enabling
+ * and disabling flow control, for both credit-based and
+ * TS 07.10 flow control mechanisms.
+ *
+ * Returns nothing
+ *
+ ******************************************************************************/
void port_flow_control_peer(tPORT *p_port, bool enable, uint16_t count)
{
if (!p_port->rfc.p_mcb)
diff --git a/stack/rfcomm/rfc_int.h b/stack/rfcomm/rfc_int.h
index dd3259e..630c5bb 100644
--- a/stack/rfcomm/rfc_int.h
+++ b/stack/rfcomm/rfc_int.h
@@ -33,7 +33,7 @@
#endif
/*
-** Define RFCOMM result codes
+ * Define RFCOMM result codes
*/
#define RFCOMM_SUCCESS 0
#define RFCOMM_ERROR 1
@@ -44,7 +44,7 @@
#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_MAX_MTU 32767
@@ -77,7 +77,7 @@
extern void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, uint8_t dlci, uint8_t line_status);
/*
-** Define logical struct used for sending and decoding MX frames
+ * Define logical struct used for sending and decoding MX frames
*/
typedef struct
{
@@ -148,7 +148,7 @@
#define LINE_STATUS_FAILED 0x10 /* Connection Failed */
/*
-** Define states and events for the RFC multiplexer state machine
+ * Define states and events for the RFC multiplexer state machine
*/
#define RFC_MX_STATE_IDLE 0
#define RFC_MX_STATE_WAIT_CONN_CNF 1
@@ -159,7 +159,7 @@
#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
@@ -169,7 +169,7 @@
#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
@@ -179,7 +179,7 @@
#define RFC_EVENT_TIMEOUT 5
#define RFC_EVENT_BAD_FRAME 50
/*
-** Multiplexer events
+ * Multiplexer events
*/
#define RFC_MX_EVENT_START_REQ 6
#define RFC_MX_EVENT_START_RSP 7
@@ -198,7 +198,7 @@
#define RFC_MX_EVENT_NSC_RSP 20
/*
-** Port events
+ * Port events
*/
#define RFC_EVENT_OPEN 9
#define RFC_EVENT_ESTABLISH_RSP 11
@@ -245,7 +245,7 @@
#define RFC_MCB_RELEASE_INACT_TIMER 2 /* in seconds */
/*
-** Define RFCOMM frame processing errors
+ * Define RFCOMM frame processing errors
*/
#define RFCOMM_ERR_BAD_SABME 1
#define RFCOMM_ERR_BAD_UA 2
@@ -276,7 +276,7 @@
extern void rfc_mx_sm_execute (tRFC_MCB *p_mcb, uint16_t event, void *p_data);
/*
-** Functions provided by the rfc_port_fsm.cc
+ * Functions provided by the rfc_port_fsm.cc
*/
extern void rfc_port_sm_execute (tPORT *p_port, uint16_t event, void *p_data);
@@ -292,7 +292,7 @@
extern void rfc_process_l2cap_congestion (tRFC_MCB *p_mcb, bool is_congested);
/*
-** Functions provided by the rfc_utils.cc
+ * Functions provided by the rfc_utils.cc
*/
tRFC_MCB *rfc_alloc_multiplexer_channel (BD_ADDR bd_addr, bool is_initiator);
extern void rfc_release_multiplexer_channel (tRFC_MCB *p_rfc_mcb);
@@ -313,7 +313,7 @@
extern void rfc_check_send_cmd(tRFC_MCB *p_mcb, BT_HDR *p_buf);
/*
-** Functions provided by the rfc_ts_frames.cc
+ * Functions provided by the rfc_ts_frames.cc
*/
extern void rfc_send_sabme (tRFC_MCB *p_rfc_mcb, uint8_t dlci);
extern void rfc_send_ua (tRFC_MCB *p_rfc_mcb, uint8_t dlci);
diff --git a/stack/rfcomm/rfc_l2cap_if.cc b/stack/rfcomm/rfc_l2cap_if.cc
index f0e665d..746e208 100644
--- a/stack/rfcomm/rfc_l2cap_if.cc
+++ b/stack/rfcomm/rfc_l2cap_if.cc
@@ -39,7 +39,7 @@
/*
-** Define Callback functions to be called by L2CAP
+ * Define Callback functions to be called by L2CAP
*/
static void RFCOMM_ConnectInd (BD_ADDR bd_addr, uint16_t lcid, uint16_t psm, uint8_t id);
static void RFCOMM_ConnectCnf (uint16_t lcid, uint16_t err);
@@ -52,13 +52,13 @@
/*******************************************************************************
-**
-** Function rfcomm_l2cap_if_init
-**
-** Description This function is called during the RFCOMM task startup
-** to register interface functions with L2CAP.
-**
-*******************************************************************************/
+ *
+ * Function rfcomm_l2cap_if_init
+ *
+ * Description This function is called during the RFCOMM task startup
+ * to register interface functions with L2CAP.
+ *
+ ******************************************************************************/
void rfcomm_l2cap_if_init (void)
{
tL2CAP_APPL_INFO *p_l2c = &rfc_cb.rfc.reg_info;
@@ -81,14 +81,14 @@
/*******************************************************************************
-**
-** Function RFCOMM_ConnectInd
-**
-** Description This is a callback function called by L2CAP when
-** L2CA_ConnectInd received. Allocate multiplexer control block
-** and dispatch the event to it.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_ConnectInd
+ *
+ * Description This is a callback function called by L2CAP when
+ * L2CA_ConnectInd received. Allocate multiplexer control block
+ * and dispatch the event to it.
+ *
+ ******************************************************************************/
void RFCOMM_ConnectInd (BD_ADDR bd_addr, uint16_t lcid,
UNUSED_ATTR uint16_t psm, uint8_t id)
{
@@ -136,14 +136,14 @@
/*******************************************************************************
-**
-** Function RFCOMM_ConnectCnf
-**
-** Description This is a callback function called by L2CAP when
-** L2CA_ConnectCnf received. Save L2CAP handle and dispatch
-** event to the FSM.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_ConnectCnf
+ *
+ * Description This is a callback function called by L2CAP when
+ * L2CA_ConnectCnf received. Save L2CAP handle and dispatch
+ * event to the FSM.
+ *
+ ******************************************************************************/
void RFCOMM_ConnectCnf (uint16_t lcid, uint16_t result)
{
tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid);
@@ -209,14 +209,14 @@
/*******************************************************************************
-**
-** Function RFCOMM_ConfigInd
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_ConfigInd
+ *
+ * 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.
+ *
+ ******************************************************************************/
void RFCOMM_ConfigInd (uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid);
@@ -232,14 +232,14 @@
/*******************************************************************************
-**
-** Function RFCOMM_ConfigCnf
-**
-** Description This is a callback function called by L2CAP when
-** L2CA_ConfigCnf received. Save L2CAP handle and dispatch
-** event to the FSM.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_ConfigCnf
+ *
+ * Description This is a callback function called by L2CAP when
+ * L2CA_ConfigCnf received. Save L2CAP handle and dispatch
+ * event to the FSM.
+ *
+ ******************************************************************************/
void RFCOMM_ConfigCnf (uint16_t lcid, tL2CAP_CFG_INFO *p_cfg)
{
tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid);
@@ -255,26 +255,26 @@
/*******************************************************************************
-**
-** Function RFCOMM_QoSViolationInd
-**
-** Description This is a callback function called by L2CAP when
-** L2CA_QoSViolationIndInd received. Dispatch event to the FSM.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_QoSViolationInd
+ *
+ * Description This is a callback function called by L2CAP when
+ * L2CA_QoSViolationIndInd received. Dispatch event to the FSM.
+ *
+ ******************************************************************************/
void RFCOMM_QoSViolationInd (UNUSED_ATTR BD_ADDR bd_addr)
{
}
/*******************************************************************************
-**
-** Function RFCOMM_DisconnectInd
-**
-** Description This is a callback function called by L2CAP when
-** L2CA_DisconnectInd received. Dispatch event to the FSM.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_DisconnectInd
+ *
+ * Description This is a callback function called by L2CAP when
+ * L2CA_DisconnectInd received. Dispatch event to the FSM.
+ *
+ ******************************************************************************/
void RFCOMM_DisconnectInd (uint16_t lcid, bool is_conf_needed)
{
tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid);
@@ -295,15 +295,15 @@
/*******************************************************************************
-**
-** Function RFCOMM_BufDataInd
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_BufDataInd
+ *
+ * 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.
+ *
+ ******************************************************************************/
void RFCOMM_BufDataInd (uint16_t lcid, BT_HDR *p_buf)
{
tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid);
@@ -385,13 +385,13 @@
}
/*******************************************************************************
-**
-** Function RFCOMM_CongestionStatusInd
-**
-** Description This is a callback function called by L2CAP when
-** data RFCOMM L2CAP congestion status changes
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_CongestionStatusInd
+ *
+ * Description This is a callback function called by L2CAP when
+ * data RFCOMM L2CAP congestion status changes
+ *
+ ******************************************************************************/
void RFCOMM_CongestionStatusInd (uint16_t lcid, bool is_congested)
{
tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid);
@@ -409,12 +409,12 @@
}
/*******************************************************************************
-**
-** Function rfc_find_lcid_mcb
-**
-** Description This function returns MCB block supporting local cid
-**
-*******************************************************************************/
+ *
+ * Function rfc_find_lcid_mcb
+ *
+ * Description This function returns MCB block supporting local cid
+ *
+ ******************************************************************************/
tRFC_MCB *rfc_find_lcid_mcb (uint16_t lcid)
{
tRFC_MCB *p_mcb;
@@ -441,12 +441,12 @@
/*******************************************************************************
-**
-** Function rfc_save_lcid_mcb
-**
-** Description This function returns MCB block supporting local cid
-**
-*******************************************************************************/
+ *
+ * Function rfc_save_lcid_mcb
+ *
+ * Description This function returns MCB block supporting local cid
+ *
+ ******************************************************************************/
void rfc_save_lcid_mcb(tRFC_MCB *p_mcb, uint16_t lcid)
{
if (lcid < L2CAP_BASE_APPL_CID)
diff --git a/stack/rfcomm/rfc_mx_fsm.cc b/stack/rfcomm/rfc_mx_fsm.cc
index 06bb74b..de64d22 100644
--- a/stack/rfcomm/rfc_mx_fsm.cc
+++ b/stack/rfcomm/rfc_mx_fsm.cc
@@ -38,9 +38,9 @@
#define L2CAP_ERROR 1
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void rfc_mx_sm_state_idle (tRFC_MCB *p_mcb, uint16_t event, void *p_data);
static void rfc_mx_sm_state_wait_conn_cnf (tRFC_MCB *p_mcb, uint16_t event, void *p_data);
static void rfc_mx_sm_state_configure (tRFC_MCB *p_mcb, uint16_t event, void *p_data);
@@ -57,15 +57,15 @@
/*******************************************************************************
-**
-** Function rfc_mx_sm_execute
-**
-** Description This function sends multiplexor events through the state
-** machine.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_sm_execute
+ *
+ * Description This function sends multiplexor events through the state
+ * machine.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_mx_sm_execute (tRFC_MCB *p_mcb, uint16_t event, void *p_data)
{
switch (p_mcb->state)
@@ -103,16 +103,16 @@
/*******************************************************************************
-**
-** Function rfc_mx_sm_state_idle
-**
-** Description This function handles events when the multiplexer is in
-** IDLE state. This state exists when connection is being
-** initially established.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_sm_state_idle
+ *
+ * Description This function handles events when the multiplexer is in
+ * IDLE state. This state exists when connection is being
+ * initially established.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_mx_sm_state_idle (tRFC_MCB *p_mcb, uint16_t event, void *p_data)
{
RFCOMM_TRACE_EVENT ("rfc_mx_sm_state_idle - evt:%d", event);
@@ -175,15 +175,15 @@
/*******************************************************************************
-**
-** Function rfc_mx_sm_state_wait_conn_cnf
-**
-** Description This function handles events when the multiplexer is
-** waiting for Connection Confirm from L2CAP.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_sm_state_wait_conn_cnf
+ *
+ * Description This function handles events when the multiplexer is
+ * waiting for Connection Confirm from L2CAP.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_mx_sm_state_wait_conn_cnf (tRFC_MCB *p_mcb, uint16_t event, void *p_data)
{
RFCOMM_TRACE_EVENT ("rfc_mx_sm_state_wait_conn_cnf - evt:%d", event);
@@ -260,15 +260,15 @@
/*******************************************************************************
-**
-** Function rfc_mx_sm_state_configure
-**
-** Description This function handles events when the multiplexer in the
-** configuration state.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_sm_state_configure
+ *
+ * Description This function handles events when the multiplexer in the
+ * configuration state.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_mx_sm_state_configure (tRFC_MCB *p_mcb, uint16_t event, void *p_data)
{
RFCOMM_TRACE_EVENT ("rfc_mx_sm_state_configure - evt:%d", event);
@@ -305,15 +305,15 @@
/*******************************************************************************
-**
-** Function rfc_mx_sm_sabme_wait_ua
-**
-** Description This function handles events when the multiplexer sent
-** SABME and is waiting for UA reply.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_sm_sabme_wait_ua
+ *
+ * Description This function handles events when the multiplexer sent
+ * SABME and is waiting for UA reply.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_mx_sm_sabme_wait_ua (tRFC_MCB *p_mcb, uint16_t event,
UNUSED_ATTR void *p_data)
{
@@ -367,15 +367,15 @@
}
/*******************************************************************************
-**
-** Function rfc_mx_sm_state_wait_sabme
-**
-** Description This function handles events when the multiplexer is
-** waiting for SABME on the acceptor side after configuration
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_sm_state_wait_sabme
+ *
+ * Description This function handles events when the multiplexer is
+ * waiting for SABME on the acceptor side after configuration
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_mx_sm_state_wait_sabme (tRFC_MCB *p_mcb, uint16_t event, void *p_data)
{
RFCOMM_TRACE_EVENT ("rfc_mx_sm_state_wait_sabme - evt:%d", event);
@@ -435,15 +435,15 @@
/*******************************************************************************
-**
-** Function rfc_mx_sm_state_connected
-**
-** Description This function handles events when the multiplexer is
-** in the CONNECTED state
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_sm_state_connected
+ *
+ * Description This function handles events when the multiplexer is
+ * in the CONNECTED state
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_mx_sm_state_connected (tRFC_MCB *p_mcb, uint16_t event,
UNUSED_ATTR void *p_data)
{
@@ -480,15 +480,15 @@
/*******************************************************************************
-**
-** Function rfc_mx_sm_state_disc_wait_ua
-**
-** Description This function handles events when the multiplexer sent
-** DISC and is waiting for UA reply.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_sm_state_disc_wait_ua
+ *
+ * Description This function handles events when the multiplexer sent
+ * DISC and is waiting for UA reply.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_mx_sm_state_disc_wait_ua (tRFC_MCB *p_mcb, uint16_t event, void *p_data)
{
BT_HDR *p_buf;
@@ -561,13 +561,13 @@
/*******************************************************************************
-**
-** Function rfc_mx_send_config_req
-**
-** Description This function handles L2CA_ConnectInd message from the
-** L2CAP. Accept connection.
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_send_config_req
+ *
+ * Description This function handles L2CA_ConnectInd message from the
+ * L2CAP. Accept connection.
+ *
+ ******************************************************************************/
static void rfc_mx_send_config_req (tRFC_MCB *p_mcb)
{
tL2CAP_CFG_INFO cfg;
@@ -592,15 +592,15 @@
/*******************************************************************************
-**
-** Function rfc_mx_conf_cnf
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_conf_cnf
+ *
+ * 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.
+ *
+ ******************************************************************************/
static void rfc_mx_conf_cnf (tRFC_MCB *p_mcb, tL2CAP_CFG_INFO *p_cfg)
{
RFCOMM_TRACE_EVENT ("rfc_mx_conf_cnf p_cfg:%08x res:%d ", p_cfg, (p_cfg) ? p_cfg->result : 0);
@@ -637,13 +637,13 @@
/*******************************************************************************
-**
-** Function rfc_mx_conf_ind
-**
-** Description This function handles L2CA_ConfigInd message from the
-** L2CAP. Send the L2CA_ConfigRsp message.
-**
-*******************************************************************************/
+ *
+ * Function rfc_mx_conf_ind
+ *
+ * Description This function handles L2CA_ConfigInd message from the
+ * L2CAP. Send the L2CA_ConfigRsp message.
+ *
+ ******************************************************************************/
static void rfc_mx_conf_ind (tRFC_MCB *p_mcb, tL2CAP_CFG_INFO *p_cfg)
{
/* Save peer L2CAP MTU if present */
diff --git a/stack/rfcomm/rfc_port_fsm.cc b/stack/rfcomm/rfc_port_fsm.cc
index ca9af28..4727429 100644
--- a/stack/rfcomm/rfc_port_fsm.cc
+++ b/stack/rfcomm/rfc_port_fsm.cc
@@ -34,9 +34,9 @@
#include "bt_utils.h"
#include "osi/include/osi.h"
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void rfc_port_sm_state_closed (tPORT *p_port, uint16_t event, void *p_data);
static void rfc_port_sm_sabme_wait_ua (tPORT *p_port, uint16_t event, void *p_data);
static void rfc_port_sm_opened (tPORT *p_port, uint16_t event, void *p_data);
@@ -50,15 +50,15 @@
/*******************************************************************************
-**
-** Function rfc_port_sm_execute
-**
-** Description This function sends port events through the state
-** machine.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_sm_execute
+ *
+ * Description This function sends port events through the state
+ * machine.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_port_sm_execute (tPORT *p_port, uint16_t event, void *p_data)
{
if (!p_port)
@@ -97,16 +97,16 @@
/*******************************************************************************
-**
-** Function rfc_port_sm_state_closed
-**
-** Description This function handles events when the port is in
-** CLOSED state. This state exists when port is
-** being initially established.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_sm_state_closed
+ *
+ * Description This function handles events when the port is in
+ * CLOSED state. This state exists when port is
+ * being initially established.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_port_sm_state_closed (tPORT *p_port, uint16_t event, void *p_data)
{
switch (event)
@@ -166,15 +166,15 @@
}
/*******************************************************************************
-**
-** Function rfc_port_sm_sabme_wait_ua
-**
-** Description This function handles events when SABME on the DLC was
-** sent and SM is waiting for UA or DM.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_sm_sabme_wait_ua
+ *
+ * Description This function handles events when SABME on the DLC was
+ * sent and SM is waiting for UA or DM.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_port_sm_sabme_wait_ua (tPORT *p_port, uint16_t event, void *p_data)
{
switch (event)
@@ -236,17 +236,17 @@
/*******************************************************************************
-**
-** Function rfc_port_sm_term_wait_sec_check
-**
-** 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
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_sm_term_wait_sec_check
+ *
+ * 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
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_port_sm_term_wait_sec_check (tPORT *p_port, uint16_t event, void *p_data)
{
switch (event)
@@ -318,16 +318,16 @@
/*******************************************************************************
-**
-** Function rfc_port_sm_orig_wait_sec_check
-**
-** 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
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_sm_orig_wait_sec_check
+ *
+ * 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
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_port_sm_orig_wait_sec_check (tPORT *p_port, uint16_t event, void *p_data)
{
switch (event)
@@ -369,15 +369,15 @@
/*******************************************************************************
-**
-** Function rfc_port_sm_opened
-**
-** Description This function handles events for the port in the OPENED
-** state
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_sm_opened
+ *
+ * Description This function handles events for the port in the OPENED
+ * state
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_port_sm_opened (tPORT *p_port, uint16_t event, void *p_data)
{
switch (event)
@@ -456,15 +456,15 @@
/*******************************************************************************
-**
-** Function rfc_port_sm_disc_wait_ua
-**
-** Description This function handles events when DISC on the DLC was
-** sent and SM is waiting for UA or DM.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_sm_disc_wait_ua
+ *
+ * Description This function handles events when DISC on the DLC was
+ * sent and SM is waiting for UA or DM.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_port_sm_disc_wait_ua (tPORT *p_port, uint16_t event, void *p_data)
{
switch (event)
@@ -513,12 +513,12 @@
/*******************************************************************************
-**
-** Function rfc_port_uplink_data
-**
-** Description This function handles uplink information data frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_uplink_data
+ *
+ * Description This function handles uplink information data frame.
+ *
+ ******************************************************************************/
void rfc_port_uplink_data (tPORT *p_port, BT_HDR *p_buf)
{
PORT_DataInd (p_port->rfc.p_mcb, p_port->dlci, p_buf);
@@ -526,13 +526,13 @@
/*******************************************************************************
-**
-** Function rfc_process_pn
-**
-** Description This function handles DLC parameter negotiation frame.
-** Record MTU and pass indication to the upper layer.
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_pn
+ *
+ * Description This function handles DLC parameter negotiation frame.
+ * Record MTU and pass indication to the upper layer.
+ *
+ ******************************************************************************/
void rfc_process_pn (tRFC_MCB *p_mcb, bool is_command, MX_FRAME *p_frame)
{
tPORT *p_port;
@@ -569,13 +569,13 @@
/*******************************************************************************
-**
-** Function rfc_process_rpn
-**
-** Description This function handles Remote DLC parameter negotiation
-** command/response. Pass command to the user.
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_rpn
+ *
+ * Description This function handles Remote DLC parameter negotiation
+ * command/response. Pass command to the user.
+ *
+ ******************************************************************************/
void rfc_process_rpn (tRFC_MCB *p_mcb, bool is_command,
bool is_request, MX_FRAME *p_frame)
{
@@ -687,13 +687,13 @@
/*******************************************************************************
-**
-** Function rfc_process_msc
-**
-** Description This function handles Modem Status Command.
-** Pass command to the user.
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_msc
+ *
+ * Description This function handles Modem Status Command.
+ * Pass command to the user.
+ *
+ ******************************************************************************/
void rfc_process_msc (tRFC_MCB *p_mcb, bool is_command, MX_FRAME *p_frame)
{
tPORT_CTRL pars;
@@ -758,13 +758,13 @@
/*******************************************************************************
-**
-** Function rfc_process_rls
-**
-** Description This function handles Remote Line Status command.
-** Pass command to the user.
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_rls
+ *
+ * Description This function handles Remote Line Status command.
+ * Pass command to the user.
+ *
+ ******************************************************************************/
void rfc_process_rls (tRFC_MCB *p_mcb, bool is_command, MX_FRAME *p_frame)
{
tPORT *p_port;
@@ -790,12 +790,12 @@
/*******************************************************************************
-**
-** Function rfc_process_nsc
-**
-** Description This function handles None Supported Command frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_nsc
+ *
+ * Description This function handles None Supported Command frame.
+ *
+ ******************************************************************************/
void rfc_process_nsc (UNUSED_ATTR tRFC_MCB *p_mcb,
UNUSED_ATTR MX_FRAME *p_frame)
{
@@ -803,26 +803,26 @@
/*******************************************************************************
-**
-** Function rfc_process_test
-**
-** Description This function handles Test frame. If this is a command
-** reply to it. Otherwise pass response to the user.
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_test
+ *
+ * Description This function handles Test frame. If this is a command
+ * reply to it. Otherwise pass response to the user.
+ *
+ ******************************************************************************/
void rfc_process_test_rsp(UNUSED_ATTR tRFC_MCB *p_mcb, BT_HDR *p_buf)
{
osi_free(p_buf);
}
/*******************************************************************************
-**
-** Function rfc_process_fcon
-**
-** Description This function handles FCON frame. The peer entity is able
-** to receive new information
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_fcon
+ *
+ * Description This function handles FCON frame. The peer entity is able
+ * to receive new information
+ *
+ ******************************************************************************/
void rfc_process_fcon (tRFC_MCB *p_mcb, bool is_command)
{
if (is_command)
@@ -837,13 +837,13 @@
}
/*******************************************************************************
-**
-** Function rfc_process_fcoff
-**
-** Description This function handles FCOFF frame. The peer entity is unable
-** to receive new information
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_fcoff
+ *
+ * Description This function handles FCOFF frame. The peer entity is unable
+ * to receive new information
+ *
+ ******************************************************************************/
void rfc_process_fcoff (tRFC_MCB *p_mcb, bool is_command)
{
if (is_command)
@@ -859,12 +859,12 @@
/*******************************************************************************
-**
-** Function rfc_process_l2cap_congestion
-**
-** Description This function handles L2CAP congestion messages
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_l2cap_congestion
+ *
+ * Description This function handles L2CAP congestion messages
+ *
+ ******************************************************************************/
void rfc_process_l2cap_congestion (tRFC_MCB *p_mcb, bool is_congested)
{
p_mcb->l2cap_congested = is_congested;
@@ -884,12 +884,12 @@
}
/*******************************************************************************
-**
-** Function rfc_set_port_pars
-**
-** Description This function sets the tPORT_STATE structure given a p_frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_set_port_pars
+ *
+ * Description This function sets the tPORT_STATE structure given a p_frame.
+ *
+ ******************************************************************************/
void rfc_set_port_state(tPORT_STATE *port_pars, MX_FRAME *p_frame)
{
diff --git a/stack/rfcomm/rfc_port_if.cc b/stack/rfcomm/rfc_port_if.cc
index 79f3486..6f8251f 100644
--- a/stack/rfcomm/rfc_port_if.cc
+++ b/stack/rfcomm/rfc_port_if.cc
@@ -37,15 +37,15 @@
tRFC_CB rfc_cb;
/*******************************************************************************
-**
-** Function RFCOMM_StartReq
-**
-** Description This function handles Start Request from the upper layer.
-** If RFCOMM multiplexer channel can not be allocated
-** send start not accepted confirmation. Otherwise dispatch
-** start event to the state machine.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_StartReq
+ *
+ * Description This function handles Start Request from the upper layer.
+ * If RFCOMM multiplexer channel can not be allocated
+ * send start not accepted confirmation. Otherwise dispatch
+ * start event to the state machine.
+ *
+ ******************************************************************************/
void RFCOMM_StartReq (tRFC_MCB *p_mcb)
{
rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_START_REQ, NULL);
@@ -53,14 +53,14 @@
/*******************************************************************************
-**
-** Function RFCOMM_StartRsp
-**
-** Description This function handles Start Response from the upper layer.
-** Save upper layer handle and result of the Start Indication
-** in the control block and dispatch event to the FSM.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_StartRsp
+ *
+ * Description This function handles Start Response from the upper layer.
+ * Save upper layer handle and result of the Start Indication
+ * in the control block and dispatch event to the FSM.
+ *
+ ******************************************************************************/
void RFCOMM_StartRsp (tRFC_MCB *p_mcb, uint16_t result)
{
rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_START_RSP, &result);
@@ -68,16 +68,16 @@
/*******************************************************************************
-**
-** Function RFCOMM_DlcEstablishReq
-**
-** 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
-** machine.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_DlcEstablishReq
+ *
+ * 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
+ * machine.
+ *
+ ******************************************************************************/
void RFCOMM_DlcEstablishReq (tRFC_MCB *p_mcb, uint8_t dlci,
UNUSED_ATTR uint16_t mtu)
{
@@ -99,13 +99,13 @@
/*******************************************************************************
-**
-** Function RFCOMM_DlcEstablishRsp
-**
-** Description This function is called by the port emulation entity
-** acks Establish Indication.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_DlcEstablishRsp
+ *
+ * Description This function is called by the port emulation entity
+ * acks Establish Indication.
+ *
+ ******************************************************************************/
void RFCOMM_DlcEstablishRsp (tRFC_MCB *p_mcb, uint8_t dlci,
UNUSED_ATTR uint16_t mtu, uint16_t result)
{
@@ -126,16 +126,16 @@
/*******************************************************************************
-**
-** Function RFCOMM_ParNegReq
-**
-** 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
-** block.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_ParNegReq
+ *
+ * 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
+ * block.
+ *
+ ******************************************************************************/
void RFCOMM_ParNegReq (tRFC_MCB *p_mcb, uint8_t dlci, uint16_t mtu)
{
uint8_t flow;
@@ -183,13 +183,13 @@
/*******************************************************************************
-**
-** Function RFCOMM_ParNegRsp
-**
-** Description This function is called by the user app to acknowledge
-** DLC parameter negotiation.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_ParNegRsp
+ *
+ * Description This function is called by the user app to acknowledge
+ * DLC parameter negotiation.
+ *
+ ******************************************************************************/
void RFCOMM_ParNegRsp (tRFC_MCB *p_mcb, uint8_t dlci, uint16_t mtu, uint8_t cl, uint8_t k)
{
if (p_mcb->state != RFC_MX_STATE_CONNECTED)
@@ -201,16 +201,16 @@
/*******************************************************************************
-**
-** 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
-** control block.
-**
-*******************************************************************************/
+ *
+ * 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
+ * control block.
+ *
+ ******************************************************************************/
void RFCOMM_PortNegReq (tRFC_MCB *p_mcb, uint8_t dlci, tPORT_STATE *p_pars)
{
if (p_mcb->state != RFC_MX_STATE_CONNECTED)
@@ -239,13 +239,13 @@
/*******************************************************************************
-**
-** Function RFCOMM_PortNegRsp
-**
-** Description This function is called by the user app to acknowledge
-** Port parameters negotiation.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_PortNegRsp
+ *
+ * Description This function is called by the user app to acknowledge
+ * Port parameters negotiation.
+ *
+ ******************************************************************************/
void RFCOMM_PortNegRsp (tRFC_MCB *p_mcb, uint8_t dlci, tPORT_STATE *p_pars,
uint16_t param_mask)
{
@@ -257,13 +257,13 @@
/*******************************************************************************
-**
-** Function RFCOMM_ControlReq
-**
-** Description This function is called by the port entity to send control
-** parameters to remote port emulation entity.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_ControlReq
+ *
+ * Description This function is called by the port entity to send control
+ * parameters to remote port emulation entity.
+ *
+ ******************************************************************************/
void RFCOMM_ControlReq (tRFC_MCB *p_mcb, uint8_t dlci, tPORT_CTRL *p_pars)
{
tPORT *p_port = port_find_mcb_dlci_port(p_mcb, dlci);
@@ -288,14 +288,14 @@
/*******************************************************************************
-**
-** Function RFCOMM_FlowReq
-**
-** 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.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_FlowReq
+ *
+ * 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.
+ *
+ ******************************************************************************/
void RFCOMM_FlowReq (tRFC_MCB *p_mcb, uint8_t dlci, uint8_t enable)
{
tPORT *p_port = port_find_mcb_dlci_port(p_mcb, dlci);
@@ -320,13 +320,13 @@
/*******************************************************************************
-**
-** Function RFCOMM_LineStatusReq
-**
-** Description This function is called by the port entity when line
-** status should be delivered to the peer.
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_LineStatusReq
+ *
+ * Description This function is called by the port entity when line
+ * status should be delivered to the peer.
+ *
+ ******************************************************************************/
void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, uint8_t dlci, uint8_t status)
{
tPORT *p_port = port_find_mcb_dlci_port(p_mcb, dlci);
@@ -348,12 +348,12 @@
/*******************************************************************************
-**
-** Function RFCOMM_DlcReleaseReq
-**
-** Description This function is called by the PORT unit to close DLC
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_DlcReleaseReq
+ *
+ * Description This function is called by the PORT unit to close DLC
+ *
+ ******************************************************************************/
void RFCOMM_DlcReleaseReq (tRFC_MCB *p_mcb, uint8_t dlci)
{
rfc_port_sm_execute(port_find_mcb_dlci_port (p_mcb, dlci), RFC_EVENT_CLOSE, 0);
@@ -361,12 +361,12 @@
/*******************************************************************************
-**
-** Function RFCOMM_DataReq
-**
-** Description This function is called by the user app to send data buffer
-**
-*******************************************************************************/
+ *
+ * Function RFCOMM_DataReq
+ *
+ * Description This function is called by the user app to send data buffer
+ *
+ ******************************************************************************/
void RFCOMM_DataReq (tRFC_MCB *p_mcb, uint8_t dlci, BT_HDR *p_buf)
{
rfc_port_sm_execute(port_find_mcb_dlci_port (p_mcb, dlci), RFC_EVENT_DATA, p_buf);
diff --git a/stack/rfcomm/rfc_ts_frames.cc b/stack/rfcomm/rfc_ts_frames.cc
index 9e07936..3cf9816 100644
--- a/stack/rfcomm/rfc_ts_frames.cc
+++ b/stack/rfcomm/rfc_ts_frames.cc
@@ -32,12 +32,12 @@
#include "rfc_int.h"
/*******************************************************************************
-**
-** Function rfc_send_sabme
-**
-** Description This function sends SABME frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_sabme
+ *
+ * Description This function sends SABME frame.
+ *
+ ******************************************************************************/
void rfc_send_sabme (tRFC_MCB *p_mcb, uint8_t dlci)
{
uint8_t *p_data;
@@ -61,12 +61,12 @@
/*******************************************************************************
-**
-** Function rfc_send_ua
-**
-** Description This function sends UA frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_ua
+ *
+ * Description This function sends UA frame.
+ *
+ ******************************************************************************/
void rfc_send_ua (tRFC_MCB *p_mcb, uint8_t dlci)
{
uint8_t *p_data;
@@ -90,12 +90,12 @@
/*******************************************************************************
-**
-** Function rfc_send_dm
-**
-** Description This function sends DM frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_dm
+ *
+ * Description This function sends DM frame.
+ *
+ ******************************************************************************/
void rfc_send_dm (tRFC_MCB *p_mcb, uint8_t dlci, bool pf)
{
uint8_t *p_data;
@@ -119,12 +119,12 @@
/*******************************************************************************
-**
-** Function rfc_send_disc
-**
-** Description This function sends DISC frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_disc
+ *
+ * Description This function sends DISC frame.
+ *
+ ******************************************************************************/
void rfc_send_disc (tRFC_MCB *p_mcb, uint8_t dlci)
{
uint8_t *p_data;
@@ -148,12 +148,12 @@
/*******************************************************************************
-**
-** Function rfc_send_buf_uih
-**
-** Description This function sends UIH frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_buf_uih
+ *
+ * Description This function sends UIH frame.
+ *
+ ******************************************************************************/
void rfc_send_buf_uih (tRFC_MCB *p_mcb, uint8_t dlci, BT_HDR *p_buf)
{
uint8_t *p_data;
@@ -211,12 +211,12 @@
/*******************************************************************************
-**
-** Function rfc_send_pn
-**
-** Description This function sends DLC Parameters Negotiation Frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_pn
+ *
+ * Description This function sends DLC Parameters Negotiation Frame.
+ *
+ ******************************************************************************/
void rfc_send_pn (tRFC_MCB *p_mcb, uint8_t dlci, bool is_command, uint16_t mtu, uint8_t cl, uint8_t k)
{
uint8_t *p_data;
@@ -253,12 +253,12 @@
/*******************************************************************************
-**
-** Function rfc_send_fcon
-**
-** Description This function sends Flow Control On Command.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_fcon
+ *
+ * Description This function sends Flow Control On Command.
+ *
+ ******************************************************************************/
void rfc_send_fcon (tRFC_MCB *p_mcb, bool is_command)
{
uint8_t *p_data;
@@ -278,12 +278,12 @@
/*******************************************************************************
-**
-** Function rfc_send_fcoff
-**
-** Description This function sends Flow Control Off Command.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_fcoff
+ *
+ * Description This function sends Flow Control Off Command.
+ *
+ ******************************************************************************/
void rfc_send_fcoff (tRFC_MCB *p_mcb, bool is_command)
{
uint8_t *p_data;
@@ -303,12 +303,12 @@
/*******************************************************************************
-**
-** Function rfc_send_msc
-**
-** Description This function sends Modem Status Command Frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_msc
+ *
+ * Description This function sends Modem Status Command Frame.
+ *
+ ******************************************************************************/
void rfc_send_msc (tRFC_MCB *p_mcb, uint8_t dlci, bool is_command,
tPORT_CTRL *p_pars)
{
@@ -354,12 +354,12 @@
/*******************************************************************************
-**
-** Function rfc_send_rls
-**
-** Description This function sends Remote Line Status Command Frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_rls
+ *
+ * Description This function sends Remote Line Status Command Frame.
+ *
+ ******************************************************************************/
void rfc_send_rls (tRFC_MCB *p_mcb, uint8_t dlci, bool is_command, uint8_t status)
{
uint8_t *p_data;
@@ -382,12 +382,12 @@
/*******************************************************************************
-**
-** Function rfc_send_nsc
-**
-** Description This function sends Non Supported Command Response.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_nsc
+ *
+ * Description This function sends Non Supported Command Response.
+ *
+ ******************************************************************************/
void rfc_send_nsc (tRFC_MCB *p_mcb)
{
uint8_t *p_data;
@@ -411,12 +411,12 @@
/*******************************************************************************
-**
-** Function rfc_send_rpn
-**
-** Description This function sends Remote Port Negotiation Command
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_rpn
+ *
+ * Description This function sends Remote Port Negotiation Command
+ *
+ ******************************************************************************/
void rfc_send_rpn (tRFC_MCB *p_mcb, uint8_t dlci, bool is_command,
tPORT_STATE *p_pars, uint16_t mask)
{
@@ -461,12 +461,12 @@
/*******************************************************************************
-**
-** Function rfc_send_test
-**
-** Description This function sends Test frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_test
+ *
+ * Description This function sends Test frame.
+ *
+ ******************************************************************************/
void rfc_send_test (tRFC_MCB *p_mcb, bool is_command, BT_HDR *p_buf)
{
/* Shift buffer to give space for header */
@@ -501,12 +501,12 @@
}
/*******************************************************************************
-**
-** Function rfc_send_credit
-**
-** Description This function sends a flow control credit in UIH frame.
-**
-*******************************************************************************/
+ *
+ * Function rfc_send_credit
+ *
+ * Description This function sends a flow control credit in UIH frame.
+ *
+ ******************************************************************************/
void rfc_send_credit(tRFC_MCB *p_mcb, uint8_t dlci, uint8_t credit)
{
uint8_t *p_data;
@@ -529,12 +529,12 @@
/*******************************************************************************
-**
-** Function rfc_parse_data
-**
-** Description This function processes data packet received from L2CAP
-**
-*******************************************************************************/
+ *
+ * Function rfc_parse_data
+ *
+ * Description This function processes data packet received from L2CAP
+ *
+ ******************************************************************************/
uint8_t rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
{
uint8_t ead, eal, fcs;
@@ -655,13 +655,13 @@
/*******************************************************************************
-**
-** Function rfc_process_mx_message
-**
-** Description This function processes UIH frames received on the
-** multiplexer control channel.
-**
-*******************************************************************************/
+ *
+ * Function rfc_process_mx_message
+ *
+ * Description This function processes UIH frames received on the
+ * multiplexer control channel.
+ *
+ ******************************************************************************/
void rfc_process_mx_message (tRFC_MCB *p_mcb, BT_HDR *p_buf)
{
uint8_t *p_data = (uint8_t *)(p_buf + 1) + p_buf->offset;
diff --git a/stack/rfcomm/rfc_utils.cc b/stack/rfcomm/rfc_utils.cc
index 7d63241..d989eba 100644
--- a/stack/rfcomm/rfc_utils.cc
+++ b/stack/rfcomm/rfc_utils.cc
@@ -41,12 +41,12 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*******************************************************************************
-**
-** Function rfc_calc_fcs
-**
-** Description Reversed CRC Table , 8-bit, poly=0x07
-** (GSM 07.10 TS 101 369 V6.3.0)
-*******************************************************************************/
+ *
+ * Function rfc_calc_fcs
+ *
+ * Description Reversed CRC Table , 8-bit, poly=0x07
+ * (GSM 07.10 TS 101 369 V6.3.0)
+ ******************************************************************************/
static const uint8_t rfc_crctable[] =
{
0x00, 0x91, 0xE3, 0x72, 0x07, 0x96, 0xE4, 0x75, 0x0E, 0x9F, 0xED, 0x7C, 0x09, 0x98, 0xEA, 0x7B,
@@ -72,16 +72,16 @@
/*******************************************************************************
-**
-** Function rfc_calc_fcs
-**
-** 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
-** p - points to message
-**
-*******************************************************************************/
+ *
+ * Function rfc_calc_fcs
+ *
+ * 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
+ * p - points to message
+ *
+ ******************************************************************************/
uint8_t rfc_calc_fcs (uint16_t len, uint8_t *p)
{
uint8_t fcs = 0xFF;
@@ -97,17 +97,17 @@
/*******************************************************************************
-**
-** Function rfc_check_fcs
-**
-** 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
-** p - points to message
-** received_fcs - received FCS
-**
-*******************************************************************************/
+ *
+ * Function rfc_check_fcs
+ *
+ * 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
+ * p - points to message
+ * received_fcs - received FCS
+ *
+ ******************************************************************************/
bool rfc_check_fcs (uint16_t len, uint8_t *p, uint8_t received_fcs)
{
uint8_t fcs = 0xFF;
@@ -126,13 +126,13 @@
/*******************************************************************************
-**
-** Function rfc_alloc_multiplexer_channel
-**
-** Description This function returns existing or new control block for
-** the BD_ADDR.
-**
-*******************************************************************************/
+ *
+ * Function rfc_alloc_multiplexer_channel
+ *
+ * Description This function returns existing or new control block for
+ * the BD_ADDR.
+ *
+ ******************************************************************************/
tRFC_MCB *rfc_alloc_multiplexer_channel (BD_ADDR bd_addr, bool is_initiator)
{
int i, j;
@@ -196,12 +196,12 @@
/*******************************************************************************
-**
-** Function rfc_release_multiplexer_channel
-**
-** Description Release a multiplexer control block
-**
-*******************************************************************************/
+ *
+ * Function rfc_release_multiplexer_channel
+ *
+ * Description Release a multiplexer control block
+ *
+ ******************************************************************************/
void rfc_release_multiplexer_channel (tRFC_MCB *p_mcb)
{
/* Remove the MCB from the mapping table */
@@ -224,12 +224,12 @@
/*******************************************************************************
-**
-** Function rfc_timer_start
-**
-** Description Start RFC Timer
-**
-*******************************************************************************/
+ *
+ * Function rfc_timer_start
+ *
+ * Description Start RFC Timer
+ *
+ ******************************************************************************/
void rfc_timer_start(tRFC_MCB *p_mcb, uint16_t timeout)
{
RFCOMM_TRACE_EVENT ("%s - timeout:%d seconds", __func__, timeout);
@@ -242,12 +242,12 @@
/*******************************************************************************
-**
-** Function rfc_timer_stop
-**
-** Description Stop RFC Timer
-**
-*******************************************************************************/
+ *
+ * Function rfc_timer_stop
+ *
+ * Description Stop RFC Timer
+ *
+ ******************************************************************************/
void rfc_timer_stop(tRFC_MCB *p_mcb)
{
RFCOMM_TRACE_EVENT("%s", __func__);
@@ -257,12 +257,12 @@
/*******************************************************************************
-**
-** Function rfc_port_timer_start
-**
-** Description Start RFC Timer
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_timer_start
+ *
+ * Description Start RFC Timer
+ *
+ ******************************************************************************/
void rfc_port_timer_start(tPORT *p_port, uint16_t timeout)
{
RFCOMM_TRACE_EVENT("%s - timeout:%d seconds", __func__, timeout);
@@ -274,12 +274,12 @@
}
/*******************************************************************************
-**
-** Function rfc_port_timer_stop
-**
-** Description Stop RFC Timer
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_timer_stop
+ *
+ * Description Stop RFC Timer
+ *
+ ******************************************************************************/
void rfc_port_timer_stop(tPORT *p_port)
{
RFCOMM_TRACE_EVENT ("%s", __func__);
@@ -289,15 +289,15 @@
/*******************************************************************************
-**
-** Function rfc_check_mcb_active
-**
-** Description Check if there are any opened ports on the MCB if not
-** start MCB Inact timer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_check_mcb_active
+ *
+ * Description Check if there are any opened ports on the MCB if not
+ * start MCB Inact timer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_check_mcb_active (tRFC_MCB *p_mcb)
{
uint16_t i;
@@ -336,15 +336,15 @@
}
/*******************************************************************************
-**
-** Function rfc_sec_check_complete
-**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_sec_check_complete
+ *
+ * Description The function called when Security Manager finishes
+ * verification of the service side connection
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_sec_check_complete (UNUSED_ATTR BD_ADDR bd_addr, UNUSED_ATTR tBT_TRANSPORT transport, void *p_ref_data,
uint8_t res)
{
@@ -361,16 +361,16 @@
/*******************************************************************************
-**
-** Function rfc_port_closed
-**
-** Description The function is called when port is released based on the
-** event received from the lower layer, typically L2CAP
-** connection down, DISC, or DM frame.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_port_closed
+ *
+ * Description The function is called when port is released based on the
+ * 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;
@@ -395,16 +395,16 @@
}
/*******************************************************************************
-**
-** Function rfc_inc_credit
-**
-** Description The function is called when a credit is received in a UIH
-** frame. It increments the TX credit count, and if data
-** flow had halted, it restarts it.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_inc_credit
+ *
+ * Description The function is called when a credit is received in a UIH
+ * frame. It increments the TX credit count, and if data
+ * flow had halted, it restarts it.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_inc_credit (tPORT *p_port, uint8_t credit)
{
if (p_port->rfc.p_mcb->flow == PORT_FC_CREDIT)
@@ -419,16 +419,16 @@
}
/*******************************************************************************
-**
-** Function rfc_dec_credit
-**
-** Description The function is called when a UIH frame of user data is
-** sent. It decrements the credit count. If credit count
-** Reaches zero, peer_fc is set.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_dec_credit
+ *
+ * Description The function is called when a UIH frame of user data is
+ * sent. It decrements the credit count. If credit count
+ * Reaches zero, peer_fc is set.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_dec_credit (tPORT *p_port)
{
if (p_port->rfc.p_mcb->flow == PORT_FC_CREDIT)
@@ -443,15 +443,15 @@
/*******************************************************************************
-**
-** Function rfc_check_send_cmd
-**
-** Description This function is called to send an RFCOMM command message
-** or to handle the RFCOMM command message queue.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function rfc_check_send_cmd
+ *
+ * Description This function is called to send an RFCOMM command message
+ * or to handle the RFCOMM command message queue.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void rfc_check_send_cmd(tRFC_MCB *p_mcb, BT_HDR *p_buf)
{
/* if passed a buffer queue it */
diff --git a/stack/sdp/sdp_api.cc b/stack/sdp/sdp_api.cc
index c84d9fb..094fc5e 100644
--- a/stack/sdp/sdp_api.cc
+++ b/stack/sdp/sdp_api.cc
@@ -40,30 +40,30 @@
#include "osi/include/osi.h"
/**********************************************************************
-** C L I E N T F U N C T I O N P R O T O T Y P E S *
-***********************************************************************/
+ * C L I E N T F U N C T I O N P R O T O T Y P E S *
+ **********************************************************************/
/*******************************************************************************
-**
-** Function SDP_InitDiscoveryDb
-**
-** Description This function is called to initialize a discovery database.
-**
-** Parameters: p_db - (input) address of an area of memory where the
-** discovery database is managed.
-** len - (input) size (in bytes) of the memory
-** NOTE: This must be larger than sizeof(tSDP_DISCOVERY_DB)
-** num_uuid - (input) number of UUID filters applied
-** p_uuid_list - (input) list of UUID filters
-** num_attr - (input) number of attribute filters applied
-** p_attr_list - (input) list of attribute filters
-**
-**
-** Returns bool
-** true if successful
-** false if one or more parameters are bad
-**
-*******************************************************************************/
+ *
+ * Function SDP_InitDiscoveryDb
+ *
+ * Description This function is called to initialize a discovery database.
+ *
+ * Parameters: p_db - (input) address of an area of memory where the
+ * discovery database is managed.
+ * len - (input) size (in bytes) of the memory
+ * NOTE: This must be larger than sizeof(tSDP_DISCOVERY_DB)
+ * num_uuid - (input) number of UUID filters applied
+ * p_uuid_list - (input) list of UUID filters
+ * num_attr - (input) number of attribute filters applied
+ * p_attr_list - (input) list of attribute filters
+ *
+ *
+ * Returns bool
+ * true if successful
+ * false if one or more parameters are bad
+ *
+ ******************************************************************************/
bool SDP_InitDiscoveryDb (tSDP_DISCOVERY_DB *p_db, uint32_t len, uint16_t num_uuid,
tSDP_UUID *p_uuid_list, uint16_t num_attr, uint16_t *p_attr_list)
{
@@ -106,14 +106,14 @@
/*******************************************************************************
-**
-** Function SDP_CancelServiceSearch
-**
-** Description This function cancels an active query to an SDP server.
-**
-** Returns true if discovery cancelled, false if a matching activity is not found.
-**
-*******************************************************************************/
+ *
+ * Function SDP_CancelServiceSearch
+ *
+ * Description This function cancels an active query to an SDP server.
+ *
+ * Returns true if discovery cancelled, false if a matching activity is not found.
+ *
+ ******************************************************************************/
bool SDP_CancelServiceSearch (tSDP_DISCOVERY_DB *p_db)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -130,14 +130,14 @@
/*******************************************************************************
-**
-** Function SDP_ServiceSearchRequest
-**
-** Description This function queries an SDP server for information.
-**
-** Returns true if discovery started, false if failed.
-**
-*******************************************************************************/
+ *
+ * Function SDP_ServiceSearchRequest
+ *
+ * Description This function queries an SDP server for information.
+ *
+ * Returns true if discovery started, false if failed.
+ *
+ ******************************************************************************/
bool SDP_ServiceSearchRequest (uint8_t *p_bd_addr, tSDP_DISCOVERY_DB *p_db,
tSDP_DISC_CMPL_CB *p_cb)
{
@@ -162,19 +162,19 @@
/*******************************************************************************
-**
-** Function SDP_ServiceSearchAttributeRequest
-**
-** Description This function queries an SDP server for information.
-**
-** The difference between this API function and the function
-** SDP_ServiceSearchRequest is that this one does a
-** combined ServiceSearchAttributeRequest SDP function.
-** (This is for Unplug Testing)
-**
-** Returns true if discovery started, false if failed.
-**
-*******************************************************************************/
+ *
+ * Function SDP_ServiceSearchAttributeRequest
+ *
+ * Description This function queries an SDP server for information.
+ *
+ * The difference between this API function and the function
+ * SDP_ServiceSearchRequest is that this one does a
+ * combined ServiceSearchAttributeRequest SDP function.
+ * (This is for Unplug Testing)
+ *
+ * Returns true if discovery started, false if failed.
+ *
+ ******************************************************************************/
bool SDP_ServiceSearchAttributeRequest (uint8_t *p_bd_addr, tSDP_DISCOVERY_DB *p_db,
tSDP_DISC_CMPL_CB *p_cb)
{
@@ -199,19 +199,19 @@
#endif
}
/*******************************************************************************
-**
-** Function SDP_ServiceSearchAttributeRequest2
-**
-** Description This function queries an SDP server for information.
-**
-** The difference between this API function and the function
-** SDP_ServiceSearchRequest is that this one does a
-** combined ServiceSearchAttributeRequest SDP function.
-** (This is for Unplug Testing)
-**
-** Returns true if discovery started, false if failed.
-**
-*******************************************************************************/
+ *
+ * Function SDP_ServiceSearchAttributeRequest2
+ *
+ * Description This function queries an SDP server for information.
+ *
+ * The difference between this API function and the function
+ * SDP_ServiceSearchRequest is that this one does a
+ * combined ServiceSearchAttributeRequest SDP function.
+ * (This is for Unplug Testing)
+ *
+ * Returns true if discovery started, false if failed.
+ *
+ ******************************************************************************/
bool SDP_ServiceSearchAttributeRequest2 (uint8_t *p_bd_addr, tSDP_DISCOVERY_DB *p_db,
tSDP_DISC_CMPL_CB2 *p_cb2, void * user_data)
{
@@ -245,17 +245,17 @@
#endif
/*******************************************************************************
-**
-** Function SDP_FindAttributeInDb
-**
-** Description This function queries an SDP database for a specific attribute.
-** If the p_start_rec pointer is NULL, it looks from the beginning
-** of the database, else it continues from the next record after
-** p_start_rec.
-**
-** Returns Pointer to matching record, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindAttributeInDb
+ *
+ * Description This function queries an SDP database for a specific attribute.
+ * If the p_start_rec pointer is NULL, it looks from the beginning
+ * of the database, else it continues from the next record after
+ * p_start_rec.
+ *
+ * Returns Pointer to matching record, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_REC *SDP_FindAttributeInDb (tSDP_DISCOVERY_DB *p_db, uint16_t attr_id,
tSDP_DISC_REC *p_start_rec)
{
@@ -292,15 +292,15 @@
/*******************************************************************************
-**
-** Function SDP_FindAttributeInRec
-**
-** Description This function searches an SDP discovery record for a specific
-** attribute.
-**
-** Returns Pointer to matching attribute entry, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindAttributeInRec
+ *
+ * Description This function searches an SDP discovery record for a specific
+ * attribute.
+ *
+ * Returns Pointer to matching attribute entry, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_ATTR *SDP_FindAttributeInRec (tSDP_DISC_REC *p_rec, uint16_t attr_id)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -320,18 +320,18 @@
}
/*******************************************************************************
-**
-** Function SDP_FindServiceUUIDInRec
-**
-** Description This function is called to read the service UUID within a record
-** if there is any.
-**
-** Parameters: p_rec - pointer to a SDP record.
-** p_uuid - output parameter to save the UUID found.
-**
-** Returns true if found, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceUUIDInRec
+ *
+ * Description This function is called to read the service UUID within a record
+ * if there is any.
+ *
+ * Parameters: p_rec - pointer to a SDP record.
+ * p_uuid - output parameter to save the UUID found.
+ *
+ * Returns true if found, otherwise false.
+ *
+ ******************************************************************************/
bool SDP_FindServiceUUIDInRec(tSDP_DISC_REC *p_rec, tBT_UUID * p_uuid)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -412,18 +412,18 @@
}
/*******************************************************************************
-**
-** Function SDP_FindServiceUUIDInRec_128bit
-**
-** Description This function is called to read the 128-bit service UUID within a record
-** if there is any.
-**
-** Parameters: p_rec - pointer to a SDP record.
-** p_uuid - output parameter to save the UUID found.
-**
-** Returns true if found, otherwise false.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceUUIDInRec_128bit
+ *
+ * Description This function is called to read the 128-bit service UUID within a record
+ * if there is any.
+ *
+ * Parameters: p_rec - pointer to a SDP record.
+ * p_uuid - output parameter to save the UUID found.
+ *
+ * Returns true if found, otherwise false.
+ *
+ ******************************************************************************/
bool SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC *p_rec, tBT_UUID * p_uuid)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -471,17 +471,17 @@
}
/*******************************************************************************
-**
-** Function SDP_FindServiceInDb
-**
-** Description This function queries an SDP database for a specific service.
-** If the p_start_rec pointer is NULL, it looks from the beginning
-** of the database, else it continues from the next record after
-** p_start_rec.
-**
-** Returns Pointer to record containing service class, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceInDb
+ *
+ * Description This function queries an SDP database for a specific service.
+ * If the p_start_rec pointer is NULL, it looks from the beginning
+ * of the database, else it continues from the next record after
+ * p_start_rec.
+ *
+ * Returns Pointer to record containing service class, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_REC *SDP_FindServiceInDb (tSDP_DISCOVERY_DB *p_db, uint16_t service_uuid, tSDP_DISC_REC *p_start_rec)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -576,20 +576,20 @@
}
/*******************************************************************************
-**
-** Function SDP_FindServiceInDb_128bit
-**
-** Description This function queries an SDP database for a specific service.
-** If the p_start_rec pointer is NULL, it looks from the beginning
-** of the database, else it continues from the next record after
-** p_start_rec.
-**
-** This function is kept separate from SDP_FindServiceInDb since
-** that API is expected to return only 16-bit UUIDs
-**
-** Returns Pointer to record containing service class, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceInDb_128bit
+ *
+ * Description This function queries an SDP database for a specific service.
+ * If the p_start_rec pointer is NULL, it looks from the beginning
+ * of the database, else it continues from the next record after
+ * p_start_rec.
+ *
+ * This function is kept separate from SDP_FindServiceInDb since
+ * that API is expected to return only 16-bit UUIDs
+ *
+ * Returns Pointer to record containing service class, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_REC *SDP_FindServiceInDb_128bit(tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_start_rec)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -642,20 +642,20 @@
/*******************************************************************************
-**
-** Function SDP_FindServiceUUIDInDb
-**
-** Description This function queries an SDP database for a specific service.
-** If the p_start_rec pointer is NULL, it looks from the beginning
-** of the database, else it continues from the next record after
-** p_start_rec.
-**
-** NOTE the only difference between this function and the previous function
-** "SDP_FindServiceInDb()" is that this function takes a tBT_UUID input
-**
-** Returns Pointer to record containing service class, or NULL
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindServiceUUIDInDb
+ *
+ * Description This function queries an SDP database for a specific service.
+ * If the p_start_rec pointer is NULL, it looks from the beginning
+ * of the database, else it continues from the next record after
+ * p_start_rec.
+ *
+ * NOTE the only difference between this function and the previous function
+ * "SDP_FindServiceInDb()" is that this function takes a tBT_UUID input
+ *
+ * Returns Pointer to record containing service class, or NULL
+ *
+ ******************************************************************************/
tSDP_DISC_REC *SDP_FindServiceUUIDInDb (tSDP_DISCOVERY_DB *p_db, tBT_UUID *p_uuid, tSDP_DISC_REC *p_start_rec)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -710,15 +710,15 @@
#if (SDP_CLIENT_ENABLED == TRUE)
/*******************************************************************************
-**
-** Function sdp_fill_proto_elem
-**
-** Description This function retrieves the protocol element.
-**
-** Returns true if found, false if not
-** If found, the passed protocol list element is filled in.
-**
-*******************************************************************************/
+ *
+ * Function sdp_fill_proto_elem
+ *
+ * Description This function retrieves the protocol element.
+ *
+ * Returns true if found, false if not
+ * If found, the passed protocol list element is filled in.
+ *
+ ******************************************************************************/
static bool sdp_fill_proto_elem( tSDP_DISC_ATTR *p_attr, uint16_t layer_uuid,
tSDP_PROTOCOL_ELEM *p_elem)
{
@@ -769,16 +769,16 @@
#endif /* CLIENT_ENABLED == TRUE */
/*******************************************************************************
-**
-** Function SDP_FindProtocolListElemInRec
-**
-** Description This function looks at a specific discovery record for a protocol
-** list element.
-**
-** Returns true if found, false if not
-** If found, the passed protocol list element is filled in.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindProtocolListElemInRec
+ *
+ * Description This function looks at a specific discovery record for a protocol
+ * list element.
+ *
+ * Returns true if found, false if not
+ * If found, the passed protocol list element is filled in.
+ *
+ ******************************************************************************/
bool SDP_FindProtocolListElemInRec (tSDP_DISC_REC *p_rec, uint16_t layer_uuid, tSDP_PROTOCOL_ELEM *p_elem)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -802,16 +802,16 @@
/*******************************************************************************
-**
-** Function SDP_FindAddProtoListsElemInRec
-**
-** Description This function looks at a specific discovery record for a protocol
-** list element.
-**
-** Returns true if found, false if not
-** If found, the passed protocol list element is filled in.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindAddProtoListsElemInRec
+ *
+ * Description This function looks at a specific discovery record for a protocol
+ * list element.
+ *
+ * Returns true if found, false if not
+ * If found, the passed protocol list element is filled in.
+ *
+ ******************************************************************************/
bool SDP_FindAddProtoListsElemInRec (tSDP_DISC_REC *p_rec, uint16_t layer_uuid, tSDP_PROTOCOL_ELEM *p_elem)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -846,19 +846,19 @@
/*******************************************************************************
-**
-** Function SDP_FindProfileVersionInRec
-**
-** Description This function looks at a specific discovery record for the
-** Profile list descriptor, and pulls out the version number.
-** The version number consists of an 8-bit major version and
-** an 8-bit minor version.
-**
-** Returns true if found, false if not
-** If found, the major and minor version numbers that were passed
-** in are filled in.
-**
-*******************************************************************************/
+ *
+ * Function SDP_FindProfileVersionInRec
+ *
+ * Description This function looks at a specific discovery record for the
+ * Profile list descriptor, and pulls out the version number.
+ * The version number consists of an 8-bit major version and
+ * an 8-bit minor version.
+ *
+ * Returns true if found, false if not
+ * If found, the major and minor version numbers that were passed
+ * in are filled in.
+ *
+ ******************************************************************************/
bool SDP_FindProfileVersionInRec (tSDP_DISC_REC *p_rec, uint16_t profile_uuid, uint16_t *p_version)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -914,18 +914,18 @@
}
/*******************************************************************************
-** Device Identification (DI) Client Functions
-*******************************************************************************/
+ * Device Identification (DI) Client Functions
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function SDP_DiDiscover
-**
-** Description This function queries a remote device for DI information.
-**
-** Returns SDP_SUCCESS if query started successfully, else error
-**
-*******************************************************************************/
+ *
+ * Function SDP_DiDiscover
+ *
+ * Description This function queries a remote device for DI information.
+ *
+ * Returns SDP_SUCCESS if query started successfully, else error
+ *
+ ******************************************************************************/
uint16_t SDP_DiDiscover( BD_ADDR remote_device, tSDP_DISCOVERY_DB *p_db,
uint32_t len, tSDP_DISC_CMPL_CB *p_cb )
{
@@ -950,14 +950,14 @@
}
/*******************************************************************************
-**
-** Function SDP_GetNumDiRecords
-**
-** Description Searches specified database for DI records
-**
-** Returns number of DI records found
-**
-*******************************************************************************/
+ *
+ * Function SDP_GetNumDiRecords
+ *
+ * Description Searches specified database for DI records
+ *
+ * Returns number of DI records found
+ *
+ ******************************************************************************/
uint8_t SDP_GetNumDiRecords( tSDP_DISCOVERY_DB *p_db )
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -979,14 +979,14 @@
}
/*******************************************************************************
-**
-** Function SDP_AttrStringCopy
-**
-** Description This function copy given attribute to specified buffer as a string
-**
-** Returns none
-**
-*******************************************************************************/
+ *
+ * Function SDP_AttrStringCopy
+ *
+ * Description This function copy given attribute to specified buffer as a string
+ *
+ * Returns none
+ *
+ ******************************************************************************/
static void SDP_AttrStringCopy(char *dst, tSDP_DISC_ATTR *p_attr, uint16_t dst_size)
{
if ( dst == NULL ) return;
@@ -1007,15 +1007,15 @@
}
/*******************************************************************************
-**
-** Function SDP_GetDiRecord
-**
-** Description This function retrieves a remote device's DI record from
-** the specified database.
-**
-** Returns SDP_SUCCESS if record retrieved, else error
-**
-*******************************************************************************/
+ *
+ * Function SDP_GetDiRecord
+ *
+ * Description This function retrieves a remote device's DI record from
+ * the specified database.
+ *
+ * Returns SDP_SUCCESS if record retrieved, else error
+ *
+ ******************************************************************************/
uint16_t SDP_GetDiRecord( uint8_t get_record_index, tSDP_DI_GET_RECORD *p_device_info,
tSDP_DISCOVERY_DB *p_db )
{
@@ -1102,20 +1102,20 @@
}
/*******************************************************************************
-** Device Identification (DI) Server Functions
-*******************************************************************************/
+ * Device Identification (DI) Server Functions
+ ******************************************************************************/
/*******************************************************************************
-**
-** Function SDP_SetLocalDiRecord
-**
-** Description This function adds a DI record to the local SDP database.
-**
-**
-**
-** Returns Returns SDP_SUCCESS if record added successfully, else error
-**
-*******************************************************************************/
+ *
+ * Function SDP_SetLocalDiRecord
+ *
+ * Description This function adds a DI record to the local SDP database.
+ *
+ *
+ *
+ * Returns Returns SDP_SUCCESS if record added successfully, else error
+ *
+ ******************************************************************************/
uint16_t SDP_SetLocalDiRecord( tSDP_DI_RECORD *p_device_info, uint32_t *p_handle )
{
#if (SDP_SERVER_ENABLED == TRUE)
@@ -1260,15 +1260,15 @@
}
/*******************************************************************************
-**
-** Function SDP_SetTraceLevel
-**
-** Description This function sets the trace level for SDP. If called with
-** a value of 0xFF, it simply reads the current trace level.
-**
-** Returns the new (current) trace level
-**
-*******************************************************************************/
+ *
+ * Function SDP_SetTraceLevel
+ *
+ * Description This function sets the trace level for SDP. If called with
+ * a value of 0xFF, it simply reads the current trace level.
+ *
+ * Returns the new (current) trace level
+ *
+ ******************************************************************************/
uint8_t SDP_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
diff --git a/stack/sdp/sdp_db.cc b/stack/sdp/sdp_db.cc
index a4f640c..434479d 100644
--- a/stack/sdp/sdp_db.cc
+++ b/stack/sdp/sdp_db.cc
@@ -38,24 +38,24 @@
#include "sdpint.h"
#if (SDP_SERVER_ENABLED == TRUE)
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static bool find_uuid_in_seq (uint8_t *p , uint32_t seq_len, uint8_t *p_his_uuid,
uint16_t his_len, int nest_level);
/*******************************************************************************
-**
-** Function sdp_db_service_search
-**
-** Description This function searches for a record that contains the
-** specified UIDs. It is passed either NULL to start at the
-** beginning, or the previous record found.
-**
-** Returns Pointer to the record, or NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function sdp_db_service_search
+ *
+ * Description This function searches for a record that contains the
+ * specified UIDs. It is passed either NULL to start at the
+ * beginning, or the previous record found.
+ *
+ * Returns Pointer to the record, or NULL if not found.
+ *
+ ******************************************************************************/
tSDP_RECORD *sdp_db_service_search (tSDP_RECORD *p_rec, tSDP_UUID_SEQ *p_seq)
{
uint16_t xx, yy;
@@ -107,14 +107,14 @@
}
/*******************************************************************************
-**
-** Function find_uuid_in_seq
-**
-** Description This function searches a data element sequenct for a UUID.
-**
-** Returns true if found, else false
-**
-*******************************************************************************/
+ *
+ * Function find_uuid_in_seq
+ *
+ * Description This function searches a data element sequenct for a UUID.
+ *
+ * Returns true if found, else false
+ *
+ ******************************************************************************/
static bool find_uuid_in_seq (uint8_t *p , uint32_t seq_len, uint8_t *p_uuid,
uint16_t uuid_len, int nest_level)
{
@@ -149,15 +149,15 @@
}
/*******************************************************************************
-**
-** Function sdp_db_find_record
-**
-** Description This function searches for a record with a specific handle
-** It is passed the handle of the record.
-**
-** Returns Pointer to the record, or NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function sdp_db_find_record
+ *
+ * Description This function searches for a record with a specific handle
+ * It is passed the handle of the record.
+ *
+ * Returns Pointer to the record, or NULL if not found.
+ *
+ ******************************************************************************/
tSDP_RECORD *sdp_db_find_record (uint32_t handle)
{
tSDP_RECORD *p_rec;
@@ -175,17 +175,17 @@
}
/*******************************************************************************
-**
-** Function sdp_db_find_attr_in_rec
-**
-** Description This function searches a record for specific attributes.
-** It is passed a pointer to the record. If the record contains
-** the specified attribute, (the caller may specify be a range
-** of attributes), the attribute is returned.
-**
-** Returns Pointer to the attribute, or NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function sdp_db_find_attr_in_rec
+ *
+ * Description This function searches a record for specific attributes.
+ * It is passed a pointer to the record. If the record contains
+ * the specified attribute, (the caller may specify be a range
+ * of attributes), the attribute is returned.
+ *
+ * Returns Pointer to the attribute, or NULL if not found.
+ *
+ ******************************************************************************/
tSDP_ATTRIBUTE *sdp_db_find_attr_in_rec (tSDP_RECORD *p_rec, uint16_t start_attr,
uint16_t end_attr)
{
@@ -206,15 +206,15 @@
/*******************************************************************************
-**
-** Function sdp_compose_proto_list
-**
-** Description This function is called to compose a data sequence from
-** protocol element list struct pointer
-**
-** Returns the length of the data sequence
-**
-*******************************************************************************/
+ *
+ * Function sdp_compose_proto_list
+ *
+ * Description This function is called to compose a data sequence from
+ * protocol element list struct pointer
+ *
+ * Returns the length of the data sequence
+ *
+ ******************************************************************************/
static int sdp_compose_proto_list( uint8_t *p, uint16_t num_elem,
tSDP_PROTOCOL_ELEM *p_elem_list)
{
@@ -265,17 +265,17 @@
#endif /* SDP_SERVER_ENABLED == TRUE */
/*******************************************************************************
-**
-** Function SDP_CreateRecord
-**
-** Description This function is called to create a record in the database.
-** This would be through the SDP database maintenance API. The
-** record is created empty, teh application should then call
-** "add_attribute" to add the record's attributes.
-**
-** Returns Record handle if OK, else 0.
-**
-*******************************************************************************/
+ *
+ * Function SDP_CreateRecord
+ *
+ * Description This function is called to create a record in the database.
+ * This would be through the SDP database maintenance API. The
+ * record is created empty, teh application should then call
+ * "add_attribute" to add the record's attributes.
+ *
+ * Returns Record handle if OK, else 0.
+ *
+ ******************************************************************************/
uint32_t SDP_CreateRecord (void)
{
#if (SDP_SERVER_ENABLED == TRUE)
@@ -314,18 +314,18 @@
/*******************************************************************************
-**
-** Function SDP_DeleteRecord
-**
-** Description This function is called to add a record (or all records)
-** from the database. This would be through the SDP database
-** maintenance API.
-**
-** If a record handle of 0 is passed, all records are deleted.
-**
-** Returns true if succeeded, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_DeleteRecord
+ *
+ * Description This function is called to add a record (or all records)
+ * from the database. This would be through the SDP database
+ * maintenance API.
+ *
+ * If a record handle of 0 is passed, all records are deleted.
+ *
+ * Returns true if succeeded, else false
+ *
+ ******************************************************************************/
bool SDP_DeleteRecord (uint32_t handle)
{
#if (SDP_SERVER_ENABLED == TRUE)
@@ -379,19 +379,19 @@
/*******************************************************************************
-**
-** Function SDP_AddAttribute
-**
-** Description This function is called to add an attribute to a record.
-** This would be through the SDP database maintenance API.
-** If the attribute already exists in the record, it is replaced
-** with the new value.
-**
-** NOTE Attribute values must be passed as a Big Endian stream.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddAttribute
+ *
+ * Description This function is called to add an attribute to a record.
+ * This would be through the SDP database maintenance API.
+ * If the attribute already exists in the record, it is replaced
+ * with the new value.
+ *
+ * NOTE Attribute values must be passed as a Big Endian stream.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddAttribute (uint32_t handle, uint16_t attr_id, uint8_t attr_type,
uint32_t attr_len, uint8_t *p_val)
{
@@ -509,19 +509,19 @@
/*******************************************************************************
-**
-** Function SDP_AddSequence
-**
-** Description This function is called to add a sequence to a record.
-** This would be through the SDP database maintenance API.
-** If the sequence already exists in the record, it is replaced
-** with the new sequence.
-**
-** NOTE Element values must be passed as a Big Endian stream.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddSequence
+ *
+ * Description This function is called to add a sequence to a record.
+ * This would be through the SDP database maintenance API.
+ * If the sequence already exists in the record, it is replaced
+ * with the new sequence.
+ *
+ * NOTE Element values must be passed as a Big Endian stream.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddSequence (uint32_t handle, uint16_t attr_id, uint16_t num_elem,
uint8_t type[], uint8_t len[], uint8_t *p_val[])
{
@@ -589,17 +589,17 @@
/*******************************************************************************
-**
-** Function SDP_AddUuidSequence
-**
-** Description This function is called to add a UUID sequence to a record.
-** This would be through the SDP database maintenance API.
-** If the sequence already exists in the record, it is replaced
-** with the new sequence.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddUuidSequence
+ *
+ * Description This function is called to add a UUID sequence to a record.
+ * This would be through the SDP database maintenance API.
+ * If the sequence already exists in the record, it is replaced
+ * with the new sequence.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddUuidSequence (uint32_t handle, uint16_t attr_id, uint16_t num_uuids,
uint16_t *p_uuids)
{
@@ -634,17 +634,17 @@
}
/*******************************************************************************
-**
-** Function SDP_AddProtocolList
-**
-** Description This function is called to add a protocol descriptor list to
-** a record. This would be through the SDP database maintenance API.
-** If the protocol list already exists in the record, it is replaced
-** with the new list.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddProtocolList
+ *
+ * Description This function is called to add a protocol descriptor list to
+ * a record. This would be through the SDP database maintenance API.
+ * If the protocol list already exists in the record, it is replaced
+ * with the new list.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddProtocolList (uint32_t handle, uint16_t num_elem,
tSDP_PROTOCOL_ELEM *p_elem_list)
{
@@ -664,17 +664,17 @@
/*******************************************************************************
-**
-** Function SDP_AddAdditionProtoLists
-**
-** Description This function is called to add a protocol descriptor list to
-** a record. This would be through the SDP database maintenance API.
-** If the protocol list already exists in the record, it is replaced
-** with the new list.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddAdditionProtoLists
+ *
+ * Description This function is called to add a protocol descriptor list to
+ * a record. This would be through the SDP database maintenance API.
+ * If the protocol list already exists in the record, it is replaced
+ * with the new list.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddAdditionProtoLists (uint32_t handle, uint16_t num_elem,
tSDP_PROTO_LIST_ELEM *p_proto_list)
{
@@ -711,17 +711,17 @@
}
/*******************************************************************************
-**
-** Function SDP_AddProfileDescriptorList
-**
-** Description This function is called to add a profile descriptor list to
-** a record. This would be through the SDP database maintenance API.
-** If the version already exists in the record, it is replaced
-** with the new one.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddProfileDescriptorList
+ *
+ * Description This function is called to add a profile descriptor list to
+ * a record. This would be through the SDP database maintenance API.
+ * If the version already exists in the record, it is replaced
+ * with the new one.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddProfileDescriptorList (uint32_t handle, uint16_t profile_uuid,
uint16_t version)
{
@@ -755,17 +755,17 @@
/*******************************************************************************
-**
-** Function SDP_AddLanguageBaseAttrIDList
-**
-** Description This function is called to add a language base attr list to
-** a record. This would be through the SDP database maintenance API.
-** If the version already exists in the record, it is replaced
-** with the new one.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddLanguageBaseAttrIDList
+ *
+ * Description This function is called to add a language base attr list to
+ * a record. This would be through the SDP database maintenance API.
+ * If the version already exists in the record, it is replaced
+ * with the new one.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddLanguageBaseAttrIDList (uint32_t handle, uint16_t lang,
uint16_t char_enc, uint16_t base_id)
{
@@ -798,17 +798,17 @@
/*******************************************************************************
-**
-** Function SDP_AddServiceClassIdList
-**
-** Description This function is called to add a service list to a record.
-** This would be through the SDP database maintenance API.
-** If the service list already exists in the record, it is replaced
-** with the new list.
-**
-** Returns true if added OK, else false
-**
-*******************************************************************************/
+ *
+ * Function SDP_AddServiceClassIdList
+ *
+ * Description This function is called to add a service list to a record.
+ * This would be through the SDP database maintenance API.
+ * If the service list already exists in the record, it is replaced
+ * with the new list.
+ *
+ * Returns true if added OK, else false
+ *
+ ******************************************************************************/
bool SDP_AddServiceClassIdList (uint32_t handle, uint16_t num_services,
uint16_t *p_service_uuids)
{
@@ -837,15 +837,15 @@
/*******************************************************************************
-**
-** Function SDP_DeleteAttribute
-**
-** Description This function is called to delete an attribute from a record.
-** This would be through the SDP database maintenance API.
-**
-** Returns true if deleted OK, else false if not found
-**
-*******************************************************************************/
+ *
+ * Function SDP_DeleteAttribute
+ *
+ * Description This function is called to delete an attribute from a record.
+ * This would be through the SDP database maintenance API.
+ *
+ * Returns true if deleted OK, else false if not found
+ *
+ ******************************************************************************/
bool SDP_DeleteAttribute (uint32_t handle, uint16_t attr_id)
{
#if (SDP_SERVER_ENABLED == TRUE)
@@ -907,18 +907,18 @@
}
/*******************************************************************************
-**
-** Function SDP_ReadRecord
-**
-** Description This function is called to get the raw data of the record
-** with the given handle from the database.
-**
-** Returns -1, if the record is not found.
-** Otherwise, the offset (0 or 1) to start of data in p_data.
-**
-** The size of data copied into p_data is in *p_data_len.
-**
-*******************************************************************************/
+ *
+ * Function SDP_ReadRecord
+ *
+ * Description This function is called to get the raw data of the record
+ * with the given handle from the database.
+ *
+ * Returns -1, if the record is not found.
+ * Otherwise, the offset (0 or 1) to start of data in p_data.
+ *
+ * The size of data copied into p_data is in *p_data_len.
+ *
+ ******************************************************************************/
#if (SDP_RAW_DATA_INCLUDED == TRUE)
int32_t SDP_ReadRecord(uint32_t handle, uint8_t *p_data, int32_t *p_data_len)
{
diff --git a/stack/sdp/sdp_discovery.cc b/stack/sdp/sdp_discovery.cc
index d1fdc55..e6a7373 100644
--- a/stack/sdp/sdp_discovery.cc
+++ b/stack/sdp/sdp_discovery.cc
@@ -41,9 +41,9 @@
#define SDP_DEBUG_RAW false
#endif
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
#if (SDP_CLIENT_ENABLED == TRUE)
static void process_service_search_rsp (tCONN_CB *p_ccb, uint8_t *p_reply);
static void process_service_attr_rsp (tCONN_CB *p_ccb, uint8_t *p_reply);
@@ -59,16 +59,16 @@
extern fixed_queue_t *btu_general_alarm_queue;
/*******************************************************************************
-**
-** Function sdpu_build_uuid_seq
-**
-** Description This function builds a UUID sequence from the list of
-** passed UUIDs. It is also passed the address of the output
-** buffer.
-**
-** Returns Pointer to next byte in the output buffer.
-**
-*******************************************************************************/
+ *
+ * Function sdpu_build_uuid_seq
+ *
+ * Description This function builds a UUID sequence from the list of
+ * passed UUIDs. It is also passed the address of the output
+ * buffer.
+ *
+ * Returns Pointer to next byte in the output buffer.
+ *
+ ******************************************************************************/
static uint8_t *sdpu_build_uuid_seq (uint8_t *p_out, uint16_t num_uuids, tSDP_UUID *p_uuid_list)
{
uint16_t xx;
@@ -109,14 +109,14 @@
}
/*******************************************************************************
-**
-** Function sdp_snd_service_search_req
-**
-** Description Send a service search request to the SDP server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_snd_service_search_req
+ *
+ * Description Send a service search request to the SDP server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void sdp_snd_service_search_req(tCONN_CB *p_ccb, uint8_t cont_len, uint8_t * p_cont)
{
uint8_t *p, *p_start, *p_param_len;
@@ -178,15 +178,15 @@
}
/*******************************************************************************
-**
-** Function sdp_disc_connected
-**
-** Description This function is called when an SDP discovery attempt is
-** connected.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_disc_connected
+ *
+ * Description This function is called when an SDP discovery attempt is
+ * connected.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void sdp_disc_connected (tCONN_CB *p_ccb)
{
if (p_ccb->is_attr_search)
@@ -208,15 +208,15 @@
}
/*******************************************************************************
-**
-** Function sdp_disc_server_rsp
-**
-** Description This function is called when there is a response from
-** the server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_disc_server_rsp
+ *
+ * Description This function is called when there is a response from
+ * the server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void sdp_disc_server_rsp (tCONN_CB *p_ccb, BT_HDR *p_msg)
{
uint8_t *p, rsp_pdu;
@@ -271,15 +271,15 @@
}
/******************************************************************************
-**
-** Function process_service_search_rsp
-**
-** Description This function is called when there is a search response from
-** the server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function process_service_search_rsp
+ *
+ * Description This function is called when there is a search response from
+ * the server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void process_service_search_rsp (tCONN_CB *p_ccb, uint8_t *p_reply)
{
uint16_t xx;
@@ -331,15 +331,15 @@
}
/*******************************************************************************
-**
-** Function sdp_copy_raw_data
-**
-** Description copy the raw data
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_copy_raw_data
+ *
+ * Description copy the raw data
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
#if (SDP_RAW_DATA_INCLUDED == TRUE)
static void sdp_copy_raw_data (tCONN_CB *p_ccb, bool offset)
{
@@ -386,15 +386,15 @@
#endif
/*******************************************************************************
-**
-** Function process_service_attr_rsp
-**
-** Description This function is called when there is a attribute response from
-** the server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function process_service_attr_rsp
+ *
+ * Description This function is called when there is a attribute response from
+ * the server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void process_service_attr_rsp (tCONN_CB *p_ccb, uint8_t *p_reply)
{
uint8_t *p_start, *p_param_len;
@@ -532,15 +532,15 @@
/*******************************************************************************
-**
-** Function process_service_search_attr_rsp
-**
-** Description This function is called when there is a search attribute
-** response from the server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function process_service_search_attr_rsp
+ *
+ * Description This function is called when there is a search attribute
+ * response from the server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void process_service_search_attr_rsp (tCONN_CB *p_ccb, uint8_t *p_reply)
{
uint8_t *p, *p_start, *p_end, *p_param_len;
@@ -710,15 +710,15 @@
}
/*******************************************************************************
-**
-** Function save_attr_seq
-**
-** Description This function is called when there is a response from
-** the server.
-**
-** Returns pointer to next byte or NULL if error
-**
-*******************************************************************************/
+ *
+ * Function save_attr_seq
+ *
+ * Description This function is called when there is a response from
+ * the server.
+ *
+ * Returns pointer to next byte or NULL if error
+ *
+ ******************************************************************************/
static uint8_t *save_attr_seq (tCONN_CB *p_ccb, uint8_t *p, uint8_t *p_msg_end)
{
uint32_t seq_len, attr_len;
@@ -778,14 +778,14 @@
/*******************************************************************************
-**
-** Function add_record
-**
-** Description This function allocates space for a record from the DB.
-**
-** Returns pointer to next byte in data stream
-**
-*******************************************************************************/
+ *
+ * Function add_record
+ *
+ * Description This function allocates space for a record from the DB.
+ *
+ * Returns pointer to next byte in data stream
+ *
+ ******************************************************************************/
tSDP_DISC_REC *add_record (tSDP_DISCOVERY_DB *p_db, BD_ADDR p_bda)
{
tSDP_DISC_REC *p_rec;
@@ -821,15 +821,15 @@
#define SDP_ADDITIONAL_LIST_MASK 0x80
/*******************************************************************************
-**
-** Function add_attr
-**
-** Description This function allocates space for an attribute from the DB
-** and copies the data into it.
-**
-** Returns pointer to next byte in data stream
-**
-*******************************************************************************/
+ *
+ * Function add_attr
+ *
+ * Description This function allocates space for an attribute from the DB
+ * and copies the data into it.
+ *
+ * Returns pointer to next byte in data stream
+ *
+ ******************************************************************************/
static uint8_t *add_attr (uint8_t *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
uint16_t attr_id, tSDP_DISC_ATTR *p_parent_attr, uint8_t nest_level)
{
diff --git a/stack/sdp/sdp_main.cc b/stack/sdp/sdp_main.cc
index af696b4..dc635aa 100644
--- a/stack/sdp/sdp_main.cc
+++ b/stack/sdp/sdp_main.cc
@@ -46,14 +46,14 @@
extern fixed_queue_t *btu_general_alarm_queue;
-/********************************************************************************/
+/******************************************************************************/
/* G L O B A L S D P D A T A */
-/********************************************************************************/
+/******************************************************************************/
tSDP_CB sdp_cb;
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void sdp_connect_ind (BD_ADDR bd_addr, uint16_t l2cap_cid, UNUSED_ATTR uint16_t psm,
uint8_t l2cap_id);
static void sdp_config_ind (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg);
@@ -71,14 +71,14 @@
/*******************************************************************************
-**
-** Function sdp_init
-**
-** Description This function initializes the SDP unit.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_init
+ *
+ * Description This function initializes the SDP unit.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void sdp_init (void)
{
/* Clears all structures and local SDP database (if Server is enabled) */
@@ -140,14 +140,14 @@
#if (SDP_DEBUG == TRUE)
/*******************************************************************************
-**
-** Function sdp_set_max_attr_list_size
-**
-** Description This function sets the max attribute list size to use
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_set_max_attr_list_size
+ *
+ * Description This function sets the max attribute list size to use
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint16_t sdp_set_max_attr_list_size (uint16_t max_size)
{
if (max_size > (sdp_cb.l2cap_my_cfg.mtu - 16) )
@@ -160,16 +160,16 @@
#endif
/*******************************************************************************
-**
-** Function sdp_connect_ind
-**
-** Description This function handles an inbound connection indication
-** from L2CAP. This is the case where we are acting as a
-** server.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_connect_ind
+ *
+ * Description This function handles an inbound connection indication
+ * from L2CAP. This is the case where we are acting as a
+ * server.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void sdp_connect_ind (BD_ADDR bd_addr, uint16_t l2cap_cid,
UNUSED_ATTR uint16_t psm, uint8_t l2cap_id)
{
@@ -219,16 +219,16 @@
#if (SDP_CLIENT_ENABLED == TRUE)
/*******************************************************************************
-**
-** Function sdp_connect_cfm
-**
-** Description This function handles the connect confirm events
-** from L2CAP. This is the case when we are acting as a
-** client and have sent a connect request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_connect_cfm
+ *
+ * Description This function handles the connect confirm events
+ * from L2CAP. This is the case when we are acting as a
+ * client and have sent a connect request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void sdp_connect_cfm (uint16_t l2cap_cid, uint16_t result)
{
tCONN_CB *p_ccb;
@@ -299,15 +299,15 @@
/*******************************************************************************
-**
-** Function sdp_config_ind
-**
-** Description This function processes the L2CAP configuration indication
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_config_ind
+ *
+ * Description This function processes the L2CAP configuration indication
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void sdp_config_ind (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
tCONN_CB *p_ccb;
@@ -395,15 +395,15 @@
}
/*******************************************************************************
-**
-** Function sdp_config_cfm
-**
-** Description This function processes the L2CAP configuration confirmation
-** event.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_config_cfm
+ *
+ * Description This function processes the L2CAP configuration confirmation
+ * event.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void sdp_config_cfm (uint16_t l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
tCONN_CB *p_ccb;
@@ -457,15 +457,15 @@
}
/*******************************************************************************
-**
-** Function sdp_disconnect_ind
-**
-** Description This function handles a disconnect event from L2CAP. If
-** requested to, we ack the disconnect before dropping the CCB
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_disconnect_ind
+ *
+ * Description This function handles a disconnect event from L2CAP. If
+ * requested to, we ack the disconnect before dropping the CCB
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void sdp_disconnect_ind (uint16_t l2cap_cid, bool ack_needed)
{
tCONN_CB *p_ccb;
@@ -496,20 +496,20 @@
}
/*******************************************************************************
-**
-** Function sdp_data_ind
-**
-** Description This function is called when data is received from L2CAP.
-** if we are the originator of the connection, we are the SDP
-** client, and the received message is queued up for the client.
-**
-** If we are the destination of the connection, we are the SDP
-** server, so the message is passed to the server processing
-** function.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_data_ind
+ *
+ * Description This function is called when data is received from L2CAP.
+ * if we are the originator of the connection, we are the SDP
+ * client, and the received message is queued up for the client.
+ *
+ * If we are the destination of the connection, we are the SDP
+ * server, so the message is passed to the server processing
+ * function.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void sdp_data_ind (uint16_t l2cap_cid, BT_HDR *p_msg)
{
tCONN_CB *p_ccb;
@@ -542,15 +542,15 @@
#if (SDP_CLIENT_ENABLED == TRUE)
/*******************************************************************************
-**
-** Function sdp_conn_originate
-**
-** Description This function is called from the API to originate a
-** connection.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_conn_originate
+ *
+ * Description This function is called from the API to originate a
+ * connection.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
tCONN_CB* sdp_conn_originate (uint8_t *p_bd_addr)
{
tCONN_CB *p_ccb;
@@ -593,14 +593,14 @@
}
/*******************************************************************************
-**
-** Function sdp_disconnect
-**
-** Description This function disconnects a connection.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_disconnect
+ *
+ * Description This function disconnects a connection.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void sdp_disconnect (tCONN_CB*p_ccb, uint16_t reason)
{
#if (SDP_BROWSE_PLUS == TRUE)
@@ -668,14 +668,14 @@
}
/*******************************************************************************
-**
-** Function sdp_disconnect_cfm
-**
-** Description This function handles a disconnect confirm event from L2CAP.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_disconnect_cfm
+ *
+ * Description This function handles a disconnect confirm event from L2CAP.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void sdp_disconnect_cfm (uint16_t l2cap_cid,
UNUSED_ATTR uint16_t result)
{
@@ -704,15 +704,15 @@
#endif /* SDP_CLIENT_ENABLED == TRUE */
/*******************************************************************************
-**
-** Function sdp_conn_timer_timeout
-**
-** Description This function processes a timeout. Currently, we simply send
-** a disconnect request to L2CAP.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_conn_timer_timeout
+ *
+ * Description This function processes a timeout. Currently, we simply send
+ * a disconnect request to L2CAP.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void sdp_conn_timer_timeout(void *data)
{
tCONN_CB *p_ccb = (tCONN_CB *)data;
diff --git a/stack/sdp/sdp_server.cc b/stack/sdp/sdp_server.cc
index 3774a37..ba24567 100644
--- a/stack/sdp/sdp_server.cc
+++ b/stack/sdp/sdp_server.cc
@@ -50,9 +50,9 @@
#define SDP_MAX_SERVATTR_RSPHDR_LEN 10
#define SDP_MAX_ATTR_RSPHDR_LEN 10
-/********************************************************************************/
+/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
-/********************************************************************************/
+/******************************************************************************/
static void process_service_search (tCONN_CB *p_ccb, uint16_t trans_num,
uint16_t param_len, uint8_t *p_req,
UNUSED_ATTR uint8_t *p_req_end);
@@ -66,12 +66,12 @@
UNUSED_ATTR uint8_t *p_req_end);
-/********************************************************************************/
+/******************************************************************************/
/* E R R O R T E X T S T R I N G S */
/* */
/* The default is to have no text string, but we allow the strings to be */
/* configured in target.h if people want them. */
-/********************************************************************************/
+/******************************************************************************/
#ifndef SDP_TEXT_BAD_HEADER
#define SDP_TEXT_BAD_HEADER NULL
#endif
@@ -105,16 +105,16 @@
#endif
/*******************************************************************************
-**
-** Function sdp_server_handle_client_req
-**
-** Description This is the main dispatcher of the SDP server. It is called
-** when any data is received from L2CAP, and dispatches the
-** request to the appropriate handler.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdp_server_handle_client_req
+ *
+ * Description This is the main dispatcher of the SDP server. It is called
+ * when any data is received from L2CAP, and dispatches the
+ * request to the appropriate handler.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void sdp_server_handle_client_req (tCONN_CB *p_ccb, BT_HDR *p_msg)
{
uint8_t *p_req = (uint8_t *) (p_msg + 1) + p_msg->offset;
@@ -164,16 +164,16 @@
/*******************************************************************************
-**
-** Function process_service_search
-**
-** Description This function handles a service search request from the
-** client. It builds a reply message with info from the database,
-** and sends the reply back to the client.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function process_service_search
+ *
+ * Description This function handles a service search request from the
+ * client. It builds a reply message with info from the database,
+ * and sends the reply back to the client.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void process_service_search (tCONN_CB *p_ccb, uint16_t trans_num,
uint16_t param_len, uint8_t *p_req,
UNUSED_ATTR uint8_t *p_req_end)
@@ -302,16 +302,16 @@
/*******************************************************************************
-**
-** Function process_service_attr_req
-**
-** Description This function handles an attribute request from the client.
-** It builds a reply message with info from the database,
-** and sends the reply back to the client.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function process_service_attr_req
+ *
+ * Description This function handles an attribute request from the client.
+ * It builds a reply message with info from the database,
+ * and sends the reply back to the client.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void process_service_attr_req (tCONN_CB *p_ccb, uint16_t trans_num,
uint16_t param_len, uint8_t *p_req,
uint8_t *p_req_end)
@@ -531,16 +531,16 @@
/*******************************************************************************
-**
-** Function process_service_search_attr_req
-**
-** Description This function handles a combined service search and attribute
-** read request from the client. It builds a reply message with
-** info from the database, and sends the reply back to the client.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function process_service_search_attr_req
+ *
+ * Description This function handles a combined service search and attribute
+ * read request from the client. It builds a reply message with
+ * info from the database, and sends the reply back to the client.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void process_service_search_attr_req (tCONN_CB *p_ccb, uint16_t trans_num,
uint16_t param_len, uint8_t *p_req,
UNUSED_ATTR uint8_t *p_req_end)
diff --git a/stack/sdp/sdp_utils.cc b/stack/sdp/sdp_utils.cc
index 407f828..acfc6e3 100644
--- a/stack/sdp/sdp_utils.cc
+++ b/stack/sdp/sdp_utils.cc
@@ -44,15 +44,15 @@
0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB};
/*******************************************************************************
-**
-** Function sdpu_find_ccb_by_cid
-**
-** Description This function searches the CCB table for an entry with the
-** passed CID.
-**
-** Returns the CCB address, or NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function sdpu_find_ccb_by_cid
+ *
+ * Description This function searches the CCB table for an entry with the
+ * passed CID.
+ *
+ * Returns the CCB address, or NULL if not found.
+ *
+ ******************************************************************************/
tCONN_CB *sdpu_find_ccb_by_cid (uint16_t cid)
{
uint16_t xx;
@@ -71,15 +71,15 @@
/*******************************************************************************
-**
-** Function sdpu_find_ccb_by_db
-**
-** Description This function searches the CCB table for an entry with the
-** passed discovery db.
-**
-** Returns the CCB address, or NULL if not found.
-**
-*******************************************************************************/
+ *
+ * Function sdpu_find_ccb_by_db
+ *
+ * Description This function searches the CCB table for an entry with the
+ * passed discovery db.
+ *
+ * Returns the CCB address, or NULL if not found.
+ *
+ ******************************************************************************/
tCONN_CB *sdpu_find_ccb_by_db (tSDP_DISCOVERY_DB *p_db)
{
#if (SDP_CLIENT_ENABLED == TRUE)
@@ -102,14 +102,14 @@
/*******************************************************************************
-**
-** Function sdpu_allocate_ccb
-**
-** Description This function allocates a new CCB.
-**
-** Returns CCB address, or NULL if none available.
-**
-*******************************************************************************/
+ *
+ * Function sdpu_allocate_ccb
+ *
+ * Description This function allocates a new CCB.
+ *
+ * Returns CCB address, or NULL if none available.
+ *
+ ******************************************************************************/
tCONN_CB *sdpu_allocate_ccb (void)
{
uint16_t xx;
@@ -132,14 +132,14 @@
/*******************************************************************************
-**
-** Function sdpu_release_ccb
-**
-** Description This function releases a CCB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdpu_release_ccb
+ *
+ * Description This function releases a CCB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void sdpu_release_ccb (tCONN_CB *p_ccb)
{
/* Ensure timer is stopped */
@@ -160,16 +160,16 @@
/*******************************************************************************
-**
-** Function sdpu_build_attrib_seq
-**
-** Description This function builds an attribute sequence from the list of
-** passed attributes. It is also passed the address of the output
-** buffer.
-**
-** Returns Pointer to next byte in the output buffer.
-**
-*******************************************************************************/
+ *
+ * Function sdpu_build_attrib_seq
+ *
+ * Description This function builds an attribute sequence from the list of
+ * passed attributes. It is also passed the address of the output
+ * buffer.
+ *
+ * Returns Pointer to next byte in the output buffer.
+ *
+ ******************************************************************************/
uint8_t *sdpu_build_attrib_seq (uint8_t *p_out, uint16_t *p_attr, uint16_t num_attrs)
{
uint16_t xx;
@@ -214,16 +214,16 @@
/*******************************************************************************
-**
-** Function sdpu_build_attrib_entry
-**
-** Description This function builds an attribute entry from the passed
-** attribute record. It is also passed the address of the output
-** buffer.
-**
-** Returns Pointer to next byte in the output buffer.
-**
-*******************************************************************************/
+ *
+ * Function sdpu_build_attrib_entry
+ *
+ * Description This function builds an attribute entry from the passed
+ * attribute record. It is also passed the address of the output
+ * buffer.
+ *
+ * Returns Pointer to next byte in the output buffer.
+ *
+ ******************************************************************************/
uint8_t *sdpu_build_attrib_entry (uint8_t *p_out, tSDP_ATTRIBUTE *p_attr)
{
/* First, store the attribute ID. Goes as a UINT */
@@ -301,14 +301,14 @@
/*******************************************************************************
-**
-** Function sdpu_build_n_send_error
-**
-** Description This function builds and sends an error packet.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdpu_build_n_send_error
+ *
+ * Description This function builds and sends an error packet.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void sdpu_build_n_send_error (tCONN_CB *p_ccb, uint16_t trans_num, uint16_t error_code, char *p_error_text)
{
uint8_t *p_rsp, *p_rsp_start, *p_rsp_param_len;
@@ -350,15 +350,15 @@
/*******************************************************************************
-**
-** 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.
-**
-** Returns Pointer to next byte in the input buffer after the sequence.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ * Returns Pointer to next byte in the input buffer after the sequence.
+ *
+ ******************************************************************************/
uint8_t *sdpu_extract_uid_seq (uint8_t *p, uint16_t param_len, tSDP_UUID_SEQ *p_seq)
{
uint8_t *p_seq_end;
@@ -464,15 +464,15 @@
/*******************************************************************************
-**
-** 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.
-**
-** Returns Pointer to next byte in the input buffer after the sequence.
-**
-*******************************************************************************/
+ *
+ * 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.
+ *
+ * Returns Pointer to next byte in the input buffer after the sequence.
+ *
+ ******************************************************************************/
uint8_t *sdpu_extract_attr_seq (uint8_t *p, uint16_t param_len, tSDP_ATTR_SEQ *p_seq)
{
uint8_t *p_end_list;
@@ -569,14 +569,14 @@
/*******************************************************************************
-**
-** Function sdpu_get_len_from_type
-**
-** Description This function gets the length
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdpu_get_len_from_type
+ *
+ * Description This function gets the length
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint8_t *sdpu_get_len_from_type (uint8_t *p, uint8_t type, uint32_t *p_len)
{
uint8_t u8;
@@ -619,15 +619,15 @@
/*******************************************************************************
-**
-** Function sdpu_is_base_uuid
-**
-** Description This function checks a 128-bit UUID with the base to see if
-** it matches. Only the last 12 bytes are compared.
-**
-** Returns true if matched, else false
-**
-*******************************************************************************/
+ *
+ * Function sdpu_is_base_uuid
+ *
+ * Description This function checks a 128-bit UUID with the base to see if
+ * it matches. Only the last 12 bytes are compared.
+ *
+ * Returns true if matched, else false
+ *
+ ******************************************************************************/
bool sdpu_is_base_uuid (uint8_t *p_uuid)
{
uint16_t xx;
@@ -642,17 +642,17 @@
/*******************************************************************************
-**
-** Function sdpu_compare_uuid_arrays
-**
-** Description This function compares 2 BE UUIDs. If needed, they are expanded
-** to 128-bit UUIDs, then compared.
-**
-** NOTE it is assumed that the arrays are in Big Endian format
-**
-** Returns true if matched, else false
-**
-*******************************************************************************/
+ *
+ * Function sdpu_compare_uuid_arrays
+ *
+ * Description This function compares 2 BE UUIDs. If needed, they are expanded
+ * to 128-bit UUIDs, then compared.
+ *
+ * NOTE it is assumed that the arrays are in Big Endian format
+ *
+ * Returns true if matched, else false
+ *
+ ******************************************************************************/
bool sdpu_compare_uuid_arrays (uint8_t *p_uuid1, uint32_t len1, uint8_t *p_uuid2, uint16_t len2)
{
uint8_t nu1[MAX_UUID_SIZE];
@@ -725,17 +725,17 @@
/*******************************************************************************
-**
-** Function sdpu_compare_bt_uuids
-**
-** Description This function compares 2 BT UUID structures.
-**
-** NOTE it is assumed that BT UUID structures are compressed to the
-** smallest possible UUIDs (by removing the base SDP UUID)
-**
-** Returns true if matched, else false
-**
-*******************************************************************************/
+ *
+ * Function sdpu_compare_bt_uuids
+ *
+ * Description This function compares 2 BT UUID structures.
+ *
+ * NOTE it is assumed that BT UUID structures are compressed to the
+ * smallest possible UUIDs (by removing the base SDP UUID)
+ *
+ * Returns true if matched, else false
+ *
+ ******************************************************************************/
bool sdpu_compare_bt_uuids (tBT_UUID *p_uuid1, tBT_UUID *p_uuid2)
{
/* Lengths must match for BT UUIDs to match */
@@ -754,21 +754,21 @@
/*******************************************************************************
-**
-** Function sdpu_compare_uuid_with_attr
-**
-** Description This function compares a BT UUID structure with the UUID in an
-** SDP attribute record. If needed, they are expanded to 128-bit
-** UUIDs, then compared.
-**
-** NOTE - it is assumed that BT UUID structures are compressed to the
-** smallest possible UUIDs (by removing the base SDP UUID).
-** - it is also assumed that the discovery atribute is compressed
-** to the smallest possible
-**
-** Returns true if matched, else false
-**
-*******************************************************************************/
+ *
+ * Function sdpu_compare_uuid_with_attr
+ *
+ * Description This function compares a BT UUID structure with the UUID in an
+ * SDP attribute record. If needed, they are expanded to 128-bit
+ * UUIDs, then compared.
+ *
+ * NOTE - it is assumed that BT UUID structures are compressed to the
+ * smallest possible UUIDs (by removing the base SDP UUID).
+ * - it is also assumed that the discovery atribute is compressed
+ * to the smallest possible
+ *
+ * Returns true if matched, else false
+ *
+ ******************************************************************************/
bool sdpu_compare_uuid_with_attr (tBT_UUID *p_btuuid, tSDP_DISC_ATTR *p_attr)
{
uint16_t attr_len = SDP_DISC_ATTR_LEN (p_attr->attr_len_type);
@@ -796,15 +796,15 @@
}
/*******************************************************************************
-**
-** Function sdpu_sort_attr_list
-**
-** Description sorts a list of attributes in numeric order from lowest to
-** highest to conform to SDP specification
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdpu_sort_attr_list
+ *
+ * Description sorts a list of attributes in numeric order from lowest to
+ * highest to conform to SDP specification
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void sdpu_sort_attr_list( uint16_t num_attr, tSDP_DISCOVERY_DB *p_db )
{
uint16_t i;
@@ -839,15 +839,15 @@
/*******************************************************************************
-**
-** Function sdpu_get_list_len
-**
-** Description gets the total list length in the sdp database for a given
-** uid sequence and attr sequence
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdpu_get_list_len
+ *
+ * Description gets the total list length in the sdp database for a given
+ * uid sequence and attr sequence
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint16_t sdpu_get_list_len(tSDP_UUID_SEQ *uid_seq, tSDP_ATTR_SEQ *attr_seq)
{
tSDP_RECORD *p_rec;
@@ -869,15 +869,15 @@
}
/*******************************************************************************
-**
-** Function sdpu_get_attrib_seq_len
-**
-** Description gets the length of the specific attributes in a given
-** sdp record
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdpu_get_attrib_seq_len
+ *
+ * Description gets the length of the specific attributes in a given
+ * sdp record
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint16_t sdpu_get_attrib_seq_len(tSDP_RECORD *p_rec, tSDP_ATTR_SEQ *attr_seq)
{
tSDP_ATTRIBUTE *p_attr;
@@ -918,14 +918,14 @@
}
/*******************************************************************************
-**
-** Function sdpu_get_attrib_entry_len
-**
-** Description gets the length of a specific attribute
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function sdpu_get_attrib_entry_len
+ *
+ * Description gets the length of a specific attribute
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint16_t sdpu_get_attrib_entry_len(tSDP_ATTRIBUTE *p_attr)
{
uint16_t len = 3;
@@ -982,21 +982,21 @@
/*******************************************************************************
-**
-** Function sdpu_build_partial_attrib_entry
-**
-** Description This function fills a buffer with partial attribute. It is
-** assumed that the maximum size of any attribute is 256 bytes.
-**
-** p_out: output buffer
-** p_attr: attribute to be copied partially into p_out
-** rem_len: num bytes to copy into p_out
-** offset: current start offset within the attr that needs to be copied
-**
-** Returns Pointer to next byte in the output buffer.
-** offset is also updated
-**
-*******************************************************************************/
+ *
+ * Function sdpu_build_partial_attrib_entry
+ *
+ * Description This function fills a buffer with partial attribute. It is
+ * assumed that the maximum size of any attribute is 256 bytes.
+ *
+ * p_out: output buffer
+ * p_attr: attribute to be copied partially into p_out
+ * rem_len: num bytes to copy into p_out
+ * offset: current start offset within the attr that needs to be copied
+ *
+ * Returns Pointer to next byte in the output buffer.
+ * offset is also updated
+ *
+ ******************************************************************************/
uint8_t *sdpu_build_partial_attrib_entry (uint8_t *p_out, tSDP_ATTRIBUTE *p_attr, uint16_t len, uint16_t *offset)
{
uint8_t *p_attr_buff = (uint8_t *)osi_malloc(sizeof(uint8_t) * SDP_MAX_ATTR_LEN);
@@ -1021,17 +1021,17 @@
}
/*******************************************************************************
-**
-** Function sdpu_uuid16_to_uuid128
-**
-** Description This function converts UUID-16 to UUID-128 by including the base UUID
-**
-** uuid16: 2-byte UUID
-** p_uuid128: Expanded 128-bit UUID
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function sdpu_uuid16_to_uuid128
+ *
+ * Description This function converts UUID-16 to UUID-128 by including the base UUID
+ *
+ * uuid16: 2-byte UUID
+ * p_uuid128: Expanded 128-bit UUID
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void sdpu_uuid16_to_uuid128(uint16_t uuid16, uint8_t* p_uuid128)
{
uint16_t uuid16_bo;
diff --git a/stack/smp/smp_act.cc b/stack/smp/smp_act.cc
index ad4dbfb..25dae2e 100644
--- a/stack/smp/smp_act.cc
+++ b/stack/smp/smp_act.cc
@@ -84,9 +84,9 @@
}
/*******************************************************************************
-** Function smp_update_key_mask
-** Description This function updates the key mask for sending or receiving.
-*******************************************************************************/
+ * Function smp_update_key_mask
+ * Description This function updates the key mask for sending or receiving.
+ ******************************************************************************/
static void smp_update_key_mask (tSMP_CB *p_cb, uint8_t key_type, bool recv)
{
SMP_TRACE_DEBUG("%s before update role=%d recv=%d local_i_key = %02x, local_r_key = %02x",
@@ -122,9 +122,9 @@
}
/*******************************************************************************
-** Function smp_send_app_cback
-** Description notifies application about the events the application is interested in
-*******************************************************************************/
+ * Function smp_send_app_cback
+ * Description notifies application about the events the application is interested in
+ ******************************************************************************/
void smp_send_app_cback(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tSMP_EVT_DATA cb_data;
@@ -248,9 +248,9 @@
}
/*******************************************************************************
-** Function smp_send_pair_fail
-** Description pairing failure to peer device if needed.
-*******************************************************************************/
+ * Function smp_send_pair_fail
+ * Description pairing failure to peer device if needed.
+ ******************************************************************************/
void smp_send_pair_fail(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
p_cb->status = *(uint8_t *)p_data;
@@ -266,9 +266,9 @@
}
/*******************************************************************************
-** Function smp_send_pair_req
-** Description actions related to sending pairing request
-*******************************************************************************/
+ * Function smp_send_pair_req
+ * Description actions related to sending pairing request
+ ******************************************************************************/
void smp_send_pair_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (p_cb->pairing_bda);
@@ -283,9 +283,9 @@
}
/*******************************************************************************
-** Function smp_send_pair_rsp
-** Description actions related to sending pairing response
-*******************************************************************************/
+ * Function smp_send_pair_rsp
+ * Description actions related to sending pairing response
+ ******************************************************************************/
void smp_send_pair_rsp(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -303,9 +303,9 @@
}
/*******************************************************************************
-** Function smp_send_confirm
-** Description send confirmation to the peer
-*******************************************************************************/
+ * Function smp_send_confirm
+ * Description send confirmation to the peer
+ ******************************************************************************/
void smp_send_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -313,9 +313,9 @@
}
/*******************************************************************************
-** Function smp_send_init
-** Description process pairing initializer to slave device
-*******************************************************************************/
+ * Function smp_send_init
+ * Description process pairing initializer to slave device
+ ******************************************************************************/
void smp_send_init(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -323,9 +323,9 @@
}
/*******************************************************************************
-** Function smp_send_rand
-** Description send pairing random to the peer
-*******************************************************************************/
+ * Function smp_send_rand
+ * Description send pairing random to the peer
+ ******************************************************************************/
void smp_send_rand(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -333,9 +333,9 @@
}
/*******************************************************************************
-** Function smp_send_pair_public_key
-** Description send pairing public key command to the peer
-*******************************************************************************/
+ * Function smp_send_pair_public_key
+ * Description send pairing public key command to the peer
+ ******************************************************************************/
void smp_send_pair_public_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -343,9 +343,9 @@
}
/*******************************************************************************
-** Function SMP_SEND_COMMITMENT
-** Description send commitment command to the peer
-*******************************************************************************/
+ * Function SMP_SEND_COMMITMENT
+ * Description send commitment command to the peer
+ ******************************************************************************/
void smp_send_commitment(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -353,9 +353,9 @@
}
/*******************************************************************************
-** Function smp_send_dhkey_check
-** Description send DHKey Check command to the peer
-*******************************************************************************/
+ * Function smp_send_dhkey_check
+ * Description send DHKey Check command to the peer
+ ******************************************************************************/
void smp_send_dhkey_check(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -363,9 +363,9 @@
}
/*******************************************************************************
-** Function smp_send_keypress_notification
-** Description send Keypress Notification command to the peer
-*******************************************************************************/
+ * Function smp_send_keypress_notification
+ * Description send Keypress Notification command to the peer
+ ******************************************************************************/
void smp_send_keypress_notification(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
p_cb->local_keypress_notification = *(uint8_t *) p_data;
@@ -373,9 +373,9 @@
}
/*******************************************************************************
-** Function smp_send_enc_info
-** Description send encryption information command.
-*******************************************************************************/
+ * Function smp_send_enc_info
+ * Description send encryption information command.
+ ******************************************************************************/
void smp_send_enc_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_LE_LENC_KEYS le_key;
@@ -402,9 +402,9 @@
}
/*******************************************************************************
-** Function smp_send_id_info
-** Description send ID information command.
-*******************************************************************************/
+ * Function smp_send_id_info
+ * Description send ID information command.
+ ******************************************************************************/
void smp_send_id_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_LE_KEY_VALUE le_key;
@@ -423,9 +423,9 @@
}
/*******************************************************************************
-** Function smp_send_csrk_info
-** Description send CSRK command.
-*******************************************************************************/
+ * Function smp_send_csrk_info
+ * Description send CSRK command.
+ ******************************************************************************/
void smp_send_csrk_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_LE_LCSRK_KEYS key;
@@ -445,9 +445,9 @@
}
/*******************************************************************************
-** Function smp_send_ltk_reply
-** Description send LTK reply
-*******************************************************************************/
+ * Function smp_send_ltk_reply
+ * Description send LTK reply
+ ******************************************************************************/
void smp_send_ltk_reply(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -456,9 +456,9 @@
}
/*******************************************************************************
-** Function smp_proc_sec_req
-** Description process security request.
-*******************************************************************************/
+ * Function smp_proc_sec_req
+ * Description process security request.
+ ******************************************************************************/
void smp_proc_sec_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_LE_AUTH_REQ auth_req = *(tBTM_LE_AUTH_REQ *)p_data;
@@ -511,9 +511,9 @@
}
/*******************************************************************************
-** Function smp_proc_sec_grant
-** Description process security grant.
-*******************************************************************************/
+ * Function smp_proc_sec_grant
+ * Description process security grant.
+ ******************************************************************************/
void smp_proc_sec_grant(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t res= *(uint8_t *)p_data;
@@ -530,9 +530,9 @@
}
/*******************************************************************************
-** Function smp_proc_pair_fail
-** Description process pairing failure from peer device
-*******************************************************************************/
+ * Function smp_proc_pair_fail
+ * Description process pairing failure from peer device
+ ******************************************************************************/
void smp_proc_pair_fail(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -543,9 +543,9 @@
}
/*******************************************************************************
-** Function smp_proc_pair_cmd
-** Description Process the SMP pairing request/response from peer device
-*******************************************************************************/
+ * Function smp_proc_pair_cmd
+ * Description Process the SMP pairing request/response from peer device
+ ******************************************************************************/
void smp_proc_pair_cmd(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -642,9 +642,9 @@
}
/*******************************************************************************
-** Function smp_proc_confirm
-** Description process pairing confirm from peer device
-*******************************************************************************/
+ * Function smp_proc_confirm
+ * Description process pairing confirm from peer device
+ ******************************************************************************/
void smp_proc_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -668,9 +668,9 @@
}
/*******************************************************************************
-** Function smp_proc_init
-** Description process pairing initializer from peer device
-*******************************************************************************/
+ * Function smp_proc_init
+ * Description process pairing initializer from peer device
+ ******************************************************************************/
void smp_proc_init(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -689,9 +689,9 @@
}
/*******************************************************************************
-** Function smp_proc_rand
-** Description process pairing random (nonce) from peer device
-*******************************************************************************/
+ * Function smp_proc_rand
+ * Description process pairing random (nonce) from peer device
+ ******************************************************************************/
void smp_proc_rand(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -710,13 +710,13 @@
}
/*******************************************************************************
-** Function smp_process_pairing_public_key
-** Description process pairing public key command from the peer device
-** - saves the peer public key;
-** - sets the flag indicating that the peer public key is received;
-** - calls smp_wait_for_both_public_keys(...).
-**
-*******************************************************************************/
+ * Function smp_process_pairing_public_key
+ * Description process pairing public key command from the peer device
+ * - saves the peer public key;
+ * - sets the flag indicating that the peer public key is received;
+ * - calls smp_wait_for_both_public_keys(...).
+ *
+ ******************************************************************************/
void smp_process_pairing_public_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -738,9 +738,9 @@
}
/*******************************************************************************
-** Function smp_process_pairing_commitment
-** Description process pairing commitment from peer device
-*******************************************************************************/
+ * Function smp_process_pairing_commitment
+ * Description process pairing commitment from peer device
+ ******************************************************************************/
void smp_process_pairing_commitment(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -763,9 +763,9 @@
}
/*******************************************************************************
-** Function smp_process_dhkey_check
-** Description process DHKey Check from peer device
-*******************************************************************************/
+ * Function smp_process_dhkey_check
+ * Description process DHKey Check from peer device
+ ******************************************************************************/
void smp_process_dhkey_check(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -788,9 +788,9 @@
}
/*******************************************************************************
-** Function smp_process_keypress_notification
-** Description process pairing keypress notification from peer device
-*******************************************************************************/
+ * Function smp_process_keypress_notification
+ * Description process pairing keypress notification from peer device
+ ******************************************************************************/
void smp_process_keypress_notification(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -817,10 +817,10 @@
}
/*******************************************************************************
-** Function smp_br_process_pairing_command
-** Description Process the SMP pairing request/response from peer device via
-** BR/EDR transport.
-*******************************************************************************/
+ * Function smp_br_process_pairing_command
+ * Description Process the SMP pairing request/response from peer device via
+ * BR/EDR transport.
+ ******************************************************************************/
void smp_br_process_pairing_command(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -880,9 +880,9 @@
}
/*******************************************************************************
-** Function smp_br_process_security_grant
-** Description process security grant in case of pairing over BR/EDR transport.
-*******************************************************************************/
+ * Function smp_br_process_security_grant
+ * Description process security grant in case of pairing over BR/EDR transport.
+ ******************************************************************************/
void smp_br_process_security_grant(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t res= *(uint8_t *)p_data;
@@ -899,10 +899,10 @@
}
/*******************************************************************************
-** Function smp_br_check_authorization_request
-** Description sets the SMP kes to be derived/distribute over BR/EDR transport
-** before starting the distribution/derivation
-*******************************************************************************/
+ * Function smp_br_check_authorization_request
+ * Description sets the SMP kes to be derived/distribute over BR/EDR transport
+ * before starting the distribution/derivation
+ ******************************************************************************/
void smp_br_check_authorization_request(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t reason = SMP_SUCCESS;
@@ -943,10 +943,10 @@
}
/*******************************************************************************
-** Function smp_br_select_next_key
-** Description selects the next key to derive/send when BR/EDR transport is
-** used.
-*******************************************************************************/
+ * Function smp_br_select_next_key
+ * Description selects the next key to derive/send when BR/EDR transport is
+ * used.
+ ******************************************************************************/
void smp_br_select_next_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t reason = SMP_SUCCESS;
@@ -973,9 +973,9 @@
}
/*******************************************************************************
-** Function smp_proc_enc_info
-** Description process encryption information from peer device
-*******************************************************************************/
+ * Function smp_proc_enc_info
+ * Description process encryption information from peer device
+ ******************************************************************************/
void smp_proc_enc_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -986,9 +986,9 @@
smp_key_distribution(p_cb, NULL);
}
/*******************************************************************************
-** Function smp_proc_master_id
-** Description process master ID from slave device
-*******************************************************************************/
+ * Function smp_proc_master_id
+ * Description process master ID from slave device
+ ******************************************************************************/
void smp_proc_master_id(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -1014,9 +1014,9 @@
}
/*******************************************************************************
-** Function smp_proc_enc_info
-** Description process identity information from peer device
-*******************************************************************************/
+ * Function smp_proc_enc_info
+ * Description process identity information from peer device
+ ******************************************************************************/
void smp_proc_id_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -1027,9 +1027,9 @@
}
/*******************************************************************************
-** Function smp_proc_id_addr
-** Description process identity address from peer device
-*******************************************************************************/
+ * Function smp_proc_id_addr
+ * Description process identity address from peer device
+ ******************************************************************************/
void smp_proc_id_addr(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = (uint8_t *)p_data;
@@ -1055,9 +1055,9 @@
}
/*******************************************************************************
-** Function smp_proc_srk_info
-** Description process security information from peer device
-*******************************************************************************/
+ * Function smp_proc_srk_info
+ * Description process security information from peer device
+ ******************************************************************************/
void smp_proc_srk_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_LE_PCSRK_KEYS le_key;
@@ -1078,9 +1078,9 @@
}
/*******************************************************************************
-** Function smp_proc_compare
-** Description process compare value
-*******************************************************************************/
+ * Function smp_proc_compare
+ * Description process compare value
+ ******************************************************************************/
void smp_proc_compare(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t reason;
@@ -1112,9 +1112,9 @@
}
/*******************************************************************************
-** Function smp_proc_sl_key
-** Description process key ready events.
-*******************************************************************************/
+ * Function smp_proc_sl_key
+ * Description process key ready events.
+ ******************************************************************************/
void smp_proc_sl_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t key_type = p_data->key.key_type;
@@ -1134,9 +1134,9 @@
}
/*******************************************************************************
-** Function smp_start_enc
-** Description start encryption
-*******************************************************************************/
+ * Function smp_start_enc
+ * Description start encryption
+ ******************************************************************************/
void smp_start_enc(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_STATUS cmd;
@@ -1153,9 +1153,9 @@
}
/*******************************************************************************
-** Function smp_proc_discard
-** Description processing for discard security request
-*******************************************************************************/
+ * Function smp_proc_discard
+ * Description processing for discard security request
+ ******************************************************************************/
void smp_proc_discard(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1164,9 +1164,9 @@
}
/*******************************************************************************
-** Function smp_enc_cmpl
-** Description encryption success
-*******************************************************************************/
+ * Function smp_enc_cmpl
+ * Description encryption success
+ ******************************************************************************/
void smp_enc_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t enc_enable = *(uint8_t *)p_data;
@@ -1177,9 +1177,9 @@
}
/*******************************************************************************
-** Function smp_check_auth_req
-** Description check authentication request
-*******************************************************************************/
+ * Function smp_check_auth_req
+ * Description check authentication request
+ ******************************************************************************/
void smp_check_auth_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t enc_enable = *(uint8_t *)p_data;
@@ -1246,9 +1246,9 @@
}
/*******************************************************************************
-** Function smp_key_pick_key
-** Description Pick a key distribution function based on the key mask.
-*******************************************************************************/
+ * Function smp_key_pick_key
+ * Description Pick a key distribution function based on the key mask.
+ ******************************************************************************/
void smp_key_pick_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t key_to_dist = (p_cb->role == HCI_ROLE_SLAVE) ? p_cb->local_r_key : p_cb->local_i_key;
@@ -1269,9 +1269,9 @@
}
}
/*******************************************************************************
-** Function smp_key_distribution
-** Description start key distribution if required.
-*******************************************************************************/
+ * Function smp_key_distribution
+ * Description start key distribution if required.
+ ******************************************************************************/
void smp_key_distribution(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s role=%d (0-master) r_keys=0x%x i_keys=0x%x",
@@ -1316,11 +1316,11 @@
}
/*******************************************************************************
-** Function smp_decide_association_model
-** Description This function is called to select assoc model to be used for
-** STK generation and to start STK generation process.
-**
-*******************************************************************************/
+ * Function smp_decide_association_model
+ * Description This function is called to select assoc model to be used for
+ * STK generation and to start STK generation process.
+ *
+ ******************************************************************************/
void smp_decide_association_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t failure = SMP_UNKNOWN_IO_CAP;
@@ -1409,9 +1409,9 @@
}
/*******************************************************************************
-** Function smp_process_io_response
-** Description process IO response for a slave device.
-*******************************************************************************/
+ * Function smp_process_io_response
+ * Description process IO response for a slave device.
+ ******************************************************************************/
void smp_process_io_response(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t reason = SMP_PAIR_AUTH_FAIL;
@@ -1452,19 +1452,19 @@
}
/*******************************************************************************
-** Function smp_br_process_slave_keys_response
-** Description process application keys response for a slave device
-** (BR/EDR transport).
-*******************************************************************************/
+ * Function smp_br_process_slave_keys_response
+ * Description process application keys response for a slave device
+ * (BR/EDR transport).
+ ******************************************************************************/
void smp_br_process_slave_keys_response(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
smp_br_send_pair_response(p_cb, NULL);
}
/*******************************************************************************
-** Function smp_br_send_pair_response
-** Description actions related to sending pairing response over BR/EDR transport.
-*******************************************************************************/
+ * Function smp_br_send_pair_response
+ * Description actions related to sending pairing response over BR/EDR transport.
+ ******************************************************************************/
void smp_br_send_pair_response(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1476,10 +1476,10 @@
}
/*******************************************************************************
-** Function smp_pairing_cmpl
-** Description This function is called to send the pairing complete callback
-** and remove the connection if needed.
-*******************************************************************************/
+ * Function smp_pairing_cmpl
+ * 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)
{
if (p_cb->total_tx_unacked == 0)
@@ -1490,10 +1490,10 @@
}
/*******************************************************************************
-** Function smp_pair_terminate
-** Description This function is called to send the pairing complete callback
-** and remove the connection if needed.
-*******************************************************************************/
+ * Function smp_pair_terminate
+ * 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)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1502,10 +1502,10 @@
}
/*******************************************************************************
-** Function smp_idle_terminate
-** Description This function calledin idle state to determine to send authentication
-** complete or not.
-*******************************************************************************/
+ * Function smp_idle_terminate
+ * Description This function calledin idle state to determine to send authentication
+ * complete or not.
+ ******************************************************************************/
void smp_idle_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
if (p_cb->flags & SMP_PAIR_FLAGS_WE_STARTED_DD)
@@ -1517,9 +1517,9 @@
}
/*******************************************************************************
-** Function smp_fast_conn_param
-** Description apply default connection parameter for pairing process
-*******************************************************************************/
+ * Function smp_fast_conn_param
+ * Description apply default connection parameter for pairing process
+ ******************************************************************************/
void smp_fast_conn_param(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
/* Disable L2CAP connection parameter updates while bonding since
@@ -1530,14 +1530,14 @@
}
/*******************************************************************************
-** Function smp_both_have_public_keys
-** Description The function is called when both local and peer public keys are
-** saved.
-** Actions:
-** - invokes DHKey computation;
-** - on slave side invokes sending local public key to the peer.
-** - invokes SC phase 1 process.
-*******************************************************************************/
+ * Function smp_both_have_public_keys
+ * Description The function is called when both local and peer public keys are
+ * saved.
+ * Actions:
+ * - invokes DHKey computation;
+ * - on slave side invokes sending local public key to the peer.
+ * - invokes SC phase 1 process.
+ ******************************************************************************/
void smp_both_have_public_keys(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s",__func__);
@@ -1553,11 +1553,11 @@
}
/*******************************************************************************
-** Function smp_start_secure_connection_phase1
-** Description The function starts Secure Connection phase1 i.e. invokes initialization of Secure Connection
-** phase 1 parameters and starts building/sending to the peer
-** messages appropriate for the role and association model.
-*******************************************************************************/
+ * Function smp_start_secure_connection_phase1
+ * Description The function starts Secure Connection phase1 i.e. invokes initialization of Secure Connection
+ * phase 1 parameters and starts building/sending to the peer
+ * messages appropriate for the role and association model.
+ ******************************************************************************/
void smp_start_secure_connection_phase1(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1602,11 +1602,11 @@
}
/*******************************************************************************
-** Function smp_process_local_nonce
-** Description The function processes new local nonce.
-**
-** Note It is supposed to be called in SC phase1.
-*******************************************************************************/
+ * Function smp_process_local_nonce
+ * Description The function processes new local nonce.
+ *
+ * Note It is supposed to be called in SC phase1.
+ ******************************************************************************/
void smp_process_local_nonce(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1671,12 +1671,12 @@
}
/*******************************************************************************
-** Function smp_process_peer_nonce
-** Description The function processes newly received and saved in CB peer nonce.
-** The actions depend on the selected association model and the role.
-**
-** Note It is supposed to be called in SC phase1.
-*******************************************************************************/
+ * Function smp_process_peer_nonce
+ * Description The function processes newly received and saved in CB peer nonce.
+ * The actions depend on the selected association model and the role.
+ *
+ * Note It is supposed to be called in SC phase1.
+ ******************************************************************************/
void smp_process_peer_nonce(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t reason;
@@ -1764,10 +1764,10 @@
}
/*******************************************************************************
-** Function smp_match_dhkey_checks
-** Description checks if the calculated peer DHKey Check value is the same as
-** received from the peer DHKey check value.
-*******************************************************************************/
+ * Function smp_match_dhkey_checks
+ * Description checks if the calculated peer DHKey Check value is the same as
+ * received from the peer DHKey check value.
+ ******************************************************************************/
void smp_match_dhkey_checks(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t reason = SMP_DHKEY_CHK_FAIL;
@@ -1802,12 +1802,12 @@
}
/*******************************************************************************
-** Function smp_move_to_secure_connections_phase2
-** Description Signal State Machine to start SC phase 2 initialization (to
-** compute local DHKey Check value).
-**
-** Note SM is supposed to be in the state SMP_STATE_SEC_CONN_PHS2_START.
-*******************************************************************************/
+ * Function smp_move_to_secure_connections_phase2
+ * Description Signal State Machine to start SC phase 2 initialization (to
+ * compute local DHKey Check value).
+ *
+ * Note SM is supposed to be in the state SMP_STATE_SEC_CONN_PHS2_START.
+ ******************************************************************************/
void smp_move_to_secure_connections_phase2(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s",__func__);
@@ -1815,12 +1815,12 @@
}
/*******************************************************************************
-** Function smp_phase_2_dhkey_checks_are_present
-** Description generates event if dhkey check from the peer is already received.
-**
-** Note It is supposed to be used on slave to prevent race condition.
-** It is supposed to be called after slave dhkey check is calculated.
-*******************************************************************************/
+ * Function smp_phase_2_dhkey_checks_are_present
+ * Description generates event if dhkey check from the peer is already received.
+ *
+ * Note It is supposed to be used on slave to prevent race condition.
+ * It is supposed to be called after slave dhkey check is calculated.
+ ******************************************************************************/
void smp_phase_2_dhkey_checks_are_present(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s",__func__);
@@ -1830,13 +1830,13 @@
}
/*******************************************************************************
-** Function smp_wait_for_both_public_keys
-** Description generates SMP_BOTH_PUBL_KEYS_RCVD_EVT event when both local and master
-** public keys are available.
-**
-** Note on the slave it is used to prevent race condition.
-**
-*******************************************************************************/
+ * Function smp_wait_for_both_public_keys
+ * Description generates SMP_BOTH_PUBL_KEYS_RCVD_EVT event when both local and master
+ * public keys are available.
+ *
+ * Note on the slave it is used to prevent race condition.
+ *
+ ******************************************************************************/
void smp_wait_for_both_public_keys(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s",__func__);
@@ -1854,9 +1854,9 @@
}
/*******************************************************************************
-** Function smp_start_passkey_verification
-** Description Starts SC passkey entry verification.
-*******************************************************************************/
+ * Function smp_start_passkey_verification
+ * Description Starts SC passkey entry verification.
+ ******************************************************************************/
void smp_start_passkey_verification(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t *p = NULL;
@@ -1873,9 +1873,9 @@
}
/*******************************************************************************
-** Function smp_process_secure_connection_oob_data
-** Description Processes local/peer SC OOB data received from somewhere.
-*******************************************************************************/
+ * Function smp_process_secure_connection_oob_data
+ * Description Processes local/peer SC OOB data received from somewhere.
+ ******************************************************************************/
void smp_process_secure_connection_oob_data(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1928,11 +1928,11 @@
}
/*******************************************************************************
-** Function smp_set_local_oob_keys
-** Description Saves calculated private/public keys in sc_oob_data.loc_oob_data,
-** starts nonce generation
-** (to be saved in sc_oob_data.loc_oob_data.randomizer).
-*******************************************************************************/
+ * Function smp_set_local_oob_keys
+ * Description Saves calculated private/public keys in sc_oob_data.loc_oob_data,
+ * starts nonce generation
+ * (to be saved in sc_oob_data.loc_oob_data.randomizer).
+ ******************************************************************************/
void smp_set_local_oob_keys(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1944,10 +1944,10 @@
}
/*******************************************************************************
-** Function smp_set_local_oob_random_commitment
-** Description Saves calculated randomizer and commitment in sc_oob_data.loc_oob_data,
-** passes sc_oob_data.loc_oob_data up for safekeeping.
-*******************************************************************************/
+ * Function smp_set_local_oob_random_commitment
+ * Description Saves calculated randomizer and commitment in sc_oob_data.loc_oob_data,
+ * passes sc_oob_data.loc_oob_data up for safekeeping.
+ ******************************************************************************/
void smp_set_local_oob_random_commitment(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1991,17 +1991,17 @@
}
/*******************************************************************************
-**
-** Function smp_link_encrypted
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function smp_link_encrypted
+ *
+ * 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
+ *
+ ******************************************************************************/
void smp_link_encrypted(BD_ADDR bda, uint8_t encr_enable)
{
tSMP_CB *p_cb = &smp_cb;
@@ -2023,15 +2023,15 @@
}
/*******************************************************************************
-**
-** Function smp_proc_ltk_request
-**
-** Description This function is called when LTK request is received from
-** controller.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_proc_ltk_request
+ *
+ * Description This function is called when LTK request is received from
+ * controller.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool smp_proc_ltk_request(BD_ADDR bda)
{
SMP_TRACE_DEBUG("%s state = %d", __func__, smp_cb.state);
@@ -2061,16 +2061,16 @@
}
/*******************************************************************************
-**
-** Function smp_process_secure_connection_long_term_key
-**
-** Description This function is called to process SC LTK.
-** SC LTK is calculated and used instead of STK.
-** Here SC LTK is saved in BLE DB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_process_secure_connection_long_term_key
+ *
+ * Description This function is called to process SC LTK.
+ * SC LTK is calculated and used instead of STK.
+ * Here SC LTK is saved in BLE DB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_process_secure_connection_long_term_key(void)
{
tSMP_CB *p_cb = &smp_cb;
@@ -2083,16 +2083,16 @@
}
/*******************************************************************************
-**
-** Function smp_set_derive_link_key
-**
-** Description This function is called to set flag that indicates that
-** BR/EDR LK has to be derived from LTK after all keys are
-** distributed.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_set_derive_link_key
+ *
+ * Description This function is called to set flag that indicates that
+ * BR/EDR LK has to be derived from LTK after all keys are
+ * distributed.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_set_derive_link_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG ("%s", __func__);
@@ -2102,14 +2102,14 @@
}
/*******************************************************************************
-**
-** Function smp_derive_link_key_from_long_term_key
-**
-** Description This function is called to derive BR/EDR LK from LTK.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_derive_link_key_from_long_term_key
+ *
+ * Description This function is called to derive BR/EDR LK from LTK.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_derive_link_key_from_long_term_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tSMP_STATUS status = SMP_PAIR_FAIL_UNKNOWN;
@@ -2124,16 +2124,16 @@
}
/*******************************************************************************
-**
-** Function smp_br_process_link_key
-**
-** Description This function is called to process BR/EDR LK:
-** - to derive SMP LTK from BR/EDR LK;
+ *
+ * Function smp_br_process_link_key
+ *
+ * Description This function is called to process BR/EDR LK:
+ * - to derive SMP LTK from BR/EDR LK;
*8 - to save SMP LTK.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_br_process_link_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tSMP_STATUS status = SMP_PAIR_FAIL_UNKNOWN;
@@ -2153,10 +2153,10 @@
}
/*******************************************************************************
-** Function smp_key_distribution_by_transport
-** Description depending on the transport used at the moment calls either
-** smp_key_distribution(...) or smp_br_key_distribution(...).
-*******************************************************************************/
+ * Function smp_key_distribution_by_transport
+ * Description depending on the transport used at the moment calls either
+ * smp_key_distribution(...) or smp_br_key_distribution(...).
+ ******************************************************************************/
void smp_key_distribution_by_transport(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -2171,10 +2171,10 @@
}
/*******************************************************************************
-** Function smp_br_pairing_complete
-** Description This function is called to send the pairing complete callback
-** and remove the connection if needed.
-*******************************************************************************/
+ * Function smp_br_pairing_complete
+ * Description This function is called to send the pairing complete callback
+ * and remove the connection if needed.
+ ******************************************************************************/
void smp_br_pairing_complete(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG("%s", __func__);
diff --git a/stack/smp/smp_api.cc b/stack/smp/smp_api.cc
index 03646f2..97cdd73 100644
--- a/stack/smp/smp_api.cc
+++ b/stack/smp/smp_api.cc
@@ -39,14 +39,14 @@
#include "p_256_ecc_pp.h"
/*******************************************************************************
-**
-** Function SMP_Init
-**
-** Description This function initializes the SMP unit.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function SMP_Init
+ *
+ * Description This function initializes the SMP unit.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void SMP_Init(void)
{
memset(&smp_cb, 0, sizeof(tSMP_CB));
@@ -72,25 +72,25 @@
/*******************************************************************************
-**
-** Function SMP_SetTraceLevel
-**
-** Description This function sets the trace level for SMP. If called with
-** a value of 0xFF, it simply returns the current trace level.
-**
-** Input Parameters:
-** level: The level to set the GATT tracing to:
-** 0xff-returns the current setting.
-** 0-turns off tracing.
-** >= 1-Errors.
-** >= 2-Warnings.
-** >= 3-APIs.
-** >= 4-Events.
-** >= 5-Debug.
-**
-** Returns The new or current trace level
-**
-*******************************************************************************/
+ *
+ * Function SMP_SetTraceLevel
+ *
+ * Description This function sets the trace level for SMP. If called with
+ * a value of 0xFF, it simply returns the current trace level.
+ *
+ * Input Parameters:
+ * level: The level to set the GATT tracing to:
+ * 0xff-returns the current setting.
+ * 0-turns off tracing.
+ * >= 1-Errors.
+ * >= 2-Warnings.
+ * >= 3-APIs.
+ * >= 4-Events.
+ * >= 5-Debug.
+ *
+ * Returns The new or current trace level
+ *
+ ******************************************************************************/
extern uint8_t SMP_SetTraceLevel (uint8_t new_level)
{
if (new_level != 0xFF)
@@ -101,14 +101,14 @@
/*******************************************************************************
-**
-** Function SMP_Register
-**
-** Description This function register for the SMP services callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function SMP_Register
+ *
+ * Description This function register for the SMP services callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool SMP_Register (tSMP_CALLBACK *p_cback)
{
SMP_TRACE_EVENT ("SMP_Register state=%d", smp_cb.state);
@@ -124,17 +124,17 @@
}
/*******************************************************************************
-**
-** Function SMP_Pair
-**
-** 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.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function SMP_Pair
+ *
+ * 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.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
tSMP_STATUS SMP_Pair (BD_ADDR bd_addr)
{
tSMP_CB *p_cb = &smp_cb;
@@ -166,17 +166,17 @@
}
/*******************************************************************************
-**
-** Function SMP_BR_PairWith
-**
-** Description This function is called to start a SMP pairing over BR/EDR.
-** Device support one SMP pairing at one time.
-**
-** Parameters bd_addr - peer device bd address.
-**
-** Returns SMP_STARTED if pairing started, otherwise reason for failure.
-**
-*******************************************************************************/
+ *
+ * Function SMP_BR_PairWith
+ *
+ * Description This function is called to start a SMP pairing over BR/EDR.
+ * Device support one SMP pairing at one time.
+ *
+ * Parameters bd_addr - peer device bd address.
+ *
+ * Returns SMP_STARTED if pairing started, otherwise reason for failure.
+ *
+ ******************************************************************************/
tSMP_STATUS SMP_BR_PairWith (BD_ADDR bd_addr)
{
tSMP_CB *p_cb = &smp_cb;
@@ -210,16 +210,16 @@
}
/*******************************************************************************
-**
-** Function SMP_PairCancel
-**
-** Description This function call to cancel a SMP pairing with peer device.
-**
-** Parameters bd_addr - peer device bd address.
-**
-** Returns true - Pairining is cancelled
-**
-*******************************************************************************/
+ *
+ * Function SMP_PairCancel
+ *
+ * Description This function call to cancel a SMP pairing with peer device.
+ *
+ * Parameters bd_addr - peer device bd address.
+ *
+ * Returns true - Pairining is cancelled
+ *
+ ******************************************************************************/
bool SMP_PairCancel (BD_ADDR bd_addr)
{
tSMP_CB *p_cb = &smp_cb;
@@ -245,18 +245,18 @@
return status;
}
/*******************************************************************************
-**
-** Function SMP_SecurityGrant
-**
-** 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.
-**
-** Returns None
-**
-*******************************************************************************/
+ *
+ * Function SMP_SecurityGrant
+ *
+ * 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.
+ *
+ * Returns None
+ *
+ ******************************************************************************/
void SMP_SecurityGrant(BD_ADDR bd_addr, uint8_t res)
{
SMP_TRACE_EVENT ("SMP_SecurityGrant ");
@@ -288,18 +288,18 @@
}
/*******************************************************************************
-**
-** Function SMP_PasskeyReply
-**
-** Description This function is called after Security Manager submitted
-** 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
-** passkey - numeric value in the range of
-** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
-**
-*******************************************************************************/
+ *
+ * Function SMP_PasskeyReply
+ *
+ * Description This function is called after Security Manager submitted
+ * 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
+ * passkey - numeric value in the range of
+ * BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
+ *
+ ******************************************************************************/
void SMP_PasskeyReply (BD_ADDR bd_addr, uint8_t res, uint32_t passkey)
{
tSMP_CB *p_cb = & smp_cb;
@@ -347,17 +347,17 @@
}
/*******************************************************************************
-**
-** Function SMP_ConfirmReply
-**
-** Description This function is called after Security Manager submitted
-** numeric comparison request to the application.
-**
-** Parameters: bd_addr - Address of the device with which numeric
-** comparison was requested
-** res - comparison result SMP_SUCCESS if success
-**
-*******************************************************************************/
+ *
+ * Function SMP_ConfirmReply
+ *
+ * Description This function is called after Security Manager submitted
+ * numeric comparison request to the application.
+ *
+ * Parameters: bd_addr - Address of the device with which numeric
+ * comparison was requested
+ * res - comparison result SMP_SUCCESS if success
+ *
+ ******************************************************************************/
void SMP_ConfirmReply (BD_ADDR bd_addr, uint8_t res)
{
tSMP_CB *p_cb = & smp_cb;
@@ -397,17 +397,17 @@
}
/*******************************************************************************
-**
-** Function SMP_OobDataReply
-**
-** Description This function is called to provide the OOB data for
-** 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
-** p_data - simple pairing Randomizer C.
-**
-*******************************************************************************/
+ *
+ * Function SMP_OobDataReply
+ *
+ * Description This function is called to provide the OOB data for
+ * 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
+ * p_data - simple pairing Randomizer C.
+ *
+ ******************************************************************************/
void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, uint8_t len, uint8_t *p_data)
{
tSMP_CB *p_cb = & smp_cb;
@@ -439,15 +439,15 @@
}
/*******************************************************************************
-**
-** Function SMP_SecureConnectionOobDataReply
-**
-** Description This function is called to provide the SC OOB data for
-** SMP in response to SMP_SC_OOB_REQ_EVT
-**
-** Parameters: p_data - pointer to the data
-**
-*******************************************************************************/
+ *
+ * Function SMP_SecureConnectionOobDataReply
+ *
+ * Description This function is called to provide the SC OOB data for
+ * SMP in response to SMP_SC_OOB_REQ_EVT
+ *
+ * Parameters: p_data - pointer to the data
+ *
+ ******************************************************************************/
void SMP_SecureConnectionOobDataReply(uint8_t *p_data)
{
tSMP_CB *p_cb = &smp_cb;
@@ -502,21 +502,21 @@
}
/*******************************************************************************
-**
-** Function SMP_Encrypt
-**
-** 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
-*******************************************************************************/
+ *
+ * Function SMP_Encrypt
+ *
+ * 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
+ ******************************************************************************/
bool SMP_Encrypt (uint8_t *key, uint8_t key_len,
uint8_t *plain_text, uint8_t pt_len,
tSMP_ENC *p_out)
@@ -528,15 +528,15 @@
}
/*******************************************************************************
-**
-** Function SMP_KeypressNotification
-**
-** Description This function is called to notify Security Manager about Keypress Notification.
-**
-** Parameters: bd_addr Address of the device to send keypress notification to
-** value Keypress notification parameter value
-**
-*******************************************************************************/
+ *
+ * Function SMP_KeypressNotification
+ *
+ * Description This function is called to notify Security Manager about Keypress Notification.
+ *
+ * Parameters: bd_addr Address of the device to send keypress notification to
+ * value Keypress notification parameter value
+ *
+ ******************************************************************************/
void SMP_KeypressNotification (BD_ADDR bd_addr, uint8_t value)
{
tSMP_CB *p_cb = &smp_cb;
@@ -575,16 +575,16 @@
}
/*******************************************************************************
-**
-** Function SMP_CreateLocalSecureConnectionsOobData
-**
-** Description This function is called to start creation of local SC OOB
-** data set (tSMP_LOC_OOB_DATA).
-**
-** Parameters: bd_addr - Address of the device to send OOB data block to
-**
-** Returns Boolean - true: creation of local SC OOB data set started.
-*******************************************************************************/
+ *
+ * Function SMP_CreateLocalSecureConnectionsOobData
+ *
+ * Description This function is called to start creation of local SC OOB
+ * data set (tSMP_LOC_OOB_DATA).
+ *
+ * Parameters: bd_addr - Address of the device to send OOB data block to
+ *
+ * Returns Boolean - true: creation of local SC OOB data set started.
+ ******************************************************************************/
bool SMP_CreateLocalSecureConnectionsOobData (tBLE_BD_ADDR *addr_to_send_to)
{
tSMP_CB *p_cb = &smp_cb;
diff --git a/stack/smp/smp_br_main.cc b/stack/smp/smp_br_main.cc
index ecc4f1d..24b8c78 100644
--- a/stack/smp/smp_br_main.cc
+++ b/stack/smp/smp_br_main.cc
@@ -259,9 +259,9 @@
#define SMP_BR_ALL_TABLE_MASK 0x80
/*******************************************************************************
-** Function smp_set_br_state
-** Returns None
-*******************************************************************************/
+ * Function smp_set_br_state
+ * Returns None
+ ******************************************************************************/
void smp_set_br_state(tSMP_BR_STATE br_state)
{
if (br_state < SMP_BR_STATE_MAX)
@@ -278,18 +278,18 @@
}
/*******************************************************************************
-** Function smp_get_br_state
-** Returns The smp_br state
-*******************************************************************************/
+ * Function smp_get_br_state
+ * Returns The smp_br state
+ ******************************************************************************/
tSMP_BR_STATE smp_get_br_state(void)
{
return smp_cb.br_state;
}
/*******************************************************************************
-** Function smp_get_br_state_name
-** Returns The smp_br state name.
-*******************************************************************************/
+ * Function smp_get_br_state_name
+ * Returns The smp_br state name.
+ ******************************************************************************/
const char *smp_get_br_state_name(tSMP_BR_STATE br_state)
{
const char *p_str = smp_br_state_name[SMP_BR_STATE_MAX];
@@ -300,9 +300,9 @@
return p_str;
}
/*******************************************************************************
-** Function smp_get_br_event_name
-** Returns The smp_br event name.
-*******************************************************************************/
+ * Function smp_get_br_event_name
+ * Returns The smp_br event name.
+ ******************************************************************************/
const char * smp_get_br_event_name(tSMP_BR_EVENT event)
{
const char * p_str = smp_br_event_name[SMP_BR_MAX_EVT - 1];
@@ -315,19 +315,19 @@
}
/*******************************************************************************
-**
-** Function smp_br_state_machine_event
-**
-** Description Handle events to the state machine. It looks up the entry
-** in the smp_br_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.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function smp_br_state_machine_event
+ *
+ * Description Handle events to the state machine. It looks up the entry
+ * in the smp_br_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.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void smp_br_state_machine_event(tSMP_CB *p_cb, tSMP_BR_EVENT event, void *p_data)
{
tSMP_BR_STATE curr_state = p_cb->br_state;
diff --git a/stack/smp/smp_cmac.cc b/stack/smp/smp_cmac.cc
index acc7981..0354524 100644
--- a/stack/smp/smp_cmac.cc
+++ b/stack/smp/smp_cmac.cc
@@ -64,17 +64,17 @@
}
/*******************************************************************************
-**
-** Function padding
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function padding
+ *
+ * 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
+ *
+ ******************************************************************************/
static void padding ( BT_OCTET16 dest, uint8_t length )
{
uint8_t i, *p = dest;
@@ -83,14 +83,14 @@
p[BT_OCTET16_LEN - i - 1] = ( i == length ) ? 0x80 : 0;
}
/*******************************************************************************
-**
-** Function leftshift_onebit
-**
-** Description utility function to left shift one bit for a 128 bits value.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function leftshift_onebit
+ *
+ * Description utility function to left shift one bit for a 128 bits value.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void leftshift_onebit(uint8_t *input, uint8_t *output)
{
uint8_t i, overflow = 0 , next_overflow = 0;
@@ -105,14 +105,14 @@
return;
}
/*******************************************************************************
-**
-** Function cmac_aes_cleanup
-**
-** Description clean up function for AES_CMAC algorithm.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function cmac_aes_cleanup
+ *
+ * Description clean up function for AES_CMAC algorithm.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void cmac_aes_cleanup(void)
{
osi_free(cmac_cb.text);
@@ -120,14 +120,14 @@
}
/*******************************************************************************
-**
-** Function cmac_aes_k_calculate
-**
-** Description This function is the calculation of block cipher using AES-128.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function cmac_aes_k_calculate
+ *
+ * Description This function is the calculation of block cipher using AES-128.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static bool cmac_aes_k_calculate(BT_OCTET16 key, uint8_t *p_signature, uint16_t tlen)
{
tSMP_ENC output;
@@ -169,15 +169,15 @@
return false;
}
/*******************************************************************************
-**
-** Function cmac_prepare_last_block
-**
-** Description This function proceeed to prepare the last block of message
-** Mn depending on the size of the message.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function cmac_prepare_last_block
+ *
+ * Description This function proceeed to prepare the last block of message
+ * Mn depending on the size of the message.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void cmac_prepare_last_block (BT_OCTET16 k1, BT_OCTET16 k2)
{
// uint8_t x[16] = {0};
@@ -201,14 +201,14 @@
}
}
/*******************************************************************************
-**
-** Function cmac_subkey_cont
-**
-** Description This is the callback function when CIPHk(0[128]) is completed.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function cmac_subkey_cont
+ *
+ * Description This is the callback function when CIPHk(0[128]) is completed.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void cmac_subkey_cont(tSMP_ENC *p)
{
uint8_t k1[BT_OCTET16_LEN], k2[BT_OCTET16_LEN];
@@ -246,16 +246,16 @@
cmac_prepare_last_block (k1, k2);
}
/*******************************************************************************
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * 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
+ *
+ ******************************************************************************/
static bool cmac_generate_subkey(BT_OCTET16 key)
{
BT_OCTET16 z = {0};
@@ -273,20 +273,20 @@
return ret;
}
/*******************************************************************************
-**
-** Function aes_cipher_msg_auth_code
-**
-** 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 false if out of resources, true in other cases.
-**
-*******************************************************************************/
+ *
+ * Function aes_cipher_msg_auth_code
+ *
+ * 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 false if out of resources, true in other cases.
+ *
+ ******************************************************************************/
bool aes_cipher_msg_auth_code(BT_OCTET16 key, uint8_t *input, uint16_t length,
uint16_t tlen, uint8_t *p_signature)
{
diff --git a/stack/smp/smp_keys.cc b/stack/smp/smp_keys.cc
index dfeea88..1fec7e6 100644
--- a/stack/smp/smp_keys.cc
+++ b/stack/smp/smp_keys.cc
@@ -109,16 +109,16 @@
}
/*******************************************************************************
-**
-** Function smp_encrypt_data
-**
-** Description This function is called to encrypt data.
-** It uses AES-128 encryption algorithm.
-** Plain_text is encrypted using key, the result is at p_out.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_encrypt_data
+ *
+ * Description This function is called to encrypt data.
+ * It uses AES-128 encryption algorithm.
+ * Plain_text is encrypted using key, the result is at p_out.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool smp_encrypt_data (uint8_t *key, uint8_t key_len,
uint8_t *plain_text, uint8_t pt_len,
tSMP_ENC *p_out)
@@ -173,14 +173,14 @@
}
/*******************************************************************************
-**
-** Function smp_generate_passkey
-**
-** Description This function is called to generate passkey.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_generate_passkey
+ *
+ * Description This function is called to generate passkey.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_generate_passkey(tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -192,14 +192,14 @@
}
/*******************************************************************************
-**
-** Function smp_proc_passkey
-**
-** Description This function is called to process a passkey.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_proc_passkey
+ *
+ * Description This function is called to process a passkey.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_proc_passkey(tSMP_CB *p_cb , tBTM_RAND_ENC *p)
{
uint8_t *tt = p_cb->tk;
@@ -238,16 +238,16 @@
}
/*******************************************************************************
-**
-** 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
-** values.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * 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
+ * values.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_generate_stk(tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -276,16 +276,16 @@
}
/*******************************************************************************
-**
-** Function smp_generate_srand_mrand_confirm
-**
-** Description This function is called to start the second pairing phase by
-** start generating random number.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_generate_srand_mrand_confirm
+ *
+ * Description This function is called to start the second pairing phase by
+ * start generating random number.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_generate_srand_mrand_confirm(tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -296,15 +296,15 @@
}
/*******************************************************************************
-**
-** Function smp_generate_rand_cont
-**
-** Description This function is called to generate another 64 bits random for
-** MRand or Srand.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_generate_rand_cont
+ *
+ * Description This function is called to generate another 64 bits random for
+ * MRand or Srand.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_generate_rand_cont(tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -315,20 +315,20 @@
}
/*******************************************************************************
-**
-** Function smp_generate_ltk
-**
-** Description This function is called:
-** - in legacy pairing - to calculate LTK, starting with DIV
-** generation;
-** - in LE Secure Connections pairing over LE transport - to process LTK
-** already generated to encrypt LE link;
-** - in LE Secure Connections pairing over BR/EDR transport - to start
-** BR/EDR Link Key processing.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_generate_ltk
+ *
+ * Description This function is called:
+ * - in legacy pairing - to calculate LTK, starting with DIV
+ * generation;
+ * - in LE Secure Connections pairing over LE transport - to process LTK
+ * already generated to encrypt LE link;
+ * - in LE Secure Connections pairing over BR/EDR transport - to start
+ * BR/EDR Link Key processing.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_generate_ltk(tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -362,15 +362,15 @@
}
/*******************************************************************************
-**
-** Function smp_compute_csrk
-**
-** Description This function is called to calculate CSRK
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_compute_csrk
+ *
+ * Description This function is called to calculate CSRK
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_compute_csrk(tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -408,16 +408,16 @@
}
/*******************************************************************************
-**
-** Function smp_generate_csrk
-**
-** Description This function is called to calculate CSRK, starting with DIV
-** generation.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_generate_csrk
+ *
+ * Description This function is called to calculate CSRK, starting with DIV
+ * generation.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_generate_csrk(tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -440,9 +440,9 @@
}
/*******************************************************************************
-** Function smp_concatenate_peer
-** add pairing command sent from local device into p1.
-*******************************************************************************/
+ * Function smp_concatenate_peer
+ * add pairing command sent from local device into p1.
+ ******************************************************************************/
void smp_concatenate_local( tSMP_CB *p_cb, uint8_t **p_data, uint8_t op_code)
{
uint8_t *p = *p_data;
@@ -460,9 +460,9 @@
}
/*******************************************************************************
-** Function smp_concatenate_peer
-** add pairing command received from peer device into p1.
-*******************************************************************************/
+ * Function smp_concatenate_peer
+ * add pairing command received from peer device into p1.
+ ******************************************************************************/
void smp_concatenate_peer( tSMP_CB *p_cb, uint8_t **p_data, uint8_t op_code)
{
uint8_t *p = *p_data;
@@ -480,15 +480,15 @@
}
/*******************************************************************************
-**
-** Function smp_gen_p1_4_confirm
-**
-** Description Generate Confirm/Compare Step1:
-** p1 = pres || preq || rat' || iat'
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_gen_p1_4_confirm
+ *
+ * Description Generate Confirm/Compare Step1:
+ * p1 = pres || preq || rat' || iat'
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_gen_p1_4_confirm( tSMP_CB *p_cb, BT_OCTET16 p1)
{
uint8_t *p = (uint8_t *)p1;
@@ -534,15 +534,15 @@
}
/*******************************************************************************
-**
-** Function smp_gen_p2_4_confirm
-**
-** Description Generate Confirm/Compare Step2:
-** p2 = padding || ia || ra
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_gen_p2_4_confirm
+ *
+ * Description Generate Confirm/Compare Step2:
+ * p2 = padding || ia || ra
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_gen_p2_4_confirm( tSMP_CB *p_cb, BT_OCTET16 p2)
{
uint8_t *p = (uint8_t *)p2;
@@ -580,14 +580,14 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_comfirm
-**
-** Description This function is called to calculate Confirm value.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_comfirm
+ *
+ * Description This function is called to calculate Confirm value.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_calculate_comfirm (tSMP_CB *p_cb, BT_OCTET16 rand,
UNUSED_ATTR BD_ADDR bda)
{
@@ -618,15 +618,15 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_comfirm_cont
-**
-** Description This function is called when SConfirm/MConfirm is generated
-** proceed to send the Confirm request/response to peer device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_comfirm_cont
+ *
+ * Description This function is called when SConfirm/MConfirm is generated
+ * proceed to send the Confirm request/response to peer device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void smp_calculate_comfirm_cont(tSMP_CB *p_cb, tSMP_ENC *p)
{
BT_OCTET16 p2;
@@ -667,15 +667,15 @@
}
/*******************************************************************************
-**
-** Function smp_generate_confirm
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function smp_generate_confirm
+ *
+ * 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_generate_confirm(tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -686,16 +686,16 @@
}
/*******************************************************************************
-**
-** Function smp_generate_compare
-**
-** 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
-**
-*******************************************************************************/
+ *
+ * Function smp_generate_compare
+ *
+ * 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,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -706,15 +706,15 @@
}
/*******************************************************************************
-**
-** Function smp_process_confirm
-**
-** Description This function is called when SConfirm/MConfirm is generated
-** proceed to send the Confirm request/response to peer device.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_process_confirm
+ *
+ * Description This function is called when SConfirm/MConfirm is generated
+ * proceed to send the Confirm request/response to peer device.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void smp_process_confirm(tSMP_CB *p_cb, tSMP_ENC *p)
{
tSMP_KEY key;
@@ -733,15 +733,15 @@
}
/*******************************************************************************
-**
-** Function smp_process_compare
-**
-** Description This function is called when Compare is generated using the
-** RRand and local BDA, TK information.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_process_compare
+ *
+ * Description This function is called when Compare is generated using the
+ * RRand and local BDA, TK information.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void smp_process_compare(tSMP_CB *p_cb, tSMP_ENC *p)
{
tSMP_KEY key;
@@ -758,15 +758,15 @@
}
/*******************************************************************************
-**
-** Function smp_process_stk
-**
-** Description This function is called when STK is generated
-** proceed to send the encrypt the link using STK.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_process_stk
+ *
+ * Description This function is called when STK is generated
+ * proceed to send the encrypt the link using STK.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void smp_process_stk(tSMP_CB *p_cb, tSMP_ENC *p)
{
tSMP_KEY key;
@@ -784,14 +784,14 @@
}
/*******************************************************************************
-**
-** Function smp_generate_ltk_cont
-**
-** Description This function is to calculate LTK = d1(ER, DIV, 0)= e(ER, DIV)
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_generate_ltk_cont
+ *
+ * Description This function is to calculate LTK = d1(ER, DIV, 0)= e(ER, DIV)
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void smp_generate_ltk_cont(tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p_data)
{
@@ -820,14 +820,14 @@
}
/*******************************************************************************
-**
-** Function smp_generate_y
-**
-** Description This function is to proceed generate Y = E(DHK, Rand)
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * 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,
UNUSED_ATTR tSMP_INT_DATA *p)
{
@@ -853,15 +853,15 @@
}
/*******************************************************************************
-**
-** Function smp_generate_rand_vector
-**
-** Description This function is called when LTK is generated, send state machine
-** event to SMP.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_generate_rand_vector
+ *
+ * Description This function is called when LTK is generated, send state machine
+ * event to SMP.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void smp_generate_rand_vector (tSMP_CB *p_cb,
UNUSED_ATTR tSMP_INT_DATA *p)
{
@@ -873,14 +873,14 @@
}
/*******************************************************************************
-**
-** Function smp_process_ediv
-**
-** Description This function is to calculate EDIV = Y xor DIV
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_process_ediv
+ *
+ * Description This function is to calculate EDIV = Y xor DIV
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void smp_process_ediv(tSMP_CB *p_cb, tSMP_ENC *p)
{
tSMP_KEY key;
@@ -901,14 +901,14 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_legacy_short_term_key
-**
-** Description The function calculates legacy STK.
-**
-** Returns false if out of resources, true in other cases.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_legacy_short_term_key
+ *
+ * Description The function calculates legacy STK.
+ *
+ * Returns false if out of resources, true in other cases.
+ *
+ ******************************************************************************/
bool smp_calculate_legacy_short_term_key(tSMP_CB *p_cb, tSMP_ENC *output)
{
BT_OCTET16 ptext;
@@ -938,17 +938,17 @@
}
/*******************************************************************************
-**
-** Function smp_create_private_key
-**
-** Description This function is called to create private key used to
-** calculate public key and DHKey.
-** The function starts private key creation requesting controller
-** to generate [0-7] octets of private key.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_create_private_key
+ *
+ * Description This function is called to create private key used to
+ * calculate public key and DHKey.
+ * The function starts private key creation requesting controller
+ * to generate [0-7] octets of private key.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_create_private_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG ("%s",__func__);
@@ -957,21 +957,21 @@
}
/*******************************************************************************
-**
-** Function smp_use_oob_private_key
-**
-** Description This function is called
-** - to save the secret key used to calculate the public key used
-** in calculations of commitment sent OOB to a peer
-** - to use this secret key to recalculate the public key and
-** start the process of sending this public key to the peer
-** if secret/public keys have to be reused.
-** If the keys aren't supposed to be reused, continue from the
-** point from which request for OOB data was issued.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_use_oob_private_key
+ *
+ * Description This function is called
+ * - to save the secret key used to calculate the public key used
+ * in calculations of commitment sent OOB to a peer
+ * - to use this secret key to recalculate the public key and
+ * start the process of sending this public key to the peer
+ * if secret/public keys have to be reused.
+ * If the keys aren't supposed to be reused, continue from the
+ * point from which request for OOB data was issued.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_use_oob_private_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
SMP_TRACE_DEBUG ("%s req_oob_type: %d, role: %d",
@@ -994,14 +994,14 @@
}
/*******************************************************************************
-**
-** Function smp_continue_private_key_creation
-**
-** Description This function is used to continue private key creation.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_continue_private_key_creation
+ *
+ * Description This function is used to continue private key creation.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_continue_private_key_creation (tSMP_CB *p_cb, tBTM_RAND_ENC *p)
{
uint8_t state = p_cb->rand_enc_proc_state & ~0x80;
@@ -1040,16 +1040,16 @@
}
/*******************************************************************************
-**
-** Function smp_process_private_key
-**
-** Description This function processes private key.
-** It calculates public key and notifies SM that private key /
-** public key pair is created.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_process_private_key
+ *
+ * Description This function processes private key.
+ * It calculates public key and notifies SM that private key /
+ * public key pair is created.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_process_private_key(tSMP_CB *p_cb)
{
Point public_key;
@@ -1073,17 +1073,17 @@
}
/*******************************************************************************
-**
-** Function smp_compute_dhkey
-**
-** Description The function:
-** - calculates a new public key using as input local private
-** key and peer public key;
-** - saves the new public key x-coordinate as DHKey.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_compute_dhkey
+ *
+ * Description The function:
+ * - calculates a new public key using as input local private
+ * key and peer public key;
+ * - saves the new public key x-coordinate as DHKey.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_compute_dhkey (tSMP_CB *p_cb)
{
Point peer_publ_key, new_publ_key;
@@ -1113,14 +1113,14 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_local_commitment
-**
-** Description The function calculates and saves local commmitment in CB.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_local_commitment
+ *
+ * Description The function calculates and saves local commmitment in CB.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_calculate_local_commitment(tSMP_CB *p_cb)
{
uint8_t random_input;
@@ -1158,15 +1158,15 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_peer_commitment
-**
-** Description The function calculates and saves peer commmitment at the
-** provided output buffer.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_peer_commitment
+ *
+ * Description The function calculates and saves peer commmitment at the
+ * provided output buffer.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_calculate_peer_commitment(tSMP_CB *p_cb, BT_OCTET16 output_buf)
{
uint8_t ri;
@@ -1203,25 +1203,25 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_f4
-**
-** Description The function calculates
-** C = f4(U, V, X, Z) = AES-CMAC (U||V||Z)
-** X
-** where
-** input: U is 256 bit,
-** V is 256 bit,
-** X is 128 bit,
-** Z is 8 bit,
-** output: C is 128 bit.
-**
-** Returns void
-**
-** Note The LSB is the first octet, the MSB is the last octet of
-** the AES-CMAC input/output stream.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_f4
+ *
+ * Description The function calculates
+ * C = f4(U, V, X, Z) = AES-CMAC (U||V||Z)
+ * X
+ * where
+ * input: U is 256 bit,
+ * V is 256 bit,
+ * X is 128 bit,
+ * Z is 8 bit,
+ * output: C is 128 bit.
+ *
+ * Returns void
+ *
+ * Note The LSB is the first octet, the MSB is the last octet of
+ * the AES-CMAC input/output stream.
+ *
+ ******************************************************************************/
void smp_calculate_f4(uint8_t *u, uint8_t *v, uint8_t *x, uint8_t z, uint8_t *c)
{
uint8_t msg_len = BT_OCTET32_LEN /* U size */ + BT_OCTET32_LEN /* V size */ + 1 /* Z size */;
@@ -1273,15 +1273,15 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_numeric_comparison_display_number
-**
-** Description The function calculates and saves number to display in numeric
-** comparison association mode.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_numeric_comparison_display_number
+ *
+ * Description The function calculates and saves number to display in numeric
+ * comparison association mode.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_calculate_numeric_comparison_display_number(tSMP_CB *p_cb,
tSMP_INT_DATA *p_data)
{
@@ -1315,28 +1315,28 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_g2
-**
-** Description The function calculates
-** g2(U, V, X, Y) = AES-CMAC (U||V||Y) mod 2**32 mod 10**6
-** X
-** and
-** Vres = g2(U, V, X, Y) mod 10**6
-** where
-** input: U is 256 bit,
-** V is 256 bit,
-** X is 128 bit,
-** Y is 128 bit,
-**
-** Returns Vres.
-** Expected value has to be in the range [0 - 999999] i.e. [0 - 0xF423F].
-** Vres = 1000000 means that the calculation fails.
-**
-** Note The LSB is the first octet, the MSB is the last octet of
-** the AES-CMAC input/output stream.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_g2
+ *
+ * Description The function calculates
+ * g2(U, V, X, Y) = AES-CMAC (U||V||Y) mod 2**32 mod 10**6
+ * X
+ * and
+ * Vres = g2(U, V, X, Y) mod 10**6
+ * where
+ * input: U is 256 bit,
+ * V is 256 bit,
+ * X is 128 bit,
+ * Y is 128 bit,
+ *
+ * Returns Vres.
+ * Expected value has to be in the range [0 - 999999] i.e. [0 - 0xF423F].
+ * Vres = 1000000 means that the calculation fails.
+ *
+ * Note The LSB is the first octet, the MSB is the last octet of
+ * the AES-CMAC input/output stream.
+ *
+ ******************************************************************************/
uint32_t smp_calculate_g2(uint8_t *u, uint8_t *v, uint8_t *x, uint8_t *y)
{
uint8_t msg_len = BT_OCTET32_LEN /* U size */ + BT_OCTET32_LEN /* V size */
@@ -1405,60 +1405,60 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_f5
-**
-** Description The function provides two AES-CMAC that are supposed to be used as
-** - MacKey (MacKey is used in pairing DHKey check calculation);
-** - LTK (LTK is used to ecrypt the link after completion of Phase 2
-** and on reconnection, to derive BR/EDR LK).
-** The function inputs are W, N1, N2, A1, A2.
-** F5 rules:
-** - the value used as key in MacKey/LTK (T) is calculated
-** (function smp_calculate_f5_key(...));
-** The formula is:
-** T = AES-CMAC (W)
-** salt
-** where salt is internal parameter of smp_calculate_f5_key(...).
-** - MacKey and LTK are calculated as AES-MAC values received with the
-** key T calculated in the previous step and the plaintext message
-** built from the external parameters N1, N2, A1, A2 and the internal
-** parameters counter, keyID, length.
-** The function smp_calculate_f5_mackey_or_long_term_key(...) is used in the
-** calculations.
-** The same formula is used in calculation of MacKey and LTK and the
-** same parameter values except the value of the internal parameter
-** counter:
-** - in MacKey calculations the value is 0;
-** - in LTK calculations the value is 1.
-** MacKey = AES-CMAC (Counter=0||keyID||N1||N2||A1||A2||Length=256)
-** T
-** LTK = AES-CMAC (Counter=1||keyID||N1||N2||A1||A2||Length=256)
-** T
-** The parameters are
-** input:
-** W is 256 bits,
-** N1 is 128 bits,
-** N2 is 128 bits,
-** A1 is 56 bit,
-** A2 is 56 bit.
-** internal:
-** Counter is 8 bits, its value is 0 for MacKey,
-** 1 for LTK;
-** KeyId is 32 bits, its value is
-** 0x62746c65 (MSB~LSB);
-** Length is 16 bits, its value is 0x0100
-** (MSB~LSB).
-** output:
-** MacKey is 128 bits;
-** LTK is 128 bits
-**
-** Returns false if out of resources, true in other cases.
-**
-** Note The LSB is the first octet, the MSB is the last octet of
-** the AES-CMAC input/output stream.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_f5
+ *
+ * Description The function provides two AES-CMAC that are supposed to be used as
+ * - MacKey (MacKey is used in pairing DHKey check calculation);
+ * - LTK (LTK is used to ecrypt the link after completion of Phase 2
+ * and on reconnection, to derive BR/EDR LK).
+ * The function inputs are W, N1, N2, A1, A2.
+ * F5 rules:
+ * - the value used as key in MacKey/LTK (T) is calculated
+ * (function smp_calculate_f5_key(...));
+ * The formula is:
+ * T = AES-CMAC (W)
+ * salt
+ * where salt is internal parameter of smp_calculate_f5_key(...).
+ * - MacKey and LTK are calculated as AES-MAC values received with the
+ * key T calculated in the previous step and the plaintext message
+ * built from the external parameters N1, N2, A1, A2 and the internal
+ * parameters counter, keyID, length.
+ * The function smp_calculate_f5_mackey_or_long_term_key(...) is used in the
+ * calculations.
+ * The same formula is used in calculation of MacKey and LTK and the
+ * same parameter values except the value of the internal parameter
+ * counter:
+ * - in MacKey calculations the value is 0;
+ * - in LTK calculations the value is 1.
+ * MacKey = AES-CMAC (Counter=0||keyID||N1||N2||A1||A2||Length=256)
+ * T
+ * LTK = AES-CMAC (Counter=1||keyID||N1||N2||A1||A2||Length=256)
+ * T
+ * The parameters are
+ * input:
+ * W is 256 bits,
+ * N1 is 128 bits,
+ * N2 is 128 bits,
+ * A1 is 56 bit,
+ * A2 is 56 bit.
+ * internal:
+ * Counter is 8 bits, its value is 0 for MacKey,
+ * 1 for LTK;
+ * KeyId is 32 bits, its value is
+ * 0x62746c65 (MSB~LSB);
+ * Length is 16 bits, its value is 0x0100
+ * (MSB~LSB).
+ * output:
+ * MacKey is 128 bits;
+ * LTK is 128 bits
+ *
+ * Returns false if out of resources, true in other cases.
+ *
+ * Note The LSB is the first octet, the MSB is the last octet of
+ * the AES-CMAC input/output stream.
+ *
+ ******************************************************************************/
bool smp_calculate_f5(uint8_t *w, uint8_t *n1, uint8_t *n2, uint8_t *a1, uint8_t *a2,
uint8_t *mac_key, uint8_t *ltk)
{
@@ -1534,37 +1534,37 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_f5_mackey_or_long_term_key
-**
-** Description The function calculates the value of MacKey or LTK by the rules
-** defined for f5 function.
-** At the moment exactly the same formula is used to calculate
-** LTK and MacKey.
-** The difference is the value of input parameter Counter:
-** - in MacKey calculations the value is 0;
-** - in LTK calculations the value is 1.
-** The formula:
-** mac = AES-CMAC (Counter||keyID||N1||N2||A1||A2||Length)
-** T
-** where
-** input: T is 256 bits;
-** Counter is 8 bits, its value is 0 for MacKey,
-** 1 for LTK;
-** keyID is 32 bits, its value is 0x62746c65;
-** N1 is 128 bits;
-** N2 is 128 bits;
-** A1 is 56 bits;
-** A2 is 56 bits;
-** Length is 16 bits, its value is 0x0100
-** output: LTK is 128 bit.
-**
-** Returns false if out of resources, true in other cases.
-**
-** Note The LSB is the first octet, the MSB is the last octet of
-** the AES-CMAC input/output stream.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_f5_mackey_or_long_term_key
+ *
+ * Description The function calculates the value of MacKey or LTK by the rules
+ * defined for f5 function.
+ * At the moment exactly the same formula is used to calculate
+ * LTK and MacKey.
+ * The difference is the value of input parameter Counter:
+ * - in MacKey calculations the value is 0;
+ * - in LTK calculations the value is 1.
+ * The formula:
+ * mac = AES-CMAC (Counter||keyID||N1||N2||A1||A2||Length)
+ * T
+ * where
+ * input: T is 256 bits;
+ * Counter is 8 bits, its value is 0 for MacKey,
+ * 1 for LTK;
+ * keyID is 32 bits, its value is 0x62746c65;
+ * N1 is 128 bits;
+ * N2 is 128 bits;
+ * A1 is 56 bits;
+ * A2 is 56 bits;
+ * Length is 16 bits, its value is 0x0100
+ * output: LTK is 128 bit.
+ *
+ * Returns false if out of resources, true in other cases.
+ *
+ * Note The LSB is the first octet, the MSB is the last octet of
+ * the AES-CMAC input/output stream.
+ *
+ ******************************************************************************/
bool smp_calculate_f5_mackey_or_long_term_key(uint8_t *t, uint8_t *counter,
uint8_t *key_id, uint8_t *n1, uint8_t *n2, uint8_t *a1, uint8_t *a2,
uint8_t *length, uint8_t *mac)
@@ -1637,24 +1637,24 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_f5_key
-**
-** Description The function calculates key T used in calculation of
-** MacKey and LTK (f5 output is defined as MacKey || LTK).
-** T = AES-CMAC (W)
-** salt
-** where
-** Internal: salt is 128 bit.
-** input: W is 256 bit.
-** Output: T is 128 bit.
-**
-** Returns false if out of resources, true in other cases.
-**
-** Note The LSB is the first octet, the MSB is the last octet of
-** the AES-CMAC input/output stream.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_f5_key
+ *
+ * Description The function calculates key T used in calculation of
+ * MacKey and LTK (f5 output is defined as MacKey || LTK).
+ * T = AES-CMAC (W)
+ * salt
+ * where
+ * Internal: salt is 128 bit.
+ * input: W is 256 bit.
+ * Output: T is 128 bit.
+ *
+ * Returns false if out of resources, true in other cases.
+ *
+ * Note The LSB is the first octet, the MSB is the last octet of
+ * the AES-CMAC input/output stream.
+ *
+ ******************************************************************************/
bool smp_calculate_f5_key(uint8_t *w, uint8_t *t)
{
uint8_t *p = NULL;
@@ -1711,18 +1711,18 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_local_dhkey_check
-**
-** Description The function calculates and saves local device DHKey check
-** value in CB.
-** Before doing this it calls smp_calculate_f5_mackey_and_long_term_key(...).
-** to calculate MacKey and LTK.
-** MacKey is used in dhkey calculation.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_local_dhkey_check
+ *
+ * Description The function calculates and saves local device DHKey check
+ * value in CB.
+ * Before doing this it calls smp_calculate_f5_mackey_and_long_term_key(...).
+ * to calculate MacKey and LTK.
+ * MacKey is used in dhkey calculation.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_calculate_local_dhkey_check(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t iocap[3], a[7], b[7];
@@ -1742,14 +1742,14 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_peer_dhkey_check
-**
-** Description The function calculates peer device DHKey check value.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_peer_dhkey_check
+ *
+ * Description The function calculates peer device DHKey check value.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_calculate_peer_dhkey_check(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
uint8_t iocap[3], a[7], b[7];
@@ -1786,28 +1786,28 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_f6
-**
-** Description The function calculates
-** C = f6(W, N1, N2, R, IOcap, A1, A2) = AES-CMAC (N1||N2||R||IOcap||A1||A2)
-** W
-** where
-** input: W is 128 bit,
-** N1 is 128 bit,
-** N2 is 128 bit,
-** R is 128 bit,
-** IOcap is 24 bit,
-** A1 is 56 bit,
-** A2 is 56 bit,
-** output: C is 128 bit.
-**
-** Returns false if out of resources, true in other cases.
-**
-** Note The LSB is the first octet, the MSB is the last octet of
-** the AES-CMAC input/output stream.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_f6
+ *
+ * Description The function calculates
+ * C = f6(W, N1, N2, R, IOcap, A1, A2) = AES-CMAC (N1||N2||R||IOcap||A1||A2)
+ * W
+ * where
+ * input: W is 128 bit,
+ * N1 is 128 bit,
+ * N2 is 128 bit,
+ * R is 128 bit,
+ * IOcap is 24 bit,
+ * A1 is 56 bit,
+ * A2 is 56 bit,
+ * output: C is 128 bit.
+ *
+ * Returns false if out of resources, true in other cases.
+ *
+ * Note The LSB is the first octet, the MSB is the last octet of
+ * the AES-CMAC input/output stream.
+ *
+ ******************************************************************************/
bool smp_calculate_f6(uint8_t *w, uint8_t *n1, uint8_t *n2, uint8_t *r, uint8_t *iocap, uint8_t *a1,
uint8_t *a2, uint8_t *c)
{
@@ -1878,15 +1878,15 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_link_key_from_long_term_key
-**
-** Description The function calculates and saves BR/EDR link key derived from
-** LE SC LTK.
-**
-** Returns false if out of resources, true in other cases.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_link_key_from_long_term_key
+ *
+ * Description The function calculates and saves BR/EDR link key derived from
+ * LE SC LTK.
+ *
+ * Returns false if out of resources, true in other cases.
+ *
+ ******************************************************************************/
bool smp_calculate_link_key_from_long_term_key(tSMP_CB *p_cb)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -1981,15 +1981,15 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_long_term_key_from_link_key
-**
-** Description The function calculates and saves SC LTK derived from BR/EDR
-** link key.
-**
-** Returns false if out of resources, true in other cases.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_long_term_key_from_link_key
+ *
+ * Description The function calculates and saves SC LTK derived from BR/EDR
+ * link key.
+ *
+ * Returns false if out of resources, true in other cases.
+ *
+ ******************************************************************************/
bool smp_calculate_long_term_key_from_link_key(tSMP_CB *p_cb)
{
bool ret = true;
@@ -2057,23 +2057,23 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_h6
-**
-** Description The function calculates
-** C = h6(W, KeyID) = AES-CMAC (KeyID)
-** W
-** where
-** input: W is 128 bit,
-** KeyId is 32 bit,
-** output: C is 128 bit.
-**
-** Returns false if out of resources, true in other cases.
-**
-** Note The LSB is the first octet, the MSB is the last octet of
-** the AES-CMAC input/output stream.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_h6
+ *
+ * Description The function calculates
+ * C = h6(W, KeyID) = AES-CMAC (KeyID)
+ * W
+ * where
+ * input: W is 128 bit,
+ * KeyId is 32 bit,
+ * output: C is 128 bit.
+ *
+ * Returns false if out of resources, true in other cases.
+ *
+ * Note The LSB is the first octet, the MSB is the last octet of
+ * the AES-CMAC input/output stream.
+ *
+ ******************************************************************************/
bool smp_calculate_h6(uint8_t *w, uint8_t *keyid, uint8_t *c)
{
#if (SMP_DEBUG == TRUE)
@@ -2129,14 +2129,14 @@
}
/*******************************************************************************
-**
-** Function smp_start_nonce_generation
-**
-** Description This function starts nonce generation.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_start_nonce_generation
+ *
+ * Description This function starts nonce generation.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_start_nonce_generation(tSMP_CB *p_cb)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -2145,14 +2145,14 @@
}
/*******************************************************************************
-**
-** Function smp_finish_nonce_generation
-**
-** Description This function finishes nonce generation.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_finish_nonce_generation
+ *
+ * Description This function finishes nonce generation.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_finish_nonce_generation(tSMP_CB *p_cb)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -2161,14 +2161,14 @@
}
/*******************************************************************************
-**
-** Function smp_process_new_nonce
-**
-** Description This function notifies SM that it has new nonce.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_process_new_nonce
+ *
+ * Description This function notifies SM that it has new nonce.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_process_new_nonce(tSMP_CB *p_cb)
{
SMP_TRACE_DEBUG ("%s round %d", __func__, p_cb->round);
@@ -2176,15 +2176,15 @@
}
/*******************************************************************************
-**
-** Function smp_rand_back
-**
-** Description This function is to process the rand command finished,
-** process the random/encrypted number for further action.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_rand_back
+ *
+ * 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;
diff --git a/stack/smp/smp_l2c.cc b/stack/smp/smp_l2c.cc
index 6bc2ab0..de571b0 100644
--- a/stack/smp/smp_l2c.cc
+++ b/stack/smp/smp_l2c.cc
@@ -44,13 +44,13 @@
static void smp_br_data_received(uint16_t channel, BD_ADDR bd_addr, BT_HDR *p_buf);
/*******************************************************************************
-**
-** Function smp_l2cap_if_init
-**
-** Description This function is called during the SMP task startup
-** to register interface functions with L2CAP.
-**
-*******************************************************************************/
+ *
+ * Function smp_l2cap_if_init
+ *
+ * Description This function is called during the SMP task startup
+ * to register interface functions with L2CAP.
+ *
+ ******************************************************************************/
void smp_l2cap_if_init (void)
{
tL2CAP_FIXED_CHNL_REG fixed_reg;
@@ -78,14 +78,14 @@
}
/*******************************************************************************
-**
-** Function smp_connect_callback
-**
-** Description This callback function is called by L2CAP to indicate that
-** SMP channel is
-** connected (conn = true)/disconnected (conn = false).
-**
-*******************************************************************************/
+ *
+ * Function smp_connect_callback
+ *
+ * Description This callback function is called by L2CAP to indicate that
+ * SMP channel is
+ * connected (conn = true)/disconnected (conn = false).
+ *
+ ******************************************************************************/
static void smp_connect_callback (uint16_t channel, BD_ADDR bd_addr, bool connected, uint16_t reason,
tBT_TRANSPORT transport)
{
@@ -131,16 +131,16 @@
}
/*******************************************************************************
-**
-** Function smp_data_received
-**
-** Description This function is called when data is received from L2CAP on
-** SMP channel.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_data_received
+ *
+ * Description This function is called when data is received from L2CAP on
+ * SMP channel.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void smp_data_received(uint16_t channel, BD_ADDR bd_addr, BT_HDR *p_buf)
{
tSMP_CB *p_cb = &smp_cb;
@@ -204,12 +204,12 @@
}
/*******************************************************************************
-**
-** Function smp_tx_complete_callback
-**
-** Description SMP channel tx complete callback
-**
-*******************************************************************************/
+ *
+ * Function smp_tx_complete_callback
+ *
+ * Description SMP channel tx complete callback
+ *
+ ******************************************************************************/
static void smp_tx_complete_callback (uint16_t cid, uint16_t num_pkt)
{
tSMP_CB *p_cb = &smp_cb;
@@ -230,14 +230,14 @@
}
/*******************************************************************************
-**
-** Function smp_br_connect_callback
-**
-** Description This callback function is called by L2CAP to indicate that
-** SMP BR channel is
-** connected (conn = true)/disconnected (conn = false).
-**
-*******************************************************************************/
+ *
+ * Function smp_br_connect_callback
+ *
+ * Description This callback function is called by L2CAP to indicate that
+ * SMP BR channel is
+ * connected (conn = true)/disconnected (conn = false).
+ *
+ ******************************************************************************/
static void smp_br_connect_callback(uint16_t channel, BD_ADDR bd_addr, bool connected,
uint16_t reason, tBT_TRANSPORT transport)
{
@@ -283,15 +283,15 @@
}
/*******************************************************************************
-**
-** Function smp_br_data_received
-**
-** Description This function is called when data is received from L2CAP on
-** SMP BR channel.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_br_data_received
+ *
+ * Description This function is called when data is received from L2CAP on
+ * SMP BR channel.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void smp_br_data_received(uint16_t channel, BD_ADDR bd_addr, BT_HDR *p_buf)
{
tSMP_CB *p_cb = &smp_cb;
diff --git a/stack/smp/smp_main.cc b/stack/smp/smp_main.cc
index c598df8..6d601d2 100644
--- a/stack/smp/smp_main.cc
+++ b/stack/smp/smp_main.cc
@@ -720,9 +720,9 @@
#define SMP_ALL_TBL_MASK 0x80
/*******************************************************************************
-** Function smp_set_state
-** Returns None
-*******************************************************************************/
+ * Function smp_set_state
+ * Returns None
+ ******************************************************************************/
void smp_set_state(tSMP_STATE state)
{
if (state < SMP_STATE_MAX)
@@ -739,29 +739,29 @@
}
/*******************************************************************************
-** Function smp_get_state
-** Returns The smp state
-*******************************************************************************/
+ * Function smp_get_state
+ * Returns The smp state
+ ******************************************************************************/
tSMP_STATE smp_get_state(void)
{
return smp_cb.state;
}
/*******************************************************************************
-**
-** 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),
-** call callback function.
-**
-** Returns 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),
+ * call callback function.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
void smp_sm_event(tSMP_CB *p_cb, tSMP_EVENT event, void *p_data)
{
uint8_t curr_state = p_cb->state;
@@ -827,9 +827,9 @@
}
/*******************************************************************************
-** Function smp_get_state_name
-** Returns The smp state name.
-*******************************************************************************/
+ * Function smp_get_state_name
+ * Returns The smp state name.
+ ******************************************************************************/
const char * smp_get_state_name(tSMP_STATE state)
{
const char *p_str = smp_state_name[SMP_STATE_MAX];
@@ -842,9 +842,9 @@
}
/*******************************************************************************
-** Function smp_get_event_name
-** Returns The smp event name.
-*******************************************************************************/
+ * Function smp_get_event_name
+ * Returns The smp event name.
+ ******************************************************************************/
const char * smp_get_event_name(tSMP_EVENT event)
{
const char *p_str = smp_event_name[SMP_MAX_EVT];
diff --git a/stack/smp/smp_utils.cc b/stack/smp/smp_utils.cc
index 7e526c0..c0963e6 100644
--- a/stack/smp/smp_utils.cc
+++ b/stack/smp/smp_utils.cc
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
-******************************************************************************/
+ *****************************************************************************/
/******************************************************************************
*
@@ -274,12 +274,12 @@
static tSMP_ASSO_MODEL smp_select_association_model_secure_connections(tSMP_CB *p_cb);
/*******************************************************************************
-**
-** Function smp_send_msg_to_L2CAP
-**
-** Description Send message to L2CAP.
-**
-*******************************************************************************/
+ *
+ * Function smp_send_msg_to_L2CAP
+ *
+ * Description Send message to L2CAP.
+ *
+ ******************************************************************************/
bool smp_send_msg_to_L2CAP(BD_ADDR rem_bda, BT_HDR *p_toL2CAP)
{
uint16_t l2cap_ret;
@@ -306,12 +306,12 @@
}
/*******************************************************************************
-**
-** Function smp_send_cmd
-**
-** Description send a SMP command on L2CAP channel.
-**
-*******************************************************************************/
+ *
+ * Function smp_send_cmd
+ *
+ * Description send a SMP command on L2CAP channel.
+ *
+ ******************************************************************************/
bool smp_send_cmd(uint8_t cmd_code, tSMP_CB *p_cb)
{
BT_HDR *p_buf;
@@ -348,14 +348,14 @@
}
/*******************************************************************************
-**
-** Function smp_rsp_timeout
-**
-** Description Called when SMP wait for SMP command response timer expires
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_rsp_timeout
+ *
+ * Description Called when SMP wait for SMP command response timer expires
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_rsp_timeout(UNUSED_ATTR void *data)
{
tSMP_CB *p_cb = &smp_cb;
@@ -374,15 +374,15 @@
}
/*******************************************************************************
-**
-** Function smp_delayed_auth_complete_timeout
-**
-** Description Called when no pairing failed command received within timeout
-** period.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_delayed_auth_complete_timeout
+ *
+ * Description Called when no pairing failed command received within timeout
+ * period.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_delayed_auth_complete_timeout(UNUSED_ATTR void *data)
{
/*
@@ -398,12 +398,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_pairing_req_cmd
-**
-** Description Build pairing request command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_pairing_req_cmd
+ *
+ * Description Build pairing request command.
+ *
+ ******************************************************************************/
BT_HDR * smp_build_pairing_cmd(uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -429,12 +429,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_confirm_cmd
-**
-** Description Build confirm request command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_confirm_cmd
+ *
+ * Description Build confirm request command.
+ *
+ ******************************************************************************/
static BT_HDR * smp_build_confirm_cmd(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -455,12 +455,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_rand_cmd
-**
-** Description Build Random command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_rand_cmd
+ *
+ * Description Build Random command.
+ *
+ ******************************************************************************/
static BT_HDR * smp_build_rand_cmd(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -480,12 +480,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_encrypt_info_cmd
-**
-** Description Build security information command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_encrypt_info_cmd
+ *
+ * Description Build security information command.
+ *
+ ******************************************************************************/
static BT_HDR * smp_build_encrypt_info_cmd(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -505,12 +505,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_master_id_cmd
-**
-** Description Build security information command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_master_id_cmd
+ *
+ * Description Build security information command.
+ *
+ ******************************************************************************/
static BT_HDR * smp_build_master_id_cmd(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -531,12 +531,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_identity_info_cmd
-**
-** Description Build identity information command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_identity_info_cmd
+ *
+ * Description Build identity information command.
+ *
+ ******************************************************************************/
static BT_HDR * smp_build_identity_info_cmd(UNUSED_ATTR uint8_t cmd_code,
UNUSED_ATTR tSMP_CB *p_cb)
{
@@ -561,12 +561,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_id_addr_cmd
-**
-** Description Build identity address information command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_id_addr_cmd
+ *
+ * Description Build identity address information command.
+ *
+ ******************************************************************************/
static BT_HDR * smp_build_id_addr_cmd(UNUSED_ATTR uint8_t cmd_code,
UNUSED_ATTR tSMP_CB *p_cb)
{
@@ -588,12 +588,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_signing_info_cmd
-**
-** Description Build signing information command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_signing_info_cmd
+ *
+ * Description Build signing information command.
+ *
+ ******************************************************************************/
static BT_HDR * smp_build_signing_info_cmd(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -613,12 +613,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_pairing_fail
-**
-** Description Build Pairing Fail command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_pairing_fail
+ *
+ * Description Build Pairing Fail command.
+ *
+ ******************************************************************************/
static BT_HDR * smp_build_pairing_fail(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -638,12 +638,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_security_request
-**
-** Description Build security request command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_security_request
+ *
+ * Description Build security request command.
+ *
+ ******************************************************************************/
static BT_HDR *smp_build_security_request(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -665,12 +665,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_pair_public_key_cmd
-**
-** Description Build pairing public key command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_pair_public_key_cmd
+ *
+ * Description Build pairing public key command.
+ *
+ ******************************************************************************/
static BT_HDR *smp_build_pair_public_key_cmd(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -695,12 +695,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_pairing_commitment_cmd
-**
-** Description Build pairing commitment command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_pairing_commitment_cmd
+ *
+ * Description Build pairing commitment command.
+ *
+ ******************************************************************************/
static BT_HDR *smp_build_pairing_commitment_cmd(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -720,12 +720,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_pair_dhkey_check_cmd
-**
-** Description Build pairing DHKey check command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_pair_dhkey_check_cmd
+ *
+ * Description Build pairing DHKey check command.
+ *
+ ******************************************************************************/
static BT_HDR *smp_build_pair_dhkey_check_cmd(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -745,12 +745,12 @@
}
/*******************************************************************************
-**
-** Function smp_build_pairing_keypress_notification_cmd
-**
-** Description Build keypress notification command.
-**
-*******************************************************************************/
+ *
+ * Function smp_build_pairing_keypress_notification_cmd
+ *
+ * Description Build keypress notification command.
+ *
+ ******************************************************************************/
static BT_HDR * smp_build_pairing_keypress_notification_cmd(UNUSED_ATTR uint8_t cmd_code, tSMP_CB *p_cb)
{
uint8_t *p;
@@ -770,16 +770,16 @@
}
/*******************************************************************************
-**
-** Function smp_convert_string_to_tk
-**
-** Description This function is called to convert a 6 to 16 digits numeric
-** character string into SMP TK.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_convert_string_to_tk
+ *
+ * Description This function is called to convert a 6 to 16 digits numeric
+ * character string into SMP TK.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_convert_string_to_tk(BT_OCTET16 tk, uint32_t passkey)
{
uint8_t *p = tk;
@@ -794,16 +794,16 @@
}
/*******************************************************************************
-**
-** Function smp_mask_enc_key
-**
-** Description This function is called to mask off the encryption key based
-** on the maximum encryption key size.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_mask_enc_key
+ *
+ * Description This function is called to mask off the encryption key based
+ * on the maximum encryption key size.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_mask_enc_key(uint8_t loc_enc_size, uint8_t * p_data)
{
SMP_TRACE_EVENT("smp_mask_enc_key");
@@ -816,15 +816,15 @@
}
/*******************************************************************************
-**
-** Function smp_xor_128
-**
-** Description utility function to do an biteise exclusive-OR of two bit
-** strings of the length of BT_OCTET16_LEN.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_xor_128
+ *
+ * Description utility function to do an biteise exclusive-OR of two bit
+ * strings of the length of BT_OCTET16_LEN.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_xor_128(BT_OCTET16 a, BT_OCTET16 b)
{
uint8_t i, *aa = a, *bb = b;
@@ -837,14 +837,14 @@
}
/*******************************************************************************
-**
-** Function smp_cb_cleanup
-**
-** Description Clean up SMP control block
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_cb_cleanup
+ *
+ * Description Clean up SMP control block
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_cb_cleanup(tSMP_CB *p_cb)
{
tSMP_CALLBACK *p_callback = p_cb->p_callback;
@@ -862,14 +862,14 @@
}
/*******************************************************************************
-**
-** Function smp_remove_fixed_channel
-**
-** Description This function is called to remove the fixed channel
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_remove_fixed_channel
+ *
+ * Description This function is called to remove the fixed channel
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_remove_fixed_channel(tSMP_CB *p_cb)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -881,16 +881,16 @@
}
/*******************************************************************************
-**
-** Function smp_reset_control_value
-**
-** Description This function is called to reset the control block value when
-** pairing procedure finished.
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_reset_control_value
+ *
+ * Description This function is called to reset the control block value when
+ * pairing procedure finished.
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_reset_control_value(tSMP_CB *p_cb)
{
SMP_TRACE_EVENT("%s", __func__);
@@ -909,15 +909,15 @@
}
/*******************************************************************************
-**
-** Function smp_proc_pairing_cmpl
-**
-** Description This function is called to process pairing complete
-**
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_proc_pairing_cmpl
+ *
+ * Description This function is called to process pairing complete
+ *
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_proc_pairing_cmpl(tSMP_CB *p_cb)
{
tSMP_EVT_DATA evt_data = {0};
@@ -951,17 +951,17 @@
}
/*******************************************************************************
-**
-** Function smp_command_has_invalid_parameters
-**
-** Description Checks if the received SMP command has invalid parameters i.e.
-** if the command length is valid and the command parameters are
-** inside specified range.
-** It returns true if the command has invalid parameters.
-**
-** Returns true if the command has invalid parameters, false otherwise.
-**
-*******************************************************************************/
+ *
+ * Function smp_command_has_invalid_parameters
+ *
+ * Description Checks if the received SMP command has invalid parameters i.e.
+ * if the command length is valid and the command parameters are
+ * inside specified range.
+ * It returns true if the command has invalid parameters.
+ *
+ * Returns true if the command has invalid parameters, false otherwise.
+ *
+ ******************************************************************************/
bool smp_command_has_invalid_parameters(tSMP_CB *p_cb)
{
uint8_t cmd_code = p_cb->rcvd_cmd_code;
@@ -985,16 +985,16 @@
}
/*******************************************************************************
-**
-** Function smp_command_has_valid_fixed_length
-**
-** Description Checks if the received command size is equal to the size
-** according to specs.
-**
-** Returns true if the command size is as expected, false otherwise.
-**
-** Note The command is expected to have fixed length.
-*******************************************************************************/
+ *
+ * Function smp_command_has_valid_fixed_length
+ *
+ * Description Checks if the received command size is equal to the size
+ * according to specs.
+ *
+ * Returns true if the command size is as expected, false otherwise.
+ *
+ * Note The command is expected to have fixed length.
+ ******************************************************************************/
bool smp_command_has_valid_fixed_length(tSMP_CB *p_cb)
{
uint8_t cmd_code = p_cb->rcvd_cmd_code;
@@ -1013,19 +1013,19 @@
}
/*******************************************************************************
-**
-** Function smp_pairing_request_response_parameters_are_valid
-**
-** Description Validates parameter ranges in the received SMP command
-** pairing request or pairing response.
-** The parameters to validate:
-** IO capability,
-** OOB data flag,
-** Bonding_flags in AuthReq
-** Maximum encryption key size.
-** Returns false if at least one of these parameters is out of range.
-**
-*******************************************************************************/
+ *
+ * Function smp_pairing_request_response_parameters_are_valid
+ *
+ * Description Validates parameter ranges in the received SMP command
+ * pairing request or pairing response.
+ * The parameters to validate:
+ * IO capability,
+ * OOB data flag,
+ * Bonding_flags in AuthReq
+ * Maximum encryption key size.
+ * Returns false if at least one of these parameters is out of range.
+ *
+ ******************************************************************************/
bool smp_pairing_request_response_parameters_are_valid(tSMP_CB *p_cb)
{
uint8_t io_caps = p_cb->peer_io_caps;
@@ -1071,14 +1071,14 @@
}
/*******************************************************************************
-**
-** Function smp_pairing_keypress_notification_is_valid
-**
-** Description Validates Notification Type parameter range in the received SMP command
-** pairing keypress notification.
-** Returns false if this parameter is out of range.
-**
-*******************************************************************************/
+ *
+ * Function smp_pairing_keypress_notification_is_valid
+ *
+ * Description Validates Notification Type parameter range in the received SMP command
+ * pairing keypress notification.
+ * Returns false if this parameter is out of range.
+ *
+ ******************************************************************************/
bool smp_pairing_keypress_notification_is_valid(tSMP_CB *p_cb)
{
tBTM_SP_KEY_TYPE keypress_notification = p_cb->peer_keypress_notification;
@@ -1097,39 +1097,39 @@
}
/*******************************************************************************
-**
-** Function smp_parameter_unconditionally_valid
-**
-** Description Always returns true.
-**
-*******************************************************************************/
+ *
+ * Function smp_parameter_unconditionally_valid
+ *
+ * Description Always returns true.
+ *
+ ******************************************************************************/
bool smp_parameter_unconditionally_valid(UNUSED_ATTR tSMP_CB *p_cb)
{
return true;
}
/*******************************************************************************
-**
-** Function smp_parameter_unconditionally_invalid
-**
-** Description Always returns false.
-**
-*******************************************************************************/
+ *
+ * Function smp_parameter_unconditionally_invalid
+ *
+ * Description Always returns false.
+ *
+ ******************************************************************************/
bool smp_parameter_unconditionally_invalid(UNUSED_ATTR tSMP_CB *p_cb)
{
return false;
}
/*******************************************************************************
-**
-** Function smp_reject_unexpected_pairing_command
-**
-** Description send pairing failure to an unexpected pairing command during
-** an active pairing process.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_reject_unexpected_pairing_command
+ *
+ * Description send pairing failure to an unexpected pairing command during
+ * an active pairing process.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_reject_unexpected_pairing_command(BD_ADDR bd_addr)
{
uint8_t *p;
@@ -1149,21 +1149,21 @@
}
/*******************************************************************************
-** Function smp_select_association_model
-**
-** Description This function selects association model to use for STK
-** generation. Selection is based on both sides' io capability,
-** oob data flag and authentication request.
-**
-** Note If Secure Connections Only mode is required locally then we
-** come to this point only if both sides support Secure Connections
-** mode, i.e. if p_cb->secure_connections_only_mode_required = true then we come
-** to this point only if
-** (p_cb->peer_auth_req & SMP_SC_SUPPORT_BIT) ==
-** (p_cb->loc_auth_req & SMP_SC_SUPPORT_BIT) ==
-** SMP_SC_SUPPORT_BIT
-**
-*******************************************************************************/
+ * Function smp_select_association_model
+ *
+ * Description This function selects association model to use for STK
+ * generation. Selection is based on both sides' io capability,
+ * oob data flag and authentication request.
+ *
+ * Note If Secure Connections Only mode is required locally then we
+ * come to this point only if both sides support Secure Connections
+ * mode, i.e. if p_cb->secure_connections_only_mode_required = true then we come
+ * to this point only if
+ * (p_cb->peer_auth_req & SMP_SC_SUPPORT_BIT) ==
+ * (p_cb->loc_auth_req & SMP_SC_SUPPORT_BIT) ==
+ * SMP_SC_SUPPORT_BIT
+ *
+ ******************************************************************************/
tSMP_ASSO_MODEL smp_select_association_model(tSMP_CB *p_cb)
{
tSMP_ASSO_MODEL model = SMP_MODEL_OUT_OF_RANGE;
@@ -1199,12 +1199,12 @@
}
/*******************************************************************************
-** Function smp_select_legacy_association_model
-**
-** Description This function is called to select association mode if at least
-** one side doesn't support secure connections.
-**
-*******************************************************************************/
+ * Function smp_select_legacy_association_model
+ *
+ * Description This function is called to select association mode if at least
+ * one side doesn't support secure connections.
+ *
+ ******************************************************************************/
tSMP_ASSO_MODEL smp_select_legacy_association_model(tSMP_CB *p_cb)
{
tSMP_ASSO_MODEL model = SMP_MODEL_OUT_OF_RANGE;
@@ -1237,12 +1237,12 @@
}
/*******************************************************************************
-** Function smp_select_association_model_secure_connections
-**
-** Description This function is called to select association mode if both
-** sides support secure connections.
-**
-*******************************************************************************/
+ * Function smp_select_association_model_secure_connections
+ *
+ * Description This function is called to select association mode if both
+ * sides support secure connections.
+ *
+ ******************************************************************************/
tSMP_ASSO_MODEL smp_select_association_model_secure_connections(tSMP_CB *p_cb)
{
tSMP_ASSO_MODEL model = SMP_MODEL_OUT_OF_RANGE;
@@ -1275,11 +1275,11 @@
}
/*******************************************************************************
-** Function smp_reverse_array
-**
-** Description This function reverses array bytes
-**
-*******************************************************************************/
+ * Function smp_reverse_array
+ *
+ * Description This function reverses array bytes
+ *
+ ******************************************************************************/
void smp_reverse_array(uint8_t *arr, uint8_t len)
{
uint8_t i =0, tmp;
@@ -1295,16 +1295,16 @@
}
/*******************************************************************************
-** Function smp_calculate_random_input
-**
-** Description This function returns random input value to be used in commitment
-** calculation for SC passkey entry association mode
-** (if bit["round"] in "random" array == 1 then returns 0x81
-** else returns 0x80).
-**
-** Returns ri value
-**
-*******************************************************************************/
+ * Function smp_calculate_random_input
+ *
+ * Description This function returns random input value to be used in commitment
+ * calculation for SC passkey entry association mode
+ * (if bit["round"] in "random" array == 1 then returns 0x81
+ * else returns 0x80).
+ *
+ * Returns ri value
+ *
+ ******************************************************************************/
uint8_t smp_calculate_random_input(uint8_t *random, uint8_t round)
{
uint8_t i = round/8;
@@ -1318,14 +1318,14 @@
}
/*******************************************************************************
-** Function smp_collect_local_io_capabilities
-**
-** Description This function puts into IOcap array local device
-** IOCapability, OOB data, AuthReq.
-**
-** Returns void
-**
-*******************************************************************************/
+ * Function smp_collect_local_io_capabilities
+ *
+ * Description This function puts into IOcap array local device
+ * IOCapability, OOB data, AuthReq.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_collect_local_io_capabilities(uint8_t *iocap, tSMP_CB *p_cb)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1336,14 +1336,14 @@
}
/*******************************************************************************
-** Function smp_collect_peer_io_capabilities
-**
-** Description This function puts into IOcap array peer device
-** IOCapability, OOB data, AuthReq.
-**
-** Returns void
-**
-*******************************************************************************/
+ * Function smp_collect_peer_io_capabilities
+ *
+ * Description This function puts into IOcap array peer device
+ * IOCapability, OOB data, AuthReq.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_collect_peer_io_capabilities(uint8_t *iocap, tSMP_CB *p_cb)
{
SMP_TRACE_DEBUG("%s", __func__);
@@ -1354,15 +1354,15 @@
}
/*******************************************************************************
-** Function smp_collect_local_ble_address
-**
-** Description This function puts into le_addr array local device le address:
-** le_addr[0-5] = local BD ADDR,
-** le_addr[6] = local le address type (PUBLIC/RANDOM).
-**
-** Returns void
-**
-*******************************************************************************/
+ * Function smp_collect_local_ble_address
+ *
+ * Description This function puts into le_addr array local device le address:
+ * le_addr[0-5] = local BD ADDR,
+ * le_addr[6] = local le address type (PUBLIC/RANDOM).
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_collect_local_ble_address(uint8_t *le_addr, tSMP_CB *p_cb)
{
tBLE_ADDR_TYPE addr_type = 0;
@@ -1377,15 +1377,15 @@
}
/*******************************************************************************
-** Function smp_collect_peer_ble_address
-**
-** Description This function puts into le_addr array peer device le address:
-** le_addr[0-5] = peer BD ADDR,
-** le_addr[6] = peer le address type (PUBLIC/RANDOM).
-**
-** Returns void
-**
-*******************************************************************************/
+ * Function smp_collect_peer_ble_address
+ *
+ * Description This function puts into le_addr array peer device le address:
+ * le_addr[0-5] = peer BD ADDR,
+ * le_addr[6] = peer le address type (PUBLIC/RANDOM).
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_collect_peer_ble_address(uint8_t *le_addr, tSMP_CB *p_cb)
{
tBLE_ADDR_TYPE addr_type = 0;
@@ -1405,16 +1405,16 @@
}
/*******************************************************************************
-** Function smp_check_commitment
-**
-** Description This function compares peer commitment values:
-** - expected (i.e. calculated locally),
-** - received from the peer.
-**
-** Returns true if the values are the same
-** false otherwise
-**
-*******************************************************************************/
+ * Function smp_check_commitment
+ *
+ * Description This function compares peer commitment values:
+ * - expected (i.e. calculated locally),
+ * - received from the peer.
+ *
+ * Returns true if the values are the same
+ * false otherwise
+ *
+ ******************************************************************************/
bool smp_check_commitment(tSMP_CB *p_cb)
{
BT_OCTET16 expected;
@@ -1436,15 +1436,15 @@
}
/*******************************************************************************
-**
-** Function smp_save_secure_connections_long_term_key
-**
-** Description The function saves SC LTK as BLE key for future use as local
-** and/or peer key.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function smp_save_secure_connections_long_term_key
+ *
+ * Description The function saves SC LTK as BLE key for future use as local
+ * and/or peer key.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void smp_save_secure_connections_long_term_key(tSMP_CB *p_cb)
{
tBTM_LE_LENC_KEYS lle_key;
@@ -1467,17 +1467,17 @@
}
/*******************************************************************************
-**
-** Function smp_calculate_f5_mackey_and_long_term_key
-**
-** Description The function calculates MacKey and LTK and saves them in CB.
-** To calculate MacKey and LTK it calls smp_calc_f5(...).
-** MacKey is used in dhkey calculation, LTK is used to encrypt
-** the link.
-**
-** Returns false if out of resources, true otherwise.
-**
-*******************************************************************************/
+ *
+ * Function smp_calculate_f5_mackey_and_long_term_key
+ *
+ * Description The function calculates MacKey and LTK and saves them in CB.
+ * To calculate MacKey and LTK it calls smp_calc_f5(...).
+ * MacKey is used in dhkey calculation, LTK is used to encrypt
+ * the link.
+ *
+ * Returns false if out of resources, true otherwise.
+ *
+ ******************************************************************************/
bool smp_calculate_f5_mackey_and_long_term_key(tSMP_CB *p_cb)
{
uint8_t a[7];
@@ -1513,15 +1513,15 @@
}
/*******************************************************************************
-**
-** Function smp_request_oob_data
-**
-** Description Requests application to provide OOB data.
-**
-** Returns true - OOB data has to be provided by application
-** false - otherwise (unexpected)
-**
-*******************************************************************************/
+ *
+ * Function smp_request_oob_data
+ *
+ * Description Requests application to provide OOB data.
+ *
+ * Returns true - OOB data has to be provided by application
+ * false - otherwise (unexpected)
+ *
+ ******************************************************************************/
bool smp_request_oob_data(tSMP_CB *p_cb)
{
tSMP_OOB_DATA_TYPE req_oob_type = SMP_OOB_INVALID_TYPE;
diff --git a/stack/srvc/srvc_battery.cc b/stack/srvc/srvc_battery.cc
index 7f16ae5..dd6f133 100644
--- a/stack/srvc/srvc_battery.cc
+++ b/stack/srvc/srvc_battery.cc
@@ -41,10 +41,10 @@
/*******************************************************************************
-** battery_valid_handle_range
-**
-** validate a handle to be a DIS attribute handle or not.
-*******************************************************************************/
+ * battery_valid_handle_range
+ *
+ * validate a handle to be a DIS attribute handle or not.
+ ******************************************************************************/
bool battery_valid_handle_range(uint16_t handle)
{
uint8_t i = 0;
@@ -63,10 +63,10 @@
return false;
}
/*******************************************************************************
-** battery_s_write_attr_value
-**
-** Process write DIS attribute request.
-*******************************************************************************/
+ * battery_s_write_attr_value
+ *
+ * Process write DIS attribute request.
+ ******************************************************************************/
uint8_t battery_s_write_attr_value(uint8_t clcb_idx, tGATT_WRITE_REQ * p_value,
tGATT_STATUS *p_status)
{
@@ -107,8 +107,8 @@
return act;
}
/*******************************************************************************
-** BA Attributes Database Server Request callback
-*******************************************************************************/
+ * BA Attributes Database Server Request callback
+ ******************************************************************************/
uint8_t battery_s_read_attr_value (uint8_t clcb_idx, uint16_t handle,
UNUSED_ATTR tGATT_VALUE *p_value, bool is_long,
tGATT_STATUS* p_status)
@@ -156,28 +156,28 @@
/*******************************************************************************
-**
-** Function battery_gatt_c_read_ba_req
-**
-** Description Read remote device BA level attribute request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function battery_gatt_c_read_ba_req
+ *
+ * Description Read remote device BA level attribute request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool battery_gatt_c_read_ba_req(UNUSED_ATTR uint16_t conn_id)
{
return true;
}
/*******************************************************************************
-**
-** Function battery_c_cmpl_cback
-**
-** Description Client operation complete callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function battery_c_cmpl_cback
+ *
+ * Description Client operation complete callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void battery_c_cmpl_cback (UNUSED_ATTR tSRVC_CLCB *p_clcb, UNUSED_ATTR tGATTC_OPTYPE op,
UNUSED_ATTR tGATT_STATUS status,
UNUSED_ATTR tGATT_CL_COMPLETE *p_data)
@@ -186,12 +186,12 @@
/*******************************************************************************
-**
-** Function Battery_Instantiate
-**
-** Description Instantiate a Battery service
-**
-*******************************************************************************/
+ *
+ * Function Battery_Instantiate
+ *
+ * Description Instantiate a Battery service
+ *
+ ******************************************************************************/
uint16_t Battery_Instantiate (uint8_t app_id, tBA_REG_INFO *p_reg_info)
{
uint16_t srvc_hdl = 0;
@@ -288,12 +288,12 @@
return srvc_hdl;
}
/*******************************************************************************
-**
-** Function Battery_Rsp
-**
-** Description Respond to a battery service request
-**
-*******************************************************************************/
+ *
+ * Function Battery_Rsp
+ *
+ * Description Respond to a battery service request
+ *
+ ******************************************************************************/
void Battery_Rsp (uint8_t app_id, tGATT_STATUS st, uint8_t event, tBA_RSP_DATA *p_rsp)
{
tBA_INST *p_inst = &battery_cb.battery_inst[0];
@@ -356,12 +356,12 @@
return;
}
/*******************************************************************************
-**
-** Function Battery_Notify
-**
-** Description Send battery level notification
-**
-*******************************************************************************/
+ *
+ * Function Battery_Notify
+ *
+ * Description Send battery level notification
+ *
+ ******************************************************************************/
void Battery_Notify (uint8_t app_id, BD_ADDR remote_bda, uint8_t battery_level)
{
tBA_INST *p_inst = &battery_cb.battery_inst[0];
@@ -381,14 +381,14 @@
}
/*******************************************************************************
-**
-** Function Battery_ReadBatteryLevel
-**
-** Description Read remote device Battery Level information.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function Battery_ReadBatteryLevel
+ *
+ * Description Read remote device Battery Level information.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool Battery_ReadBatteryLevel(UNUSED_ATTR BD_ADDR peer_bda)
{
/* to be implemented */
diff --git a/stack/srvc/srvc_dis.cc b/stack/srvc/srvc_dis.cc
index df27dd3..05a9eec 100644
--- a/stack/srvc/srvc_dis.cc
+++ b/stack/srvc/srvc_dis.cc
@@ -85,10 +85,10 @@
}
/*******************************************************************************
-** dis_valid_handle_range
-**
-** validate a handle to be a DIS attribute handle or not.
-*******************************************************************************/
+ * dis_valid_handle_range
+ *
+ * validate a handle to be a DIS attribute handle or not.
+ ******************************************************************************/
bool dis_valid_handle_range(uint16_t handle)
{
if (handle >= dis_cb.service_handle && handle <= dis_cb.max_handle)
@@ -97,18 +97,18 @@
return false;
}
/*******************************************************************************
-** dis_write_attr_value
-**
-** Process write DIS attribute request.
-*******************************************************************************/
+ * dis_write_attr_value
+ *
+ * Process write DIS attribute request.
+ ******************************************************************************/
uint8_t dis_write_attr_value(UNUSED_ATTR tGATT_WRITE_REQ *p_data, tGATT_STATUS *p_status)
{
*p_status = GATT_WRITE_NOT_PERMIT;
return SRVC_ACT_RSP;
}
/*******************************************************************************
-** DIS Attributes Database Server Request callback
-*******************************************************************************/
+ * DIS Attributes Database Server Request callback
+ ******************************************************************************/
uint8_t dis_read_attr_value (UNUSED_ATTR uint8_t clcb_idx, uint16_t handle,
tGATT_VALUE *p_value,
bool is_long, tGATT_STATUS *p_status)
@@ -187,14 +187,14 @@
}
/*******************************************************************************
-**
-** Function dis_gatt_c_read_dis_value_cmpl
-**
-** Description Client read DIS database complete callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function dis_gatt_c_read_dis_value_cmpl
+ *
+ * Description Client read DIS database complete callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void dis_gatt_c_read_dis_value_cmpl(uint16_t conn_id)
{
tSRVC_CLCB *p_clcb = srvc_eng_find_clcb_by_conn_id(conn_id);
@@ -214,14 +214,14 @@
}
/*******************************************************************************
-**
-** Function dis_gatt_c_read_dis_req
-**
-** Description Read remote device DIS attribute request.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function dis_gatt_c_read_dis_req
+ *
+ * Description Read remote device DIS attribute request.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool dis_gatt_c_read_dis_req(uint16_t conn_id)
{
tGATT_READ_PARAM param;
@@ -255,14 +255,14 @@
}
/*******************************************************************************
-**
-** Function dis_c_cmpl_cback
-**
-** Description Client operation complete callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function dis_c_cmpl_cback
+ *
+ * Description Client operation complete callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void dis_c_cmpl_cback (tSRVC_CLCB *p_clcb, tGATTC_OPTYPE op,
tGATT_STATUS status, tGATT_CL_COMPLETE *p_data)
{
@@ -332,12 +332,12 @@
}
/*******************************************************************************
-**
-** Function DIS_SrInit
-**
-** Description Initialize the Device Information Service Server.
-**
-*******************************************************************************/
+ *
+ * Function DIS_SrInit
+ *
+ * Description Initialize the Device Information Service Server.
+ *
+ ******************************************************************************/
tDIS_STATUS DIS_SrInit (tDIS_ATTR_MASK dis_attr_mask)
{
tGATT_STATUS status;
@@ -391,12 +391,12 @@
return (tDIS_STATUS) status;
}
/*******************************************************************************
-**
-** Function DIS_SrUpdate
-**
-** Description Update the DIS server attribute values
-**
-*******************************************************************************/
+ *
+ * Function DIS_SrUpdate
+ *
+ * Description Update the DIS server attribute values
+ *
+ ******************************************************************************/
tDIS_STATUS DIS_SrUpdate(tDIS_ATTR_BIT dis_attr_bit, tDIS_ATTR *p_info)
{
uint8_t i = 1;
@@ -439,14 +439,14 @@
return st;
}
/*******************************************************************************
-**
-** Function DIS_ReadDISInfo
-**
-** Description Read remote device DIS information.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function DIS_ReadDISInfo
+ *
+ * Description Read remote device DIS information.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool DIS_ReadDISInfo(BD_ADDR peer_bda, tDIS_READ_CBACK *p_cback, tDIS_ATTR_MASK mask)
{
uint16_t conn_id;
diff --git a/stack/srvc/srvc_eng.cc b/stack/srvc/srvc_eng.cc
index a9c27e5..0111a90 100644
--- a/stack/srvc/srvc_eng.cc
+++ b/stack/srvc/srvc_eng.cc
@@ -54,14 +54,14 @@
tSRVC_ENG_CB srvc_eng_cb;
/*******************************************************************************
-**
-** Function srvc_eng_find_conn_id_by_bd_addr
-**
-** Description The function searches all LCB with macthing bd address
-**
-** Returns total number of clcb found.
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_find_conn_id_by_bd_addr
+ *
+ * Description The function searches all LCB with macthing bd address
+ *
+ * Returns total number of clcb found.
+ *
+ ******************************************************************************/
uint16_t srvc_eng_find_conn_id_by_bd_addr(BD_ADDR bda)
{
uint8_t i_clcb;
@@ -79,14 +79,14 @@
}
/*******************************************************************************
-**
-** Function srvc_eng_find_clcb_by_bd_addr
-**
-** Description The function searches all LCBs with macthing bd address.
-**
-** Returns Pointer to the found link conenction control block.
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_find_clcb_by_bd_addr
+ *
+ * Description The function searches all LCBs with macthing bd address.
+ *
+ * Returns Pointer to the found link conenction control block.
+ *
+ ******************************************************************************/
tSRVC_CLCB *srvc_eng_find_clcb_by_bd_addr(BD_ADDR bda)
{
uint8_t i_clcb;
@@ -103,14 +103,14 @@
return NULL;
}
/*******************************************************************************
-**
-** Function srvc_eng_find_clcb_by_conn_id
-**
-** Description The function searches all LCBs with macthing connection ID.
-**
-** Returns Pointer to the found link conenction control block.
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_find_clcb_by_conn_id
+ *
+ * Description The function searches all LCBs with macthing connection ID.
+ *
+ * Returns Pointer to the found link conenction control block.
+ *
+ ******************************************************************************/
tSRVC_CLCB *srvc_eng_find_clcb_by_conn_id(uint16_t conn_id)
{
uint8_t i_clcb;
@@ -127,14 +127,14 @@
return NULL;
}
/*******************************************************************************
-**
-** Function srvc_eng_find_clcb_by_conn_id
-**
-** Description The function searches all LCBs with macthing connection ID.
-**
-** Returns Pointer to the found link conenction control block.
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_find_clcb_by_conn_id
+ *
+ * Description The function searches all LCBs with macthing connection ID.
+ *
+ * Returns Pointer to the found link conenction control block.
+ *
+ ******************************************************************************/
uint8_t srvc_eng_find_clcb_idx_by_conn_id(uint16_t conn_id)
{
uint8_t i_clcb;
@@ -151,14 +151,14 @@
return SRVC_MAX_APPS;
}
/*******************************************************************************
-**
-** Function srvc_eng_clcb_alloc
-**
-** Description The function allocates a GATT profile connection link control block
-**
-** Returns NULL if not found. Otherwise pointer to the connection link block.
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_clcb_alloc
+ *
+ * Description The function allocates a GATT profile connection link control block
+ *
+ * Returns NULL if not found. Otherwise pointer to the connection link block.
+ *
+ ******************************************************************************/
tSRVC_CLCB *srvc_eng_clcb_alloc (uint16_t conn_id, BD_ADDR bda)
{
uint8_t i_clcb = 0;
@@ -178,14 +178,14 @@
return p_clcb;
}
/*******************************************************************************
-**
-** Function srvc_eng_clcb_dealloc
-**
-** Description The function deallocates a GATT profile connection link control block
-**
-** Returns True the deallocation is successful
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_clcb_dealloc
+ *
+ * Description The function deallocates a GATT profile connection link control block
+ *
+ * Returns True the deallocation is successful
+ *
+ ******************************************************************************/
bool srvc_eng_clcb_dealloc (uint16_t conn_id)
{
uint8_t i_clcb = 0;
@@ -206,8 +206,8 @@
return false;
}
/*******************************************************************************
-** Service Engine Server Attributes Database Read/Read Blob Request process
-*******************************************************************************/
+ * Service Engine Server Attributes Database Read/Read Blob Request process
+ ******************************************************************************/
uint8_t srvc_eng_process_read_req (uint8_t clcb_idx, tGATT_READ_REQ *p_data, tGATTS_RSP *p_rsp, tGATT_STATUS *p_status)
{
tGATT_STATUS status = GATT_NOT_FOUND;
@@ -229,8 +229,8 @@
return act;
}
/*******************************************************************************
-** Service Engine Server Attributes Database write Request process
-*******************************************************************************/
+ * Service Engine Server Attributes Database write Request process
+ ******************************************************************************/
uint8_t srvc_eng_process_write_req (uint8_t clcb_idx, tGATT_WRITE_REQ *p_data,
UNUSED_ATTR tGATTS_RSP *p_rsp, tGATT_STATUS *p_status)
{
@@ -251,14 +251,14 @@
}
/*******************************************************************************
-**
-** Function srvc_eng_s_request_cback
-**
-** Description GATT DIS attribute access request callback.
-**
-** Returns void.
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_s_request_cback
+ *
+ * Description GATT DIS attribute access request callback.
+ *
+ * Returns void.
+ *
+ ******************************************************************************/
static void srvc_eng_s_request_cback (uint16_t conn_id, uint32_t trans_id, tGATTS_REQ_TYPE type,
tGATTS_DATA *p_data)
{
@@ -310,14 +310,14 @@
/*******************************************************************************
-**
-** Function srvc_eng_c_cmpl_cback
-**
-** Description Client operation complete callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_c_cmpl_cback
+ *
+ * Description Client operation complete callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void srvc_eng_c_cmpl_cback (uint16_t conn_id, tGATTC_OPTYPE op, tGATT_STATUS status,
tGATT_CL_COMPLETE *p_data)
{
@@ -338,14 +338,14 @@
/*******************************************************************************
-**
-** Function srvc_eng_connect_cback
-**
-** Description Gatt profile connection callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_connect_cback
+ *
+ * Description Gatt profile connection callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void srvc_eng_connect_cback (UNUSED_ATTR tGATT_IF gatt_if, BD_ADDR bda,
uint16_t conn_id,
bool connected, tGATT_DISCONN_REASON reason,
@@ -370,14 +370,14 @@
}
/*******************************************************************************
-**
-** Function srvc_eng_c_cmpl_cback
-**
-** Description Client operation complete callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_c_cmpl_cback
+ *
+ * Description Client operation complete callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool srvc_eng_request_channel (BD_ADDR remote_bda, uint8_t srvc_id )
{
bool set = true;
@@ -394,14 +394,14 @@
return set;
}
/*******************************************************************************
-**
-** Function srvc_eng_release_channel
-**
-** Description Client operation complete callback.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_release_channel
+ *
+ * Description Client operation complete callback.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void srvc_eng_release_channel (uint16_t conn_id)
{
tSRVC_CLCB *p_clcb = srvc_eng_find_clcb_by_conn_id(conn_id);
@@ -418,12 +418,12 @@
GATT_Disconnect(p_clcb->conn_id);
}
/*******************************************************************************
-**
-** Function srvc_eng_init
-**
-** Description Initializa the GATT Service engine.
-**
-*******************************************************************************/
+ *
+ * Function srvc_eng_init
+ *
+ * Description Initializa the GATT Service engine.
+ *
+ ******************************************************************************/
tGATT_STATUS srvc_eng_init (void)
{
tBT_UUID app_uuid = {LEN_UUID_16, {UUID_SERVCLASS_DEVICE_INFO}};
diff --git a/udrv/include/uipc.h b/udrv/include/uipc.h
index 766477b..e98f90d 100644
--- a/udrv/include/uipc.h
+++ b/udrv/include/uipc.h
@@ -55,69 +55,69 @@
const char* dump_uipc_event(tUIPC_EVENT event);
/*******************************************************************************
-**
-** Function UIPC_Init
-**
-** Description Initialize UIPC module
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function UIPC_Init
+ *
+ * Description Initialize UIPC module
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void UIPC_Init(void *);
/*******************************************************************************
-**
-** Function UIPC_Open
-**
-** Description Open UIPC interface
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function UIPC_Open
+ *
+ * Description Open UIPC interface
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool UIPC_Open(tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK *p_cback);
/*******************************************************************************
-**
-** Function UIPC_Close
-**
-** Description Close UIPC interface
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function UIPC_Close
+ *
+ * Description Close UIPC interface
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void UIPC_Close(tUIPC_CH_ID ch_id);
/*******************************************************************************
-**
-** Function UIPC_Send
-**
-** Description Called to transmit a message over UIPC.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function UIPC_Send
+ *
+ * Description Called to transmit a message over UIPC.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool UIPC_Send(tUIPC_CH_ID ch_id, uint16_t msg_evt, uint8_t *p_buf, uint16_t msglen);
/*******************************************************************************
-**
-** Function UIPC_Read
-**
-** Description Called to read a message from UIPC.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function UIPC_Read
+ *
+ * Description Called to read a message from UIPC.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
uint32_t UIPC_Read(tUIPC_CH_ID ch_id, uint16_t *p_msg_evt, uint8_t *p_buf, uint32_t len);
/*******************************************************************************
-**
-** Function UIPC_Ioctl
-**
-** Description Called to control UIPC.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function UIPC_Ioctl
+ *
+ * Description Called to control UIPC.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
bool UIPC_Ioctl(tUIPC_CH_ID ch_id, uint32_t request, void *param);
#ifdef __cplusplus
diff --git a/udrv/ulinux/uipc.cc b/udrv/ulinux/uipc.cc
index 898d839..270e33a 100644
--- a/udrv/ulinux/uipc.cc
+++ b/udrv/ulinux/uipc.cc
@@ -49,8 +49,8 @@
#include "uipc.h"
/*****************************************************************************
-** Constants & Macros
-******************************************************************************/
+ * Constants & Macros
+ *****************************************************************************/
#define PCM_FILENAME "/data/test.pcm"
@@ -68,8 +68,8 @@
#define UIPC_FLUSH_BUFFER_SIZE 1024
/*****************************************************************************
-** Local type definitions
-******************************************************************************/
+ * Local type definitions
+ *****************************************************************************/
typedef enum {
UIPC_TASK_FLAG_DISCONNECT_CHAN = 0x1,
@@ -101,26 +101,26 @@
/*****************************************************************************
-** Static variables
-******************************************************************************/
+ * Static variables
+ *****************************************************************************/
static tUIPC_MAIN uipc_main;
/*****************************************************************************
-** Static functions
-******************************************************************************/
+ * Static functions
+ *****************************************************************************/
static int uipc_close_ch_locked(tUIPC_CH_ID ch_id);
/*****************************************************************************
-** Externs
-******************************************************************************/
+ * Externs
+ *****************************************************************************/
/*****************************************************************************
-** Helper functions
-******************************************************************************/
+ * Helper functions
+ *****************************************************************************/
const char* dump_uipc_event(tUIPC_EVENT event)
@@ -138,8 +138,8 @@
}
/*****************************************************************************
-** socket helper functions
-*****************************************************************************/
+ * socket helper functions
+ ****************************************************************************/
static inline int create_server_socket(const char* name)
{
@@ -215,10 +215,10 @@
}
/*****************************************************************************
-**
-** uipc helper functions
-**
-*****************************************************************************/
+ *
+ * uipc helper functions
+ *
+ ****************************************************************************/
static int uipc_main_init(void)
{
@@ -601,7 +601,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void UIPC_Init(UNUSED_ATTR void *p_data)
{
@@ -622,7 +622,7 @@
**
** Returns true in case of success, false in case of failure.
**
- *******************************************************************************/
+ ******************************************************************************/
bool UIPC_Open(tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK *p_cback)
{
BTIF_TRACE_DEBUG("UIPC_Open : ch_id %d, p_cback %x", ch_id, p_cback);
@@ -666,7 +666,7 @@
**
** Returns void
**
- *******************************************************************************/
+ ******************************************************************************/
void UIPC_Close(tUIPC_CH_ID ch_id)
{
@@ -695,7 +695,7 @@
**
** Returns true in case of success, false in case of failure.
**
- *******************************************************************************/
+ ******************************************************************************/
bool UIPC_Send(tUIPC_CH_ID ch_id,
UNUSED_ATTR uint16_t msg_evt, uint8_t *p_buf,
uint16_t msglen)
@@ -723,7 +723,7 @@
**
** Returns return the number of bytes read.
**
- *******************************************************************************/
+ ******************************************************************************/
uint32_t UIPC_Read(tUIPC_CH_ID ch_id,
UNUSED_ATTR uint16_t *p_msg_evt, uint8_t *p_buf,
@@ -809,14 +809,14 @@
}
/*******************************************************************************
-**
-** Function UIPC_Ioctl
-**
-** Description Called to control UIPC.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function UIPC_Ioctl
+ *
+ * Description Called to control UIPC.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
extern bool UIPC_Ioctl(tUIPC_CH_ID ch_id, uint32_t request, void *param)
{
diff --git a/utils/include/bt_utils.h b/utils/include/bt_utils.h
index fb0ff7c..4264a4b 100644
--- a/utils/include/bt_utils.h
+++ b/utils/include/bt_utils.h
@@ -26,8 +26,8 @@
static const char BT_UTILS_MODULE[] = "bt_utils_module";
/*******************************************************************************
-** Type definitions
-********************************************************************************/
+ * Type definitions
+ ******************************************************************************/
typedef enum {
TASK_HIGH_MEDIA = 0,
@@ -36,8 +36,8 @@
} tHIGH_PRIORITY_TASK;
/*******************************************************************************
-** Functions
-********************************************************************************/
+ * Functions
+ ******************************************************************************/
void raise_priority_a2dp(tHIGH_PRIORITY_TASK high_task);
void adjust_priority_a2dp(int start);
diff --git a/utils/src/bt_utils.cc b/utils/src/bt_utils.cc
index a524edf..ba6c489 100644
--- a/utils/src/bt_utils.cc
+++ b/utils/src/bt_utils.cc
@@ -16,14 +16,14 @@
*
******************************************************************************/
-/************************************************************************************
+/*******************************************************************************
*
* Filename: bt_utils.cc
*
* Description: Miscellaneous helper functions
*
*
- ***********************************************************************************/
+ ******************************************************************************/
#define LOG_TAG "bt_utils"
@@ -51,8 +51,8 @@
#include "osi/include/properties.h"
/*******************************************************************************
-** Type definitions for callback functions
-********************************************************************************/
+ * Type definitions for callback functions
+ ******************************************************************************/
static pthread_once_t g_DoSchedulingGroupOnce[TASK_HIGH_MAX];
static bool g_DoSchedulingGroup[TASK_HIGH_MAX];
static pthread_mutex_t gIdxLock;
@@ -92,14 +92,14 @@
};
/*****************************************************************************
-**
-** Function check_do_scheduling_group
-**
-** Description check if it is ok to change schedule group
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function check_do_scheduling_group
+ *
+ * Description check if it is ok to change schedule group
+ *
+ * Returns void
+ *
+ ******************************************************************************/
static void check_do_scheduling_group(void) {
char buf[PROPERTY_VALUE_MAX];
int len = osi_property_get("debug.sys.noschedgroups", buf, "");
@@ -112,14 +112,14 @@
}
/*****************************************************************************
-**
-** Function raise_priority_a2dp
-**
-** Description Raise task priority for A2DP streaming
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function raise_priority_a2dp
+ *
+ * Description Raise task priority for A2DP streaming
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void raise_priority_a2dp(tHIGH_PRIORITY_TASK high_task) {
int rc = 0;
int tid = gettid();
@@ -159,16 +159,16 @@
}
/*****************************************************************************
-**
-** Function adjust_priority_a2dp
-**
-** Description increase the a2dp consumer task priority temporarily when start
-** audio playing, to avoid overflow the audio packet queue, restore
-** the a2dp consumer task priority when stop audio playing.
-**
-** Returns void
-**
-*******************************************************************************/
+ *
+ * Function adjust_priority_a2dp
+ *
+ * Description increase the a2dp consumer task priority temporarily when start
+ * audio playing, to avoid overflow the audio packet queue, restore
+ * the a2dp consumer task priority when stop audio playing.
+ *
+ * Returns void
+ *
+ ******************************************************************************/
void adjust_priority_a2dp(int start) {
int priority = start ? ANDROID_PRIORITY_URGENT_AUDIO : ANDROID_PRIORITY_AUDIO;
int tid;
diff --git a/vnd/ble/vendor_hcidefs.h b/vnd/ble/vendor_hcidefs.h
index b5e770b..b1fae40 100644
--- a/vnd/ble/vendor_hcidefs.h
+++ b/vnd/ble/vendor_hcidefs.h
@@ -17,20 +17,20 @@
******************************************************************************/
/*****************************************************************************
-**
-** Name vendor_hcidefs.h
-**
-** Function This file contains Broadcom Specific Host Controller Interface
-** definitions.
-**
-******************************************************************************/
+ *
+ * Name vendor_hcidefs.h
+ *
+ * Function This file contains Broadcom Specific Host Controller Interface
+ * definitions.
+ *
+ *****************************************************************************/
#ifndef VENDOR_HCIDEFS_H
#define VENDOR_HCIDEFS_H
/*****************************************************************************
-** Private address resolution VSC
-******************************************************************************/
+ * Private address resolution VSC
+ *****************************************************************************/
/* VSC */
#define HCI_VENDOR_BLE_RPA_VSC (0x0155 | HCI_GRP_VENDOR_SPECIFIC)
@@ -44,8 +44,8 @@
/*****************************************************************************
-** Advertising data payload filter VSC
-******************************************************************************/
+ * Advertising data payload filter VSC
+ *****************************************************************************/
/* VSC */
#define HCI_VENDOR_BLE_PCF_VSC (0x0157 | HCI_GRP_VENDOR_SPECIFIC)
diff --git a/vnd/include/vendor_api.h b/vnd/include/vendor_api.h
index 102eafe..5c1ab16 100644
--- a/vnd/include/vendor_api.h
+++ b/vnd/include/vendor_api.h
@@ -1,13 +1,13 @@
/****************************************************************************
-**
-** Name: vendor_api.h
-**
-** Description: Vendor specific BTE API function external definitions.
-**
-** Copyright (c) 2009-2011, BROADCOM Inc., All Rights Reserved.
-** Broadcom Bluetooth Core. Proprietary and confidential.
-**
-******************************************************************************/
+ *
+ * Name: vendor_api.h
+ *
+ * Description: Vendor specific BTE API function external definitions.
+ *
+ * Copyright (c) 2009-2011, BROADCOM Inc., All Rights Reserved.
+ * Broadcom Bluetooth Core. Proprietary and confidential.
+ *
+ *****************************************************************************/
#ifndef VENDOR_API_H
#define VENDOR_API_H
@@ -19,8 +19,8 @@
#endif
/****************************************************************************
-** Resolvable private address offload VSC specific definitions
-******************************************************************************/
+ * Resolvable private address offload VSC specific definitions
+ *****************************************************************************/
enum
{
@@ -30,13 +30,13 @@
/****************************************************************************
-** Advertising packet filter VSC specific definitions
-******************************************************************************/
+ * Advertising packet filter VSC specific definitions
+ *****************************************************************************/
/*****************************************************************************
-** VENDOR SPECIFIC BLE FEATURE FUNCTIONS
-******************************************************************************/
+ * VENDOR SPECIFIC BLE FEATURE FUNCTIONS
+ *****************************************************************************/
#if (BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE)
#endif