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


ADMXRC_Write

Prototype

ADMXRC_STATUS
ADMXRC_Write(
    ADMXRC_HANDLE Card,
    unsigned long Width,
    unsigned long Flags,
    DWORD         Local,
    void*         Data,
    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
ADMXRC_SUCCESS The data was written successfully
ADMXRC_INVALID_HANDLE Card is not a valid handle to a card
ADMXRC_INVALID_PARAMETER An invalid parameter was passed

Description

The ADMXRC_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 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 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
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 to which the data will be written. Otherwise, the Local parameter specifies the starting PLX register offset to which the data will be written. If the ADMXRC_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 ADMXRC_IOWORD, the Length parameter should be a multiple of 2.

 


 Top of page