User`s manual
Software Manual • EKF Intelligent I/O Controller Family On
CompactPCI
- 38 -
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_LSRMST_INSERT,
&EscapeChar, // pointer to an UCHAR variable containing the escape
// character
sizeof(EscapeChar),
NULL,
0,
&unused, // pointer to a DWORD variable
pOverlapped // optional pointer to overlapped buffer (may be NULL)
);
Purge Read/Write Queues: IOCTL_SERIAL_PURGE
This I/O control request is used to cancel the specified requests and to remove any data
from the corresponding queues.
Call: DeviceIoControl(
handle, // handle returned by
CreateFile
IOCTL_SERIAL_PURGE,
&PurgeMask, // pointer to a DWORD variable containing the purge
// mask
1
)
sizeof(PurgeMask),
NULL,
0,
&unused, // pointer to a DWORD variable
pOverlapped // optional pointer to overlapped buffer (may be NULL)
);
Note:
1
) The purge mask contains one or more of the following flags:
SERIAL_PURGE_RXABORT: Cancel current and purge all read requests
SERIAL_PURGE_RXCLEAR: Purge the read buffer
SERIAL_PURGE_TXABORT: Cancel current and purge all write requests
SERIAL_PURGE_TXCLEAR: Purge the write buffer
The flags are defined in the C header file “ntddekf.h” delivered with the driver installation
package.
Reset The Device: IOCTL_SERIAL_RESET_DEVICE
This I/O control request is used to reset the device controller of a serial or CANbus port.