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

📄 a2dp_sd_start.c

📁 CSR蓝牙MP3播放USB DONGLE源码
💻 C
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004-2006
Part of BlueLab 3.5.2-release

FILE NAME
    a2dp_sd_start.c

DESCRIPTION 

NOTES
    
*/


/****************************************************************************
    Header files
*/
#include "a2dp_sd_private.h"
#include "a2dp_sd_start.h"


/****************************************************************************
NAME    
    a2dpSdHandleStartCfm
    
DESCRIPTION
    Handle the start cfm received from the A2DP lib.

RETURNS
    void
*/
void a2dpSdHandleStartCfm(a2dpSourceDongleTaskData *theApp, const A2DP_START_CFM_T *cfm)
{
    if (theApp->discover_pending)
    {
        /* Button press pending, close the link so we can discover a new device */
        MessageSend(&theApp->task, APP_CLOSE_REQ, 0);
    }
    else if (cfm->result == a2dp_success)
    {
        /* Start streaming audio */
        MessageSend(&theApp->task, APP_START_STREAMING_REQ, 0);
    }
    else
    {
        /* Start failed, disconnect */
        MessageSend(&theApp->task, APP_CLOSE_REQ, 0);
    }
}


/****************************************************************************
NAME    
    a2dpSdHandleStartInd
    
DESCRIPTION
    The remote end has requested we start streaming.

RETURNS
    void
*/
void a2dpSdHandleStartInd(a2dpSourceDongleTaskData *theApp)
{
	/* Cancel any suspend request messages */
	(void) MessageCancelAll(getTheAppTask(), APP_SUSPEND_STREAMING_REQ);
    /* Start streaming audio */
    MessageSend(&theApp->task, APP_START_STREAMING_REQ, 0);
}

⌨️ 快捷键说明

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