National Instruments 3.22E+04 用户手册

下载
页码 71
Chapter 4
Using Your Serial Hardware
© National Instruments Corporation
4-5
For example, to set TXRDY two-wire auto control mode, use the 
following code:
ULONG TranceiverMode = 131;
DeviceIoControl(hDevice,
IOCTL_SERIAL_SET_TRANSCEIVER_MODE,(PVOID)
&TransceiverMode,sizeof(ULONG),lpOutBuffer,
nOutBufferSize,lpBytesReturned,lpOverlapped);
Table 4-3.  DeviceIoControl Function Input Values
Transceiver Mode
DeviceIoControl 
Function Input Value
Four-wire mode
128
Two-wire mode: DTR with echo
129
Two-wire mode: DTR controlled
130
Two-wire mode: TXRDY auto control
131