SERIAL_Open

Gets a weak ownership of the port. Subsequent calls to this function with the same parameter will fail unless SERIAL_ClosePort() is called for the same port.

Synopsis
#include <serial.h> 
int SERIAL_Open( int port );
Parameters
port Serial port number (0 based). Specify port 0 to redirect the output to the HSM trace log
Return Code
Function Code Qualification
0 Port opened successfully.
-1 An error prevented the serial port from opening.
Comments

CAUTION!   This function in no way guarantees safe sharing of the ports. Any application can call SERIAL_Close() to get the access, or can use SERIAL functions without opening the port first.