User`s manual
Software Manual • EKF Intelligent I/O Controller Family On
CompactPCI
- 59 -
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
Data Structures Used B
y
The Interface
The data structures used by the interface are explained in the following section. They and
their possibly corresponding definitions can be found in the C header “ekf960if.h”.
EKF_MU_IO_BUFFER
A structure that describes the I/O buffers used for read and write data:
typedef struct _EKF_MU_IO_BUFFER
{
UINT32 CharsInBuffer;
UCHAR Buffer[EKF_MU_IO_BUFFER_SIZE];
} EKF_MU_IO_BUFFER, *PEKF_MU_IO_BUFFER;
CharsInBuffer:
This is the number of bytes currently in the buffer. This field is maintained by the
controller and should never be written by the host.
Buffer:
This is the buffer area itself. The buffer is organized in different manner dependent on
its function.
As a write buffer, it is used as a simple linear buffer that is filled by the host and read
by the controller from the start of the buffer with incrementing addresses. For the next
write, data is filled to the start of the buffer again.
A read buffer is organized in a ring. The controller maintains a fill pointer that is
incremented until the buffer is full. If the top of the buffer is reached, the fill pointer
wraps to the buffer start. The fill pointer is invisible to the host. An empty pointer,
administrated by the host, is used to read data from the buffer. The empty pointer
read as many bytes as available in the buffer and remains at that position after the
read is complete. The next read starts at that position. If the top of the buffer is
reached, the empty pointer wraps to the buffer start. The amount of data can be
detected by checking the CharsInBuffer field.
EKF16550_CHARS
A structure that contains special characters used for serial ports:
typedef struct _EKF16550_CHARS
{
UCHAR EofChar;
UCHAR ErrorChar;
UCHAR BreakChar;
UCHAR EventChar;










