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

📄 av_headset_init.c

📁 csr 蓝牙芯片 无线蓝牙耳机的嵌入式程序
💻 C
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004

FILE NAME
    av_headset_init.c        

DESCRIPTION

NOTES

*/


/****************************************************************************
    Header files
*/
#include "av_headset_private.h"
#include "av_headset_init.h"
#include "av_headset_sep.h"

#include <a2dp.h>


/*************************************************************************
NAME    
     avHeadsetHandleA2dpInitCfm
    
DESCRIPTION
     This function is called on receipt of an A2DP_INIT_CFM message

RETURNS
     
*/
void avHeadsetHandleA2dpInitCfm(avTaskData* theAvApp, 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 (!theAvApp->a2dp)
        {
            theAvApp->a2dp = cfm->a2dp;
                        
#ifdef INCLUDE_MP3_DECODING
			/* Register Stream Endpoint - MP3 */
            avHeadsetRegisterSep(theAvApp, a2dp_mpeg_audio);
#endif
			/* Register Stream Endpoint - SBC */
			avHeadsetRegisterSep(theAvApp, 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(avTaskData* theAvApp, 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 (!theAvApp->avrcp)
        {
            theAvApp->avrcp = cfm->avrcp;
            
            /* Initialise avrcp app variables */
            theAvApp->avrcp_pending = FALSE;
            theAvApp->avrcp_state_paused = FALSE;
            theAvApp->avrcp_sink = 0;
                    
            /* Change to Ready state */
            avHeadsetSetAvrcpState(avHeadsetAvrcpReady);
        }
    }
    else
    {
        DEBUG(("AVRCP Init failed\n"));
    }
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -