Chapter 4 Using Your Serial Hardware
© National Instruments Corporation 4-5 PCI Serial for Windows Me/9x
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