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

📄 error.c

📁 蓝牙HANDFREE软件源代码
💻 C
字号:
#include "handsfree_private.h"
#include "handsfree.h"

#include <message.h>
#include <print.h>
#include <stdlib.h>



/*
    hfErrorInd

    Indication that an error has occurred. Look at the reson code to
    find out exactly what the error is.
*/
void hfErrorInd(const HS_ERROR_IND_T *ind)
{
    /* Add code to handle different error types here */
    switch(ind->reason)
    {
        case CmErrorConnectRequestWhenNotIdle:
            handleErrorInd(HfErrorConnectRequestWhenNotIdle); 
            break;
          
        case CmErrorPairRequestWhenNotIdle:
            handleErrorInd(HfErrorPairRequestWhenNotIdle);
            break;

        case CmErrorCancelWhenIdle:
            handleErrorInd(HfErrorCancelWhenIdle);
            break;

        case CmErrorDataRequestWhenNotConnected:
            handleErrorInd(HfErrorDataRequestWhenNotConnected);
            break;

        case CmErrorInquiryRequestWhenNotIdle:
            handleErrorInd(HfErrorInquiryRequestWhenNotIdle);
            break;

        case CmErrorScoRequestWhenScoConnected:
            handleErrorInd(HfErrorScoRequestWhenSCOConnected);
            break;

        case CmErrorDisconnectRequestWhenNotConnected:
            handleErrorInd(HfErrorDisconnectRequestWhenNotConnected);
            break;

        case CmErrorSmDeviceDatabaseError:
            handleErrorInd(HfErrorSmDeviceDatabaseError);
            break;

        case CmWarnLocalSniffNotEnabled:
            handleErrorInd(HfWarnLocalSniffNotEnabled);
            break;

        case CmWarnLocalParkNotEnabled:
            handleErrorInd(HfWarnLocalParkNotEnabled);
            break;

        case CmWarnLocalLowPwrModeNotEnabled:
            handleErrorInd(HfWarnLocalLowPwrModeNotEnabled);
            break;

        case CmWarnRemDevDoesNotSupportSniffMode:
            handleErrorInd(HfWarnRemDevDoesNotSupportSniffMode);
            break;

        case CmWarnRemDevDoesNotSupportParkMode:
            handleErrorInd(HfWarnRemDevDoesNotSupportParkMode);
            break;

        case CmWarnRemoteLowPwrModeNotEnabled:
            handleErrorInd(HfWarnRemoteLowPwrModeNotEnabled);
            break;

        default:
            PRINT(("Unknown error type 0x%x\n", ind->reason));
    }
}

⌨️ 快捷键说明

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