User`s manual

Software Manual • EKF Intelligent I/O Controller Family On
CompactPCI
- 37 -
EKF Elektronik GmbH * Philipp-Reis-Str. 4 * D-59065 HAMM (Germany)
Tel. +49 (0)2381/6890-0 * Fax. +49 (0)2381/6890-90 * E-Mail info@ekf.de * Internet http://www.ekf.de
Get Wait Mask Setting: IOCTL_SERIAL_GET_WAIT_MASK
This I/O control request returns the event mask that is currently set on a serial or CANbus
port.
Call: DeviceIoControl(
handle, // handle returned by
CreateFile
IOCTL_SERIAL_GET_WAIT_MASK,
NULL,
0,
&WaitMask, // pointer to a DWORD variable
sizeof(WaitMask),
&unused, // pointer to a DWORD variable
pOverlapped // optional pointer to overlapped buffer (may be NULL)
);
Note:
1
) The DWORD WaitMask contains a set of zero or more flags that indicate which events
currently are enabled. The flags are defined in the C header file “ntddekf.h” delivered with
the driver installation package. See I/O control request IOCTL_SERIAL_SET_WAIT_MASK
for a description of these flags.
Setup Insert Mode: IOCTL_SERIAL_LSRMST_INSERT
This I/O control request is used to enable or disable the insertion of information about the
line status and the modem status in the received data stream of a serial port. The
information inserted always starts with the escape character passed with this I/O control
request and a following character describing the type of event happened. Passing an escape
character of 0x00 will disable the insertion mode.
On receive error the escape character and the character SERIAL_LSRMST_LSR_DATA are
placed in the read buffer followed by the contents of the
Line Status Register
(LSR) of the
serial controller and the character received.
If no receive data was available when the receive error occurred, the escape character,
SERIAL_LSRMST_LSR_NODATA and the contents of LSR is placed in the read buffer.
On changes of the modem lines the escape character, SERIAL_LSRMST_MST and the
contents of the
Modem Status Register
(MSR) is placed in the read buffer.
The reception of the escape character itself is indicated by the insertion of the sequence
escape character, SERIAL_LSRMST_ESCAPE, escape character.