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


ADMXRC2_Write

Prototype

ADMXRC2_STATUS
ADMXRC2_Write(
    ADMXRC2_HANDLE  Card,
    ADMXRC2_IOWIDTH Width,
    uint32_t        Flags,
    uint32_t        Local,
    const void*     Buffer,
    unsigned long   Length);

Arguments

Argument Type Purpose
Card In Handle of card on which the write is to take place
Width In Width of operation
Flags In Miscellaneous flags
Local In Local bus address at which to begin writing
Buffer In Buffer containing data to write
Length In Number of bytes to write

Return value

Value Meaning
ADMXRC2_SUCCESS The data was written successfully
ADMXRC2_INVALID_HANDLE Card is not a valid handle to a card
ADMXRC2_INVALID_PARAMETER An invalid parameter was passed

Description

The ADMXRC2_Write function writes a number of bytes from an application buffer to the local bus using direct slave cycles or to 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 write is performed to 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 to which the data will be written. Otherwise, the Local parameter specifies the starting adapter register (PCI9080/PCI9656) offset to which the data will be written. If the ADMXRC2_IOFIXED flag was specified, this address will not increment as the data is written. Otherwise, the address is incremented as the data is written.

The Buffer parameter specifies the buffer containing the data to be written.

The Length parameter specifies how many bytes are to be written, 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