PM5358 S/UNI-4x622 Driver Manual

Application Programming Interface

Failure = 0

Valid States SUNI4x622_PRESENT, SUNI4x622_ACTIVE,

SUNI4x622_INACTIVE

Side Effects May change the configuration of the device

Reading from a block of Device Registers: suni4x622ReadBlock

This function reads a register block of a specific S/UNI-4x622 device by providing the starting register number, and the size to read. This function derives the actual start address location based on the device handle and starting register number inputs. It then reads the contents of this data block using multiple calls to the system specific macro, sysSuni4x622Read. Note that any error indication is written to the DDB. It is the USER’s responsibility to allocate enough memory for the block read.

Prototype

Inputs

void suni4x622ReadBlock(sSUNI4x622_HNDL deviceHandle, UINT2 startRegNum, UINT2 size, UINT1 *pblock)

deviceHandle

: device handle (from suni4x622Add)

startRegNum

: starting register number

size

: size of the block to read

pblock

: (pointer to) the block to read

Outputs

ERROR code written to the DDB

 

 

SUNI4x622_ERR_INVALID_DEV

 

ERROR code written to the DDB

 

 

SUNI4x622_ERR_INVALID_ARG

 

 

SUNI4x622_ERR_INVALID_REG

 

pblock

: (pointer to) the block read

Returns

None

 

Valid States

SUNI4x622_PRESENT, SUNI4x622_ACTIVE,

 

SUNI4x622_INACTIVE

Side Effects

May affect registers that change after a read operation

Writing to a Block of Device Registers: suni4x622WriteBlock

This function writes to a register block of a specific S/UNI-4x622 device by providing the starting register number and the block size. This function derives the actual starting address location based on the device handle and starting register number inputs. It then writes the contents of this data block using multiple calls to the system specific macro, sysSuni4x622Write. A bit from the passed block is only modified in the device’s registers if the corresponding bit is set in the passed mask. Note that any error indication is written to the DDB

Prototype

void suni4x622WriteBlock(sSUNI4x622_HNDL

 

deviceHandle, UINT2 startRegNum, UINT2 size, UINT1

 

*pblock, UINT1 *pmask)

Proprietary and Confidential to PMC-Sierra, Inc.

60

Document ID: PMC-2010419, Issue 1

 

Page 60
Image 60
PMC-Sierra PM5358 S/UNI 4x622 manual Reading from a block of Device Registers suni4x622ReadBlock, Prototype Inputs