1、接口函数 BT_get_rssi_cmd();
void BT_get_rssi_cmd(void)
{
struct gapc_get_info_cmd * info_cmd = KE_MSG_ALLOC(GAPC_GET_INFO_CMD, TASK_GAPC, TASK_APP,gapc_get_info_cmd);
info_cmd->operation = GAPC_GET_CON_RSSI;
//send command
ke_msg_send(info_cmd);
}
查找接口函数的具体位置: app_task.c -> BT_get_rssi_cmd(void) .
2、 RSSI值更新位置:
static int gapm_read_RSSI_req_ind_handler(ke_msg_id_t const msgid,
struct gapc_con_rssi_ind const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
app_env.rssi = param->rssi; //即为RSSI值
return (KE_MSG_CONSUMED);
}
|