⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 av_headset_init.c

📁 CSR蓝牙芯片 无线蓝牙耳机的语音网关程序 蓝牙耳机程序已经上传
💻 C
字号:
/****************************************************************************
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -