Serial port api status functions – ProSoft Technology MVI69-ADM User Manual

Page 243

Advertising
background image

MVI-ADM ♦ 'C' Programmable

Serial Port Library Functions

'C' Programmable Application Development Module

Developer's Guide

ProSoft Technology, Inc.

Page 243 of 342

February 20, 2013

9.3

Serial Port API Status Functions

MVIsp_SetRTS

Syntax

int MVIsp_SetRTS(int comport, int state);

Parameters

comport

port for which RTS is to be changed

state

desired RTS state

Description
This functions allows the state of the RTS signal to be controlled. comport must
be previously opened with MVIsp_Open.

state specifies desired state of the RTS signal. Valid values for state are ON and
OFF.

Note: If RTS/CTS hardware handshaking is enabled, using the MVIsp_SetRTS function will cause

unpredictable results.

Return Value

MVI_SUCCESS

the RTS signal was set successfully.

MVI_ERR_NOACCESS

comport has not been opened

MVI_ERR_BADPARAM

invalid state

Example

int rc;
rc = MVIsp_SetRTS(COM1, ON);
if (rc != MVI_SUCCESS)
printf("SetRTS failed\n ");

See Also
MVIsp_GetRTS (page 244)

Advertising