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


ADMXRC2_Read

Prototype

ADMXRC2_STATUS
ADMXRC2_Read(
    ADMXRC2_HANDLE  Card,
    ADMXRC2_IOWIDTH Width,
    uint32_t        Flags,
    uint32_t        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
ADMXRC2_SUCCESS The data was read successfully
ADMXRC2_INVALID_HANDLE Card is not a valid handle to a card
ADMXRC2_INVALID_PARAMETER An invalid parameter was passed

Description

The ADMXRC2_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 values from the enumerated type ADMXRC2_IOWIDTH.

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
ADMXRC2_IOFIXED The local bus address is not incremented during the transfer
ADMXRC2_IOADAPTER The read is performed from the card's PCI interface registers rather than the local bus

If the ADMXRC2_IOADAPTER 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 adapter register (PCI9080/PCI9656) offset from which the data will be read. If the ADMXRC2_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 ADMXRC2_IOWIDTH_16, the Length parameter should be a multiple of 2.

 


 Top of page