COMM-DRV/Lib: FlushTransmitBuffer() Discards the contents of the transmit buffer

Description-

Discards the contents of the Transmit buffer.

Syntax-

stat = FlushTransmitBuffer(port);

On Entry-

int port;

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

On Exit-

int stat;

-1 If port was not initialized.

See Also-

IsTransmitBufferEmpty()
TransmitBufferSize()
SpaceInTransmitBuffer()

Example-

#include “comm.h”

int port=0;
int stat;

if ((stat = FlushTransmitBuffer(port)) == -1)
{
printf(“Port not initialized\n”);

/* Take remedial action */
}