User`s manual

Software Manual • EKF Intelligent I/O Controller Family On
CompactPCI
- 44 -
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
Call: DeviceIoControl(
handle, // handle returned by
CreateFile
IOCTL_SERIAL_SET_WAIT_MASK,
&WaitMask, // pointer to a DWORD variable
1
)
sizeof(WaitMask),
NULL,
0,
&unused, // pointer to a DWORD variable
pOverlapped // optional pointer to overlapped buffer (may be NULL)
);
Note:
1
) The DWORD WaitMask contains zero or more of the following flags when called for a
serial port:
SERIAL_EV_RXCHAR: Any Character received
SERIAL_EV_RXFLAG: Received certain character
SERIAL_EV_TXEMPTY: Transmit Queue Empty
SERIAL_EV_CTS: CTS changed state
SERIAL_EV_DSR: DSR changed state
SERIAL_EV_RLSD: DCD changed state
SERIAL_EV_BREAK: BREAK received
SERIAL_EV_ERR: Line status error occurred
SERIAL_EV_RING: Ring signal detected
SERIAL_EV_RX80FULL: Receive buffer is 80 percent full
CANbus devices support these event flags:
SJA1000_EV_RXFRAME: A frame received
SJA1000_EV_BUSOFF: A bus-off event occurred
SJA1000_EV_BUSON: A bus-on event occurred
SJA1000_EV_ERR: An error occurred
The flags are defined in the C header file “ntddekf.h” delivered with the driver installation
package.
Wait For An Event: IOCTL_SERIAL_WAIT_ON_MASK
This I/O control request waits for the occurrence of one or more event previously enabled by
the I/O control request SERIAL_SET_WAIT_MASK. The request returns immediately if a
wait event already occurred when calling.