COMM-DRV/Lib: SetFlowControlThreshold() Sets high and low receive buffer thresholds

Description-

This function sets the flow control threshold. This is used for both software flow control(XON/XOFF), and hardware flow control(RTS/CTS,DTR/DSR).

Syntax-

stat = SetFlowControlThreshold(port,inbuf_low,inbuf_high);

On Entry-

int port;

Port previously opened with OpenComPort().

int inbuf_low;

When the input communication buffer reaches this value, an XON will be sent if software handshaking was enabled, DTR will be raised if DTR hardware handshake was selected, or RTS will be raised if RTS handshake was selected. This tells the remote that it may begin sending data again.

int inbuf_high;

When the input communication buffer reaches this value, an XOFF will be sent if software handshaking was enabled, DTR will be lowered if DTR hardware handshake was selected, or RTS will be lowered if RTS handshake was selected. This tells the remote to stop sending data.

On Exit-

int stat;

0 If successful.

See Also-

SetFlowControlCharacters()

Example-

#include "comm.h"
int port=0;
 int stat;
if ((stat = SetFlowControlThreshold(port,50,100)) != 0)
    {
    printf("Port not initialized\n");
   /* Take remedial action */
   }