voice.c
来自「蓝牙HANDFREE软件源代码」· C语言 代码 · 共 48 行
C
48 行
#include "handsfree_private.h"
#include "handsfree.h"
#include <message.h>
/*
startVoiceDialAction
Request to enable the voice dialling functionality on the AG (if supported)
*/
void startVoiceDialAction(uint16 en)
{
if (isLocalStateConnected())
{
/* Send request to enable voice dialling */
MAKE_MSG(HANDSFREE_VOICE_DIAL_ENABLE_REQ);
msg->enable = en;
putMsg(msg);
/* Reset the pending flag. */
HFstate.voiceDialPending = 0;
}
else if (en)
{
/* Only bother connecting to enable voice dialling */
/* Set pending flag */
HFstate.voiceDialPending = 1;
/* Send the connect request */
connectReqAction();
}
}
/*
hfVoiceDialEnableInd
Indication containing the current status of the voice dialling
functionality at the AG (if supported). This tells us whether
voice dialling is enabled or disabled.
*/
void hfVoiceDialEnableInd(const HANDSFREE_VOICE_DIAL_ENABLE_IND_T *ind)
{
/* Pass to the interface to deal with it */
handleVoiceDialStatusInd(ind->status);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?