PMC-Sierra PM5358 S/UNI 4x622 Power Screwdriver User Manual


 
PM5358 S/UNI-4x622 Driver Manual
Data Structures
Proprietary and Confidential to PMC-Sierra, Inc. 34
Document ID: PMC-2010419, Issue 1
Field Name Field Type Field Description
initialized
stateModule eSUNI4x622_MOD_STATE
Module state; can be one of the following
IDLE or READY
maxDevs UINT2
Maximum number of devices supported
numDevs UINT2
Number of devices currently registered
maxInitProfs UINT2
Maximum number of initialization profiles
pddb sSUNI4x622_DDB *
(array of) Device Data Blocks (DDB) in
context memory
pinitProfs sSUNI4x622_DIV *
(array of) Initialization profiles in context
memory
Device Data Block: DDB
The DDB is the top-level structure for each device. It contains configuration data about the device
level code and pointers to configuration data about device level sub-blocks.
errDevice most of the device API functions return a specific error code directly. When the
returned code is
SUNI4x622_FAILURE, this indicates that the top-level function was not able
to carry the specific error code back top the application. In addition, some device functions do
not return an error code. Under those circumstances, the proper error code is recorded in this
element. The element is the first in the structure so that the USER can cast the DDB pointer
to a INT4 pointer and retrieve the local error (this eliminates the need to include the DDB
template in the application code).
valid indicates that this structure has been properly initialized and may be read by the
USER.
stateDevice contains the current state of the device and could be set to:
SUNI4x622_START, SUNI4x622_PRESENT, SUNI4x622_ACTIVE or
SUNI4x622_INACTIVE.
usrCtxt is a value that can be used by the USER to identify the device during the execution
of the callback functions. It is passed to the driver when
suni4x622Add is called and
returned to the USER in the DPV when a callback function is invoked. The element is unused
by the driver itself and may contain any value.
Table 9: S/UNI-4x622 Device Data Block: sSUNI4x622_DDB
Field Name Field Type Field Description
errDevice INT4
Global error indicator for device calls
valid UINT2
Indicates that this structure has been