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.c File Reference

Function definitions for timer routines. More...

#include "vxWorks.h"
#include "drv/ppci/asmFns.h"
#include "drv/ppci/ppciRegs.h"
#include "drv/ppci/ppciPtim.h"
#include "drv/ppci/ppciInt.h"

Include dependency graph for ppciPtim.c:


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.
unsigned int watchdogGet (void)
 Read the value of the watchdog timer.
STATUS watchdogSet (unsigned int value)
 Set the value of the watchdog timer.
void ppciPtimInit (void)

Detailed Description

Function definitions for timer routines.

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

Description:

PowerPCI ASIC routines for programmable and watchdog timers.

Restrictions:

Change History:

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

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


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:32 2008 by  doxygen 1.4.4