AtGsmCommon/AtCommandsSrc/AtGsmVoiceCall.c

34 lines
799 B
C
Executable File

//
// Created by xemon on 25.10.22.
//
#include "AtGsmVoiceCall.h"
#include "AtCmdCommonProtected.h"
#include "SystemDelayInterface.h"
AtCommandResult AtGsmVoiceCall(tAtCmd *env, char *phoneNumber, uint8_t phoneNumberLen) {
AtCmdPrepare(env);
AtCmdTxClear(env);
AtCmdTxAddStatic(env, "ATD");
AtCmdTxAdd(env, phoneNumber, phoneNumberLen);
AtCmdTxAddChar(env, ';');
AtCmdTxSendLn(env);
return AtCmdOkErrAnswer(env, env->stdRxTimeout);
}
AtCommandResult AtGsmHangUpCall(tAtCmd *env) {
AtCmdPrepare(env);
AtCmdSendStatic(env, "ATH\r\n");
return AtCmdOkErrAnswer(env, 5 * env->stdRxTimeout);
}
AtCommandResult AtGsmAnswer(tAtCmd *env) {
AtCmdPrepare(env);
AtCmdSendStatic(env, "ATA\r\n");
return AtCmdOkErrAnswer(env, 5 * env->stdRxTimeout);
}