cpi_read_control

Reads a set of control registers from a TX board (for board types that include control registers).

Prototype

#include txcpi.h

S16 cpi_read_control ( TX_HANDLE handle, U16 basereg, U16 numreg, U32 *regarray, U16 *actcnt)

Argument

Description

handle

TX handle number.

basereg

Number of the base register to read (0 through max-1).

numreg

Count of registers to read.

regarray

Pointer to an array to hold register values.

actcnt

Pointer to the location where the actual number of registers read are stored.


Return values

Return value

Description

CPI_SUCCESS

Requested set of registers successfully read from TX board.

CPI_ERROR

Call cpi_get_last_error to obtain the error code.


Details

In addition to the dual-ported RAM shared between the host processor and the TX board, a set of registers is used for communication control for certain TX board types (such as PCI and CompactPCI boards). Certain low-level diagnostics on the TX board use the control registers to pass status information to the host.

All control register access should be restricted to diagnostic applications. Do not use this function for normal data transfer situations.

See also

cpi_write_control