SERIAL_Open
Gets a weak ownership of the port. Subsequent calls to this function with the same parameter will fail unless SERIAL_Close() is called for the same port.
Synopsis
int SERIAL_Open( int port );
Parameters
Parameter |
Description |
---|---|
port
|
Serial port number (0 based). Specify port 0 to redirect the output to the hsmtrace log. |
Return Code
0: Port opened successfully
others: An error prevented the serial port from opening
Comments
This function in no way guarantees safe sharing of the ports.
Any application can call SERIAL_Close() to get the access to the port, or can use SERIAL functions without opening the port first.