User`s manual
Software Manual • EKF Intelligent I/O Controller Family On
CompactPCI
- 42 -
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
Setup Line Control: IOCTL_SERIAL_SET_LINE_CONTROL
This I/O control request sets up the line control values on a serial port.
Call: DeviceIoControl(
handle, // handle returned by
CreateFile
IOCTL_SERIAL_SET_LINE_CONTROL,
pLineControl, // pointer to a SERIAL_LINE_CONTROL structure
1
)
sizeof(*pLineControl),
NULL,
0,
&unused, // pointer to a DWORD variable
pOverlapped // optional pointer to overlapped buffer (may be NULL)
);
Note:
1
) This structure is used to pass the new line control settings. It is defined in the C header file
“ntddekf.h” delivered with the driver installation package. This file also contains definitions for
character sizes, number of stop bits and parity settings (SERIAL_DATABITS_5 through
SERIAL_PARITY_SPACE).
Setup Receive Buffer Size: IOCTL_SERIAL_SET_QUEUE_SIZE
This I/O control request sets up the receive buffer size of a serial port. Since EKF’s
Intelligent I/O Controllers always work with a fixed receive buffer size, this call will do nothing,
if the new requested size is less or equal the current size. If a larger buffer is desired, an
error is returned.
Call: DeviceIoControl(
handle, // handle returned by
CreateFile
IOCTL_SERIAL_SET_QUEUE_SIZE,
pQueueSize, // pointer to a SERIAL_QUEUE_SIZE structure
1
)
sizeof(*pQueueSize),
NULL,
0,
&unused, // pointer to a DWORD variable
pOverlapped // optional pointer to overlapped buffer (may be NULL)
);
Note:
1
) This structure is used to pass the new queue size. It is defined in the C header file
“ntddekf.h” delivered with the driver installation package.