Publication 1756-RM004B-EN-P - October 2000
5-8 Serial Port API
MVIsp_Close
Syntax:
int MVIsp_Close(int comport);
Parameters:
comport port to close
Description:
This function is used by an application to release control of the a
communications port. comport must be previously opened with
MVIsp_Open.
comport specifies which port is to be closed. The valid values for the
1756-MVI module are COM1 (corresponds to PRT1), COM2
(corresponds to PRT2), and COM3 (corresponds to PRT3).
The handshake lines DTR and RTS of the port specified by comport
are turned off by MVIsp_Close.
Return Value:
MVI_SUCCESS port was closed successfully
MVI_ERR_NOACCESS comport has not been opened
Example:
MVIsp_Close(COM1);
See Also:
MVIsp_Open
IMPORTANT
Once the API has been opened, this function should
always be called before exiting the application
.