GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LIH / V0-1-0

Constituent: lih     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LIH_AEM.c File Reference

AEM specific environmental monitor acquisition. More...

#include <string.h>
#include "LCBD/LCBC.h"
#include "LCBD/LCBD_rst.h"
#include "LCBD/LCBR.h"
#include "LEM/encode_macros.h"
#include "LEM/encode_structs.h"
#include "LHK/LHK_pubdefs.h"
#include "LIH_DB/LIH_DB_ADCdefs.h"
#include "MDB/MDB_pubdefs.h"
#include "PBS/FFS.ih"
#include "PBS/MBA.h"
#include "LIH/LIH_msgs.h"
#include "LIH_prvdefs.h"

Include dependency graph for LIH_AEM.c:


Data Structures

struct  _AEM_Control
 Control structure for AEM environmental readout. More...

Defines

#define LIH_L_AEM_CYCLE   (1)
#define LIH_L_REG_PER_AEM   (13)
#define LIH_L_ADC_PER_REG   (4)

Typedefs

typedef _AEM_Control AEM_Control
 Typedef for struct _AEM_Control.

Functions

static void AEMacquire (LIH_Control *hcb, void *prm, unsigned int minor)
 Acquire AEM environmental data for the requested minor cycle.
static void AEMreference (LIH_Control *hcb, void *prm, LIH_DB_ADC adx, unsigned int able)
 Update the limit reference counter.
static __inline void copy_env (unsigned short *dst, const unsigned short *src)
 Expand/copy ADCs from result list to target packet.
static __inline LCB_ci * load_reg (LCB_ci_cmd *ci, unsigned int reg, unsigned int stall)
 Insert a command to write to an AEM ADC register.
static __inline LCB_ci * read_ctl (LCB_ci_cmdr *ci, unsigned int stall)
 Insert a command to read the AEM's FREE board power switch register.
static __inline LCB_ci * read_reg (LCB_ci_cmdr *ci, unsigned int reg, unsigned int stall)
 Insert a command to read an AEM environmental monitor ADC register.
unsigned int LIH_AEMinit (LIH_Control *hcb, LIH_cb_Acquire *acq, LIH_cb_Reference *ref, void **prm, unsigned int *minor)
 Initialize the AEM acquisition.

Detailed Description

AEM specific environmental monitor acquisition.

CVS $Id: LIH_AEM.c,v 1.2 2007/12/07 03:59:21 apw Exp $
Author:
A.P.Waite
LIH_AEM.c provides all the AEM specific functionality to acquire AEM environmental monitoring quantities and store the results in the hardware packet database.

Function Documentation

void AEMacquire LIH_Control hcb,
void *  prm,
unsigned int  minor
[static]
 

Acquire AEM environmental data for the requested minor cycle.

Parameters:
hcb (in) Control block
prm (in) User parameter (AEM control block)
minor (in) Minor (AEM) cycle

static void AEMreference LIH_Control hcb,
void *  prm,
LIH_DB_ADC  adx,
unsigned int  able
[static]
 

Update the limit reference counter.

Parameters:
hcb (in) Control block
prm (in) User parameter (AEM control block)
adx (in) ADC index (in LIH_DB_ADCdefs.h)
able (in) Enable/disable flag (boolean, 1 => enable)

static __inline void copy_env unsigned short *  dst,
const unsigned short *  src
[static]
 

Expand/copy ADCs from result list to target packet.

Parameters:
dst (in) Destination
src (in) Source

unsigned int LIH_AEMinit LIH_Control hcb,
LIH_cb_Acquire acq,
LIH_cb_Reference ref,
void **  prm,
unsigned int *  minor
 

Initialize the AEM acquisition.

Parameters:
hcb (in) Control block
acq (out) AEM acquisition routine
ref (out) AEM limit reference counter
prm (out) AEM acquisition routine parameter
minor (out) Number of minor cycles needed for AEM acquisition

static __inline LCB_ci * load_reg LCB_ci_cmd *  ci,
unsigned int  reg,
unsigned int  stall
[static]
 

Insert a command to write to an AEM ADC register.

Parameters:
ci (in) Command item pointer (LCBD version)
reg (in) AEM (environmental) register index
stall (in) Stall time (LCB 20 MHz tics)

static __inline LCB_ci * read_ctl LCB_ci_cmdr *  ci,
unsigned int  stall
[static]
 

Insert a command to read the AEM's FREE board power switch register.

Parameters:
ci (in) Command item pointer (LCBD version)
stall (in) Stall time (LCB 20 MHz tics)

static __inline LCB_ci * read_reg LCB_ci_cmdr *  ci,
unsigned int  reg,
unsigned int  stall
[static]
 

Insert a command to read an AEM environmental monitor ADC register.

Parameters:
ci (in) Command item pointer (LCBD version)
reg (in) AEM (environmental) register index
stall (in) Stall time (LCB 20 MHz tics)


Generated on Fri Dec 7 01:36:04 2007 by  doxygen 1.4.4