User`s manual

Software Manual • EKF Intelligent I/O Controller Family On
CompactPCI
- 24 -
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: Ekf960ReceiveCanFrame(
handle, // handle returned by
CreateFile
pOverlapped, // optional pointer to overlapped buffer (may be NULL)
pExtended, // pointer to a boolean that will be TRUE if the received
// frame has an extended (29 bit) identifier
pRemoteXmit, // pointer to a boolean that will be TRUE if the received
// frame has the remote transmit request flag set
pIdentifier, // pointer to a long that will be filled with the identifier of
// the received frame
pDataSize, // pointer to number of data bytes received with the frame
pData, // pointer to data buffer
pStatusRecord // optional pointer to status record (may be NULL)
);
The read operation can be timed-out by setting up a timer with the I/O control request
IOCTL_SERIAL_SET_TIMEOUTS.
Cancel I/O
All pending read, write and I/O control requests pending can be cancelled by calling the
cancel I/O dispatch entry of the driver. A user application does this by the C function
CancelIo
:
Call: CancelIo(
handle // handle returned by
CreateFile
);
CancelIo
returns TRUE on success. If the cancel operation failed, FALSE is returned and a
call to
GetLastError
returns a corresponding error code.
I/O Control Requests
The device driver for EKF’s Intelligent I/O Controllers supports many I/O control function
entries to setup several device parameters or to obtain the current device status. The
following table gives an overview about the I/O control requests supported by the device
driver “ekf960si1" for different device types:
I/O Control Requests Supported
I/O Control Request Serial Device CANbus Device
IOCTL_EKF960SI1_FLASH_ERASE
IOCTL_EKF960SI1_FLASH_LOCK
IOCTL_EKF960SI1_FLASH_UNLOCK
IOCTL_EKF960SI1_FLASH_WRITE
IOCTL_EKF960SI1_GET_ACCEPTANCE