National Instruments AT Manual de usuario Pagina 122

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 208
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 121
Chapter 6 Using Your Serial Hardware
© National Instruments Corporation 6-5 Serial Hardware and Software for Windows
For example, to set TXRDY two-wire auto control mode, use the
following code:
Windows 2000
ULONG TranceiverMode = 131;
ULONG dummy;
DeviceIoControl(hDevice,
IOCTL_SERIAL_SET_TRANSCEIVER_MODE,(PVOID)
&TransceiverMode,sizeof(ULONG),NULL,0,&dummy,NULL);
Windows NT/Me/9x
ULONG TranceiverMode = 131;
DeviceIoControl(hDevice,
IOCTL_SERIAL_SET_TRANSCEIVER_MODE,(PVOID)
&TransceiverMode,sizeof(ULONG),lpOutBuffer,
nOutBufferSize,lpBytesReturned,lpOverlapped);
Table 6-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
Vista de pagina 121
1 2 ... 117 118 119 120 121 122 123 124 125 126 127 ... 207 208

Comentarios a estos manuales

Sin comentarios