av_headset_init.c
来自「CSR蓝牙芯片 无线蓝牙耳机的语音网关程序 蓝牙耳机程序已经上传」· C语言 代码 · 共 97 行
C
97 行
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004
FILE NAME
av_headset_init.c
DESCRIPTION
NOTES
*/
/****************************************************************************
Header files
*/
#include "headset_private.h"
#include "av_headset_init.h"
#include "av_headset_sep.h"
#include "hfp_headset_init.h"
/*************************************************************************
NAME
avHeadsetHandleA2dpInitCfm
DESCRIPTION
This function is called on receipt of an A2DP_INIT_CFM message
RETURNS
*/
void avHeadsetHandleA2dpInitCfm(headsetTaskData* app, const A2DP_INIT_CFM_T* cfm)
{
if(cfm->status == a2dp_success)
{
/* A2DP Library initialisation was a success */
/* Keep a record of the A2DP instance */
if (!app->a2dp)
{
app->a2dp = cfm->a2dp;
#ifdef INCLUDE_MP3_DECODING
/* Register Stream Endpoints - MP3 */
avHeadsetRegisterSep(app, a2dp_mpeg_audio);
#endif
/* ... and SBC */
avHeadsetRegisterSep(app, a2dp_sbc);
}
}
else
{
DEBUG(("A2DP Init failed\n"));
}
}
/*************************************************************************
NAME
avHeadsetHandleAvrcpInitCfm
DESCRIPTION
This function is called on receipt of an AVRCP_INIT_CFM message
RETURNS
*/
void avHeadsetHandleAvrcpInitCfm(headsetTaskData* app, const AVRCP_INIT_CFM_T* cfm)
{
if(cfm->status == avrcp_success)
{
/* AVRCP Library initialisation was a success */
/* Keep a record of the AVRCP instance */
if (!app->avrcp)
{
app->avrcp = cfm->avrcp;
/* Initialise avrcp app variables */
app->avrcp_pending = FALSE;
app->avrcp_sink = 0;
/* Change to Ready state */
avHeadsetSetAvrcpState(avHeadsetAvrcpReady);
/* Init the HFP lib */
hfpHeadsetHfpInit();
}
}
else
{
DEBUG(("AVRCP Init failed\n"));
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?