COMM-DRV/Lib: IsPortAvailable() Determine if a particular port is in use.

Description-

Returns 0 if port was already initialized either with the OpenComPort() function.

Syntax-

stat = IsPortAvailable(port);

On Entry-

int port;

Port previously opened with OpenComPort().

On Exit-

int stat;

1 If port is available for initialization.

See Also-

InitializePort()
OpenComPort()
UnInitializePort()

Example-

#include "comm.h"
int port=0;
 int stat;
if ((stat = IsPortAvailable(port)) == 0)
    {
    printf("Port is already in use\n");
    }