?? error.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 + -