ADM-XRC SDK 2.8.1 User Guide (Linux)
© Copyright 2001-2009 Alpha Data


ADMXRC_Read

Prototype

ADMXRC_STATUS
ADMXRC_Read(
    ADMXRC_HANDLE Card,
    unsigned long Width,
    unsigned long Flags,
    DWORD         Local,
    void*         Buffer,
    unsigned long Length);

Arguments

Argument Type Purpose
Card In Handle of card from which the read is to take place
Width In Width of operation
Flags In Miscellaneous flags
Local In Local bus address at which to begin reading
Buffer Out Buffer to receive data read
Length In Number of bytes to read

Return value

Value Meaning
ADMXRC_SUCCESS The data was read successfully
ADMXRC_INVALID_HANDLE Card is not a valid handle to a card
ADMXRC_INVALID_PARAMETER An invalid parameter was passed

Description

The ADMXRC_Read function reads a number of bytes from the local bus using direct slave cycles or from the PLX registers. The local bus space encompasses FPGA space, the FPGA flash memory, and the control registers.

The Width parameter specifies the width of the operation, and must be one of the following values:

Value Meaning
ADMXRC_IOBYTE BYTE (8 bit) width
ADMXRC_IOWORD WORD (16 bit) width
ADMXRC_IOLONG DWORD (32 bit) width

The Flags parameter modifies the semantics of the operation. Normally, the read is performed in local bus space with an incrementing address, but this behavior can be modified by any combination of the following:

Flag Meaning
ADMXRC_IOFIXED The local bus address is not incremented during the transfer
ADMXRC_IOPLX The read is performed from the card's PCI interface registers rather than the local bus

If the ADMXRC_IOPLX flag is not specified, the Local parameter specifies the starting local bus address from which the data will be read. Otherwise, the Local parameter specifies the starting PLX register offset from which the data will be read. If the ADMXRC_IOFIXED flag was specified, this address will not increment as the data is read. Otherwise, the address is incremented as the data is read.

The Buffer parameter specifies the buffer to receive the data read.

The Length parameter specifies how many bytes are to be read, and should be a multiple of the width specified by the Width parameter. For example, if Width is ADMXRC_IOWORD, the Length parameter should be a multiple of 2.

 


 Top of page