dtmf.c
来自「蓝牙HANDFREE软件源代码」· C语言 代码 · 共 29 行
C
29 行
#include "handsfree_private.h"
#include "handsfree.h"
#include <ctype.h>
#include <message.h>
#include <string.h>
/*
sendDtmfReqAction
Send one of the allowed ASCII characters (0-9, #, *, A-D) for DTMF tone generation.
*/
void sendDtmfReqAction(char dtmf)
{
if (isdigit(dtmf) || dtmf=='#' || dtmf=='*' || dtmf=='A' || dtmf=='B' || dtmf=='C' || dtmf=='D')
{
/* Send the code if it is within the allowed range */
MAKE_MSG(HANDSFREE_SEND_DTMF_CODE_REQ);
msg->dtmf_code = dtmf;
putMsg(msg);
}
else
{
/* Send an error to the interface */
handleErrorInd(HfErrorInvalidDtmfCode);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?