COMM-DRV/Lib: SetFlowControlCharacters() Sets characters used for flow control

Description-

This function sets the characters that will be used for software flow control.

Syntax-

stat = SetFlowControlCharacters(port,xoff,xon,xxon,xxoff);

On Entry-

int port;

Port previously opened with OpenComPort().

int xoff;

The character that will be interpreted as an XOFF character from the remote..

int xon;

The character that will be interpreted as an XON character from the remote.

int xxoff;

The character that will be transmitted as an XOFF character to the remote.

int xxon;

The character that will be transmitted as an XON character to the remote.

On Exit-

int stat;

0 If successful.

See Also-

SetFlowControlThreshold()

Example-

#include “comm.h”

#define XOFF 10
#define XON 13

int port = 0;
int stat;
int xon = XON;
int xoff = XFOFF;
int xon = XON;
int xoff = XOFF;

if ((stat = SetFlowControlCharacters(port,xon,xoff,xxon,xxof)) != 0)
{
printf(“Port not initialized\n”);

/* Take remedial action */
}