GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > VXW / V7-1-1

Constituent: vxw_flight     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

ppciPid.c File Reference

Function definitions for PID routines. More...

#include "vxWorks.h"
#include "intLib.h"
#include "drv/ppci/asmFns.h"
#include "drv/ppci/isrRouter.h"
#include "drv/ppci/ppciRegs.h"
#include "drv/ppci/ppciInt.h"
#include "drv/ppci/ppciPid.h"

Include dependency graph for ppciPid.c:


Defines

#define quadletSwap(QUAD)

Functions

STATUS pidCnf (int pidNum, int type, int inSen, int outSrc)
 Configure a PID.
STATUS pidSet (int pidNum, int value)
 Set the value of a PID.
int pidGet (int pidNum)
 Get the value of a PID.
STATUS pidIntEnable (int pidNum)
 Enable a PID PPC interrupt.
STATUS pidIntDisable (int pidNum)
 Disable a PID PPC interrupt.
STATUS pidIntConnect (int pidNum, VOIDFUNCPTR isr, int parm)
 Connect to a PID interrupt.
STATUS pidIntEmcEnable (int pidNum)
 Enable a PID EMC interrupt.
STATUS pidIntEmcDisable (int pidNum)
 Disable a PID EMC interrupt.
STATUS pidEdgeClear (int pidNum)
void ppciPidInit (void)

Variables

isrRoutingInfo_t pidRoutingInfo

Detailed Description

Function definitions for PID routines.

-------------------------------------------------------------------------

Description:

PowerPCI ASIC PID routines.

Restrictions:

Change History:

Date Pgm Description -------- --- ------------------------------------------------------ 04/21/00 MJF Initial Release 01/03/01 DS BSP integration. 03/09/01 MJF Corrected writes to pidOut reg. in pidSet 03/03/03 CH Update to allow pidSet before pidCnf, and to disable a a PID with pidCnf. --------------------------------------------------------------------------


Define Documentation

#define quadletSwap QUAD   ) 
 

Value:

QUAD = (((QUAD >> 24) & 0x000000ff) | ((QUAD >>  8) & 0x0000ff00)\
                                  | ((QUAD <<  8) & 0x00ff0000) | ((QUAD << 24) & 0xff000000))
***************************************************************************

Reverses the bytes of a 32 bit quadlet from ABCD to DCBA


Function Documentation

STATUS pidCnf int  pidNum,
int  type,
int  inSen,
int  outSrc
 

Configure a PID.

This routine configures a PID. Input PIDs can be (active low) level sensitive or (negative) edge sensitive. Output PIDs can be sourced from either a timer or the PID output register.

Parameters:
pidNum - The PID number (0-31).
type - Whether to configure the PID as DISABLE, IN, OUT or IN_OUT.
inSen - Input sensitivity: IN_LEVEL or IN_EDGE
outSrc - Output source: OUT_REG or OUT_TIMER.
Returns:
OK or ERROR

STATUS pidEdgeClear int  pidNum  ) 
 

This routine clears the latched bit in the input register indicating an input edge was detected.

Parameters:
pidNum - The PID number (0-31).
Returns:
OK or ERROR

int pidGet int  pidNum  ) 
 

Get the value of a PID.

This routine returns the value (0 or 1) of the specified PID. The PID must be configured as an input.

Parameters:
pidNum - The PID number (0-31).
Returns:
0 if the PID is not set, 1 if the pid is set, or -1 on error.

STATUS pidIntConnect int  pidNum,
VOIDFUNCPTR  isr,
int  parm
 

Connect to a PID interrupt.

This routine connects an interrupt service routine (ISR) to a PowerPCI bridge PID interrupt level. PID interrupts are enabled separate from this routine (by pidIntEnable). The interrupt level being connected should not be enabled when this routine is called. The specified ISR will get control with interrupts disabled.

Parameters:
pidNum - The PPCI PID interrupt level (0-31).
isr - Pointer to the ISR.
parm - A user-defined parameter to pass to the ISR when the interrupt occurs.
Returns:
OK or ERROR

STATUS pidIntDisable int  pidNum  ) 
 

Disable a PID PPC interrupt.

This routine disables the specified PID as an interrupt (to the processor). The PID must be configured as an input.

Parameters:
pidNum - The PID number (0-31).
Returns:
OK or ERROR

STATUS pidIntEmcDisable int  pidNum  ) 
 

Disable a PID EMC interrupt.

This routine disables the specified PID as an interrupt to the EMC. The PID must be configured as an input.

Parameters:
pidNum - The PID number (26-31).
Returns:
OK or ERROR

STATUS pidIntEmcEnable int  pidNum  ) 
 

Enable a PID EMC interrupt.

This routine enables the specified PID as an interrupt to the EMC. The PID must be configured as an input.

Parameters:
pidNum - The PID number (26-31).
Returns:
OK or ERROR

STATUS pidIntEnable int  pidNum  ) 
 

Enable a PID PPC interrupt.

This routine enables the specified PID as an interrupt (to the processor). The PID must be configured as an input.

Parameters:
pidNum - The PID number (0-31).
Returns:
OK or ERROR

STATUS pidSet int  pidNum,
int  value
 

Set the value of a PID.

This routine sets a PID to a specified value. The PID does not have to be configured as an output.

Parameters:
pidNum - The PID number (0-31).
value - Value to which the PID is set (0 or 1).
Returns:
OK or ERROR

void ppciPidInit void   ) 
 

This init routine is called by ppciInit (from sysHwInit) during system boot. Interrupt routing resources are initialized.


Variable Documentation

pidRoutingInfo
 

Initial value:

  {
    {{NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},  
     {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
     {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
     {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
     {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
     {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
     {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
     {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0}},
    &ppciPidInput,                                
    &ppciPidIntEnable,                            
    TRUE,                                         
    TRUE                                          
  }
Interrupt routing table.


Generated on Sat Feb 2 01:36:30 2008 by  doxygen 1.4.4