ProSoft Technology MVI69-ADM User Manual
Page 245

MVI-ADM ♦ 'C' Programmable
Serial Port Library Functions
'C' Programmable Application Development Module
Developer's Guide
ProSoft Technology, Inc.
Page 245 of 342
February 20, 2013
MVIsp_SetDTR
Syntax
int MVIsp_SetDTR(int comport, int state);
Parameters
comport
port for which DTR is to be changed
state
desired state
Description
This function allows the state of the DTR signal to be controlled. comport must be
previously opened with MVIsp_Open.
state is the desired state of the DTR signal. Valid values for state are ON and
OFF.
Note: If DTR/DSR handshaking is enabled, changing the state of the DTR signal with
MVIsp_SetDTR will cause unpredictable results.
Return Value
MVI_SUCCESS
the DTR signal was set successfully
MVI_ERR_NOACCESS
comport has not been opened
MVI_ERR_BADPARAM
invalid state
Example
if (MVIsp_SetDTR(COM1, ON) != MVI_SUCCESS)
printf("Set DTR failed\n");
See Also
MVIsp_GetDTR (page 246)