National Instruments 320682C Musical Toy Instrument User Manual


 
RS-232 Library Chapter 5
LabWindows/CVI Standard Libraries 5-30 © National Instruments Corporation
SetCTSMode
int
result = SetCTSMode
(int
COMPort
,
int
mode
);
Purpose
Enables or disables hardware handshaking as described in the Hardware Handshaking section of
the RS-232 Library Function Overview.
Parameters
Input
COMPort
integer Range 1 through 32.
mode
integer 0 to disable hardware
handshaking, non-zero to enable
hardware handshaking. See
discussion below.
Return Value
result
integer Refer to error codes in Table 5-6.
Parameter Discussion
The following are the valid values for
mode
.
0—LWRS_HWHANDSHAKE_OFF—Hardware handshaking is disabled. The CTS line is ignored.
The RTS and DTR lines are raised the entire time the port is open.
1—LWRS_HWHANDSHAKE_CTS_RTS_DTR—Hardware handshaking is enabled. The CTS line
is monitored. Both the RTS and DTR lines are used for handshaking.
2—LWRS_HWHANDSHAKE_CTS_RTS—Hardware handshaking is enabled. The CTS line is
monitored. The RTS is used for handshaking. The DTR line is raised the entire time the port is
open.
Using This Function
By default, hardware handshaking is not used.
The function returns an error if the port is not open or parameter values are invalid.