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


 
PM5358 S/UNI-4x622 Driver Manual
Application Programming Interface
Proprietary and Confidential to PMC-Sierra, Inc. 56
Document ID: PMC-2010419, Issue 1
perrDevice : (pointer to) errDevice (inside the DDB)
Returns
Success = Device Handle (to be used bas an argument to most of the
S/UNI-4x622 APIs)
Failure = NULL (pointer)
Valid States
SUNI4x622_MOD_READY
Side Effects
Changes the DEVICE state to
SUNI4x622_PRESENT
Deleting a Device: suni4x622Delete
This function removes the specified device from the list of devices being controlled by the
S/UNI-4x622 driver. Deleting a device involves invalidating the DDB for that device and
releasing its associated device handle.
Prototype
INT4 suni4x622Delete(sSUNI4x622_HNDL deviceHandle)
Inputs
deviceHandle : device handle (from suni4x622Add)
Outputs
None
Returns
Success =
SUNI4x622_SUCCESS
Failure = SUNI4x622_ERR_INVALID_DEV
Valid States
SUNI4x622_PRESENT, SUNI4x622_ACTIVE,
SUNI4x622_INACTIVE
Side Effects
Changes the DEVICE state to
SUNI4x622_PRESENT
Initializing a Device: suni4x622Init
This function initializes the Device Data Block (DDB) associated with that device during
suni4x622Add, applies a soft reset to the device and configures it according to the DIV passed
by the application. If the DIV is passed as a NULL the profile number is used. A profile number
of zero indicates that all the register bits are to be left in their default state (after a soft reset).
Note that the profile number is ignored UNLESS the passed DIV is NULL.
Prototype
INT4 suni4x622Init(sSUNI4x622_HNDL deviceHandle,
sSUNI4x622_DIV *pdiv, UINT2 profileNum)
Inputs
deviceHandle : device handle (from suni4x622Add)
pdiv : (pointer to) Device Initialization Vector
profileNum : profile number (ignored if pdiv is NULL)
Outputs
None
Returns
Success =
SUNI4x622_SUCCESS
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE
SUNI4x622_ERR_INVALID_DEV
SUNI4x622_ERR_INVALID_PROFILE_NUM