COMM-DRV/Lib: ReceiveBufferSize() Returns the receive buffer size

Description-

Returns the receive buffer size.

Syntax-

count = ReceiveBufferSize(port);

On Entry-

int port;

Port previously opened with OpenComPort().

On Exit-

int count;

Receive buffer size.

else

-1 If port not initialized.

See Also-

BytesInReceiveBuffer()
IsReceiveBufferEmpty()
SpaceInReceiveBuffer()

Example-

#include “comm.h”

int count;
int port=0;

if ((count = ReceiveBufferSize(port)) == -1)
{
printf(“Port was not initialized\n”);

/* Take remedial action */
}
else
printf(“Number of bytes =>%d\n”,count);