GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCBD / dev > lcbd / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

LCBD_clk.h File Reference

Interface to the clock transition handling facilities. More...


Classes

struct  _LCBD_clk_on_cbp
 Binds a CLOCK OFF -> ON interrupt to its parameter. More...
struct  _LCBD_clk_off_cbp
 Binds a CLOCK ON -> OFF interrupt to its parameter. More...

Defines

#define LCBD_OK   0
 Success return code, note that this is not an LCBD message code, but may be used as one.

Typedefs

typedef unsigned int(* LCBD_clk_on_cb )(void *prm, LCBD lcb)
 Callback routine to handle an CLOCK OFF -> ON transition.
typedef struct _LCBD_clk_on_cbp LCBD_clk_on_cbp
 Typedef for struct _LCBD_clk_on_cbp.
typedef unsigned int(* LCBD_clk_off_cb )(void *prm, LCBD lcb)
 Callback routine to handle an CLOCK ON -> OFF transition.
typedef struct _LCBD_clk_off_cbp LCBD_clk_off_cbp
 Typedef for struct _LCBD_clk_off_cbp.

Functions

unsigned int LCBD_clk_off_cb_set (LCBD lcb, LCBD_clk_off_cb cb, void *prm)
 Establish interrupt callback for handling CLOCK ON -> OFF transitions.
LCBD_clk_off_cbp LCBD_clk_off_cbp_get (LCBD lcb)
 Returns the callback routine for the CLOCK ON -> OFF transition plus its parameter.
unsigned int LCBD_clk_on_cb_set (LCBD lcb, LCBD_clk_on_cb cb, void *prm)
 Establish interrupt callback for handling CLOCK OFF -> ON transitions.
LCBD_clk_on_cbp LCBD_clk_on_cbp_get (LCBD lcb)
 Returns the callback routine for the CLOCK ON -> OFF transition plus its parameter.


Detailed Description

Interface to the clock transition handling facilities.

Author:
JJRussell -- russell@slac.stanford.edu
  CVS $Id
Overview
This file implements routines for handling clock transitions. This is mainly a debugging facility, so it has been separated from the normal user stuff. This facility allows one to attach callback routines when the 20MHz LATp-side clock causes interrupts by going from CLK ON->OFF and CLK OFF->ON. The routines are called back in the context of the LCBD ISR, so due diligence is required.
Warning:
This facility may be eliminated due to no real customers or it may be relegated to only test versions of the driver. The user friendly way of dealing with clock state changes is via the LCBD_nut routines (Notify User of state Transitions).

Typedef Documentation

unsigned int(* LCBD_clk_off_cb)(void *prm, LCBD lcb)

Callback routine to handle an CLOCK ON -> OFF transition.

Return values:
Status,currently unused, but the user should return 0.
Parameters:
prm A user provided parameter
lcb A handle to the LCB driver
This user supplied callback routine is called whenever the 20MHz LCB clock (on the LATp-side) makes a transition from the ON state to the OFF state. Currently the return code is unused, but should be specified as 0.
Warning:
Note that this callback runs in interrupt context, not task context.

unsigned int(* LCBD_clk_on_cb)(void *prm, LCBD lcb)

Callback routine to handle an CLOCK OFF -> ON transition.

Return values:
Status,currently unused, but the user should return 0.
Parameters:
prm A user provided parameter
lcb A handle to the LCB driver
This user supplied callback routine is called whenever the 20MHz LCB clock (on the LATp-side) makes a transition from the OFF state to the ON state. Currently the return code is unused, but should be specified as 0.
Warning:
Note that this callback runs in interrupt context, not task context.


Function Documentation

unsigned int LCBD_clk_off_cb_set ( LCBD  lcb,
LCBD_clk_off_cb  cb,
void *  prm 
)

Establish interrupt callback for handling CLOCK ON -> OFF transitions.

Return values:
LCBD_OK 
Parameters:
lcb The LCB driver handle
cb The LCB clock on -> off transition handler
prm The LCB clock on -> off transition parameter

LCBD_clk_off_cbp LCBD_clk_off_cbp_get ( LCBD  lcb  ) 

Returns the callback routine for the CLOCK ON -> OFF transition plus its parameter.

Returns:
The callback routine plus it parameter
Parameters:
lcb The LCB driver handle

unsigned int LCBD_clk_on_cb_set ( LCBD  lcb,
LCBD_clk_on_cb  cb,
void *  prm 
)

Establish interrupt callback for handling CLOCK OFF -> ON transitions.

Return values:
LCBD_OK 
Parameters:
lcb The LCB driver handle
cb The LCB clock off -> on transition handler
prm The LCB clock off -> on transition parameter

LCBD_clk_on_cbp LCBD_clk_on_cbp_get ( LCBD  lcb  ) 

Returns the callback routine for the CLOCK ON -> OFF transition plus its parameter.

Returns:
The callback routine plus it parameter
Parameters:
lcb The LCB driver handle


Generated on Thu Mar 24 19:02:32 2011 by  doxygen 1.5.8