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  

ppciPtim.h File Reference

PowerPCI ASIC programmable timer routine function prototypes. More...

#include "vxWorks.h"

Include dependency graph for ppciPtim.h:

This graph shows which files directly or indirectly include this file:


Defines

#define PTIM_CNT_DOWN   0
#define PTIM_CNT_UP   1
#define PTIM_OSC_CLK   0
#define PTIM_PID_CLK   1
#define PTIM_DIV4   0
#define PTIM_DIV8   1
#define PTIM_STOP_TMR   0
#define PTIM_RELOAD_TMR   1
#define PTIM_SIG_MISC   0
#define PTIM_SIG_VEC   1
#define PTIM_PULSE_PID   0
#define PTIM_TOGL_PID   1
#define PTIM_DIS_SNAP   0
#define PTIM_ENA_SNAP   1
#define PTIM_DIS_CLEAR   0
#define PTIM_ENA_CLEAR   1
#define PTIM_NUM_FIRST   1
#define PTIM_NUM_LAST   3

Functions

STATUS ptimCnf (int ptimNum, int cntDir, int clkSrc, int clkFreq, int reloadTmr, int sigInt, int sigMode, int snap, int extClear)
 Configure a programmable timer.
STATUS ptimGetReload (int ptimNum, unsigned int *pVal)
 Get reload value of timer.
STATUS ptimSetReload (int ptimNum, unsigned int value)
 Set reload value of timer.
STATUS ptimGet (int ptimNum, unsigned int *pVal)
 Get value of timer.
STATUS ptimSet (int ptimNum, unsigned int value)
 Set value of timer.
STATUS ptimEnable (int ptimNum)
 Enable timer.
STATUS ptimDisable (int ptimNum)
 Disable timer.
STATUS ptimIntEnable (int ptimNum)
STATUS ptimIntDisable (int ptimNum)
 Disable a PowerPCI programmable timer interrupt.
STATUS ptimIntConnect (int ptimNum, VOIDFUNCPTR isr, int parm)
 Connect ISR to PowerPCI programmable timer interrupt.
void ppciPtimInit (void)
unsigned int watchdogGet (void)
 Read the value of the watchdog timer.
STATUS watchdogSet (unsigned int value)
 Set the value of the watchdog timer.

Detailed Description

PowerPCI ASIC programmable timer routine function prototypes.

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

Description:

PowerPCI ASIC programmable timer routine function prototypes. See ppciPtim.c for detailed descriptions of the functions.

Restrictions:

Change History:

Date Pgm Description -------- --- ------------------------------------------------------ 04/21/00 MJF Initial Release 01/03/01 DS BSP integration.

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


Define Documentation

#define PTIM_CNT_DOWN   0
 

Count down timer.

#define PTIM_CNT_UP   1
 

Count up timer.

#define PTIM_DIS_CLEAR   0
 

Disable external clear via PID.

#define PTIM_DIS_SNAP   0
 

Disable snapshot store via PID.

#define PTIM_DIV4   0
 

Use real time clock / 4 frequency.

#define PTIM_DIV8   1
 

Use real time clock / 8 frequency.

#define PTIM_ENA_CLEAR   1
 

Enable external clear via PID.

#define PTIM_ENA_SNAP   1
 

Enable snapshot store via PID.

#define PTIM_NUM_FIRST   1
 

Number of first PTIM.

#define PTIM_NUM_LAST   3
 

Number of last PTIM.

#define PTIM_OSC_CLK   0
 

Use oscillator as clock source.

#define PTIM_PID_CLK   1
 

Use PID as clock source.

#define PTIM_PULSE_PID   0
 

Pulse PID if signalling term. count via PID.

#define PTIM_RELOAD_TMR   1
 

Reload timer after reaching terminal event.

#define PTIM_SIG_MISC   0
 

Signal interrupt via misc. int. status reg.

#define PTIM_SIG_VEC   1
 

Signal interrupt via vector int. status reg.

#define PTIM_STOP_TMR   0
 

Stop timer after reaching terminal event.

#define PTIM_TOGL_PID   1
 

Toggle PID if signalling term. count via PID.


Function Documentation

void ppciPtimInit void   ) 
 

Timer initialization routine

This init routine is called by ppciInit (from sysHwInit) during system boot. No initialization is currently performed -- this routine merely servers as a stub to force inclusion by the linker.

STATUS ptimCnf int  ptimNum,
int  cntDir,
int  clkSrc,
int  clkFreq,
int  reloadTmr,
int  sigInt,
int  sigMode,
int  snap,
int  extClear
 

Configure a programmable timer.

Configure a programmable timer

This routine configures a programmable timer. Any input or output PIDs used by the timer must be configured separately via pidCnf().

Parameters:
ptimNum - Programmable timer number (1-3).
cntDir - Count direction: PTIM_CNT_DOWN or PTIM_CNT_UP
clkSrc - Clock source: PTIM_OSC_CLK or PTIM_PID_CLK
clkFreq - Clock frequency: PTIM_DIV4 or PTIM_DIV8
reloadTmr - Terminal event: PTIM_STOP_TMR or PTIM_RELOAD_TMR
sigInt - Terminal signal: PTIM_SIG_MISC or PTIM_SIG_VEC
sigMode - Pulse/toggle signal: PTIM_PULSE_PID or PTIM_TOGL_PID
snap - Snapshot: PTIM_DIS_SNAP or PTIM_ENA_SNAP
extClear - External clear: PTIM_DIS_CLEAR or PTIM_ENA_CLEAR
Returns:
OK or ERROR.

STATUS ptimDisable int  ptimNum  ) 
 

Disable timer.

Disable timer

This routine disables a programmable timer, stops it from counting.

Parameters:
ptimNum - Programmable timer number (1-3).
Returns:
OK or ERROR

STATUS ptimEnable int  ptimNum  ) 
 

Enable timer.

Enable timer

This routine enables a programmable timer, starts it counting.

Parameters:
ptimNum - Programmable timer number (1-3).
Returns:
OK or ERROR.

STATUS ptimGet int  ptimNum,
unsigned int *  pVal
 

Get value of timer.

Get value of timer

This routine returns the current value of a programmable timer.

Parameters:
ptimNum - Programmable timer number (1-3).
pVal - Pointer to return timer value.
Returns:
OK or ERROR

STATUS ptimGetReload int  ptimNum,
unsigned int *  pVal
 

Get reload value of timer.

Get reload value of timer

This routine returns the reload value of a programmable timer.

Parameters:
ptimNum - Programmable timer number (1-3).
pVal - Pointer to return reload value.
Returns:
OK or ERROR.

STATUS ptimIntConnect int  ptimNum,
VOIDFUNCPTR  isr,
int  parm
 

Connect ISR to PowerPCI programmable timer interrupt.

Connect ISR to PowerPCI programmable timer interrupt

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

Parameters:
ptimNum - Programmable timer number (1-3).
isr - Pointer to the ISR.
parm - A user-defined parameter to pass to the ISR when the interrupt occurs.
Returns:
OK or ERROR

STATUS ptimIntDisable int  ptimNum  ) 
 

Disable a PowerPCI programmable timer interrupt.

Disable a PowerPCI programmable timer interrupt

This routine disables the specified programmable timer interrupt of the PowerPCI bridge.

Parameters:
ptimNum - Programmable timer number (1-3).
Return values:
OK or ERROR

STATUS ptimIntEnable int  ptimNum  ) 
 

Enable a PowerPCI programmable timer interrupt

This routine enables the specified programmable timer interrupt of the PowerPCI bridge.

Parameters:
ptimNum - Programmable timer number (1-3).
Returns:
OK or ERROR

STATUS ptimSet int  ptimNum,
unsigned int  value
 

Set value of timer.

Set value of timer

This routine sets a programmable timer.

Parameters:
ptimNum - Programmable timer number (1-3).
value - Value to load into timer.
Returns:
OK or ERROR

STATUS ptimSetReload int  ptimNum,
unsigned int  value
 

Set reload value of timer.

Set reload value of timer

This routine sets the reload value of a programmable timer.

Parameters:
ptimNum - Programmable timer number (1-3).
value - Reload value.
Returns:
OK or ERROR.

unsigned int watchdogGet void   ) 
 

Read the value of the watchdog timer.

Read the value of the watchdog timer

Returns:
The watchdog time couter value.

STATUS watchdogSet unsigned int  value  ) 
 

Set the value of the watchdog timer.

Set the value of the watchdog timer

Parameters:
value - The value to write to the watchdog timer.
Returns:
OK or ERROR


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