📄 dtmf.c
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -