GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIH / V0-2-7 > lih / linux-gcc
#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>
Classes | |
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) |
#define | LIH_M_AEM_ADC_TO (0x1000) |
Typedefs | |
typedef struct _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 __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, void **prm, unsigned int *minor) |
Initialize the AEM acquisition. |
CVS $Id: LIH_AEM.c,v 1.4 2011/03/29 22:38:00 apw Exp $
void AEMacquire | ( | LIH_Control * | hcb, | |
void * | prm, | |||
unsigned int | minor | |||
) | [static] |
Acquire AEM environmental data for the requested minor cycle.
hcb | (in) Control block | |
prm | (in) User parameter (AEM control block) | |
minor | (in) Minor (AEM) cycle |
References _LIH_Put::adc, _AEM_Control::adc, _LIH_Database::cnt, copy_env(), _LIH_Database::hpk, _LIH_Put::hpk, LIH_hpk2aidx, LIH_limitCheck(), _LIH_Put::nxt, _LIH_Control::online, _LIH_Control::pdb, _AEM_Control::pwr, _AEM_Control::src, _LIH_Packet::tim, and _AEM_Control::xcb.
Referenced by LIH_AEMinit().
static __inline void copy_env | ( | unsigned short * | dst, | |
const unsigned short * | src | |||
) | [static] |
Expand/copy ADCs from result list to target packet.
dst | (in) Destination | |
src | (in) Source |
unsigned int LIH_AEMinit | ( | LIH_Control * | hcb, | |
LIH_cb_Acquire * | acq, | |||
void ** | prm, | |||
unsigned int * | minor | |||
) |
Initialize the AEM acquisition.
hcb | (in) Control block | |
acq | (out) AEM acquisition routine | |
prm | (out) AEM acquisition routine parameter | |
minor | (out) Number of minor cycles needed for AEM acquisition |
References _AEM_Control::adc, _LIH_Packet::adc, _LIH_Put::adc, AEMacquire(), _LIH_Source::hdx, _LIH_Database::hpk, _LIH_Put::hpk, _LIH_Control::lcbd, LIH_Adc2source, LIH_hpk2ADC, LIH_K_DVC_AEM, LIH_pwr2source, load_reg(), _AEM_Control::mem, _LIH_Source::mpx, _LIH_Put::nxt, _LIH_Control::pdb, _AEM_Control::pwr, read_ctl(), read_reg(), _AEM_Control::src, and _AEM_Control::xcb.
Referenced by initializeAcq().
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.
ci | (in) Command item pointer (LCBD version) | |
reg | (in) AEM (environmental) register index | |
stall | (in) Stall time (LCB 20 MHz tics) |
Referenced by LIH_AEMinit().
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.
ci | (in) Command item pointer (LCBD version) | |
stall | (in) Stall time (LCB 20 MHz tics) |
Referenced by LIH_AEMinit().
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.
ci | (in) Command item pointer (LCBD version) | |
reg | (in) AEM (environmental) register index | |
stall | (in) Stall time (LCB 20 MHz tics) |