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

📄 headset_codec_msg_handler.c

📁 bc5_stereo:bluetooth stereo Headset CODE 支持A2DP HSP 和 HSP 。可作为车载免提。BlueLab 2007环境下编译
💻 C
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004-2007

FILE NAME
    headset_codec_msg_handler.c
    
DESCRIPTION
    Handle codec library messages arriving at the app.
    
*/


#include "headset_debug.h"
#include "headset_codec_msg_handler.h"
#include "headset_init.h"
#include "headset_private.h"

#include <codec.h>
#include <panic.h>


#ifdef DEBUG_CODEC_MSG
#define CODEC_MSG_DEBUG(x) DEBUG(x)
#else
#define CODEC_MSG_DEBUG(x) 
#endif


/****************************************************************************
  FUNCTIONS
*/

/****************************************************************************/
void handleCodecMessage( Task task, MessageId id, Message message )
{
    hsTaskData * lApp = (hsTaskData *) getAppTask() ;
    
    switch (id)
    {
    case CODEC_INIT_CFM:
        CODEC_MSG_DEBUG(("CODEC_INIT_CFM\n"));
        if(((CODEC_INIT_CFM_T *)message)->status == success)
        {          
            lApp->theCodecTask = ((CODEC_INIT_CFM_T*)message)->codecTask ;
            /* Initialise the connection library */
            InitConnection();
        }
        else
            Panic();
        break;
   
    default:   
        CODEC_MSG_DEBUG(("CODEC UNHANDLED MSG: 0x%x\n",id));
        break;
    }    
}

⌨️ 快捷键说明

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