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. 95
Document ID: PMC-2010419, Issue 1
Interrupt-Service Routine: suni4x622ISR
This function reads the state of the interrupt registers in the S/UNI-4x622 and stores them in an
ISV. Performs whatever functions are needed to clear the interrupt, from simply clearing bits to
complex functions. This routine is called by the application code, from within
sysSuni4x622ISRHandler. If ISR mode is configured all interrupts that were detected are
disabled and the ISV is returned to the application. Note that the application is then responsible
for sending this buffer to the DPR task. If polling mode is selected, no ISV is returned to the
application and the DPR is called directly with the ISV.
Prototype
void * suni4x622ISR(sSUNI4x622_HNDL deviceHandle)
Inputs
deviceHandle : device handle (from suni4x622Add)
Outputs
None
Returns
(pointer to) ISV buffer (to send to the DPR) or NULL (pointer)
Valid States
SUNI4x622_ACTIVE
Side Effects
None
Pseudocode
Begin
get an ISV buffer
update ISV with current interrupt status
if no valid interrupt condition
return NULL
if in ISR mode
disable all detected interrupts
return ISV
else (Polling mode)
call
suni4x622DPR
output NULL
End
Deferred-Processing Routine: suni4x622DPR
This function acts on data contained in the passed ISV, allocates one or more DPV buffers (via
sysSuni4x622DPVBufferGet) and invokes one or more callbacks (if defined and enabled).
This routine is called by the application code, within
sysSuni4x622DPRTask. Note that the
callbacks are responsible for releasing the passed DPV. It is recommended that it be done as soon
as possible to avoid running out of DPV buffers.
Prototype
void suni4x622DPR(void *ptmpisv)
Inputs
ptmpisv : (pointer to) ISV buffer
Outputs
None
Returns
None