COMM-DRV/Lib: ModemAnswerMode() Puts modem in answer mode

Description-

Puts the modem in auto answer mode. This command assumes the modem is in the command state. The modem remains in the command state at the end of this function.

Syntax-

stat = ModemAnswerMode(port,ring_count);

On Entry-

int port;

Port previously opened with InitializePort() or OpenComPort().

int ring_count;

Number of rings before modem answers the phone.

On Exit-

int stat;

-1 If port was not initialized.

See Also-

ModemCommandState()
ModemConnect()
ModemGetCarrierSpeed()
ModemGetConnectSpeed()
ModemHangup()
ModemInit()
ModemModifyString()

Example-

#include    "comm.h"
int port=0;
 int stat;
if ((stat = ModemAnswerMode(port,1)) == -1)
 {
 printf("Error putting modem in answer mode.\n");
/* Take remedial action */
 }