GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIH / V0-2-5 > lih / mv2304
#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 | _PDU_Control |
Control structure for PDU environmental readout. More... | |
Defines | |
#define | LIH_L_PDU (2) |
#define | LIH_L_PDU_CYCLE (2) |
#define | LIH_L_PDU_PER_CYCLE (1) |
#define | LIH_L_PWR_PER_PDU (3) |
#define | LIH_L_MPX_PER_PDU (8) |
#define | LIH_L_REG_PER_MPX (3) |
#define | LIH_L_ADC_PER_MPX (20) |
#define | LIH_K_ACD_PWR_REG (2) |
Typedefs | |
typedef struct _PDU_Control | PDU_Control |
Typedef for struct _PDU_Control. | |
Functions | |
static void | PDUacquire (LIH_Control *hcb, void *prm, unsigned int minor) |
Acquire PDU environmental data for the requested minor cycle. | |
static __inline void | copy_env (unsigned int pdu, unsigned int mpx, unsigned short *dst, const unsigned short *rpa[3]) |
Expand/copy ADCs from result list to target packet. | |
static __inline LCB_ci * | load_mpx (LCB_ci_cmd *ci, unsigned int pdu, unsigned int mpx, unsigned int stall) |
Insert a command to set a PDU's ADC group multiplexer. | |
static __inline LCB_ci * | read_env (LCB_ci_cmdr *ci, unsigned int pdu, unsigned int reg, unsigned int stall) |
Insert a command to read a PDU's environmental monitor ADCs. | |
static __inline LCB_ci * | read_reg (LCB_ci_cmd *ci, unsigned int pdu, unsigned int reg, unsigned int stall) |
Insert a command to set a PDU's ADC group multiplexer. | |
unsigned int | LIH_PDUinit (LIH_Control *hcb, LIH_cb_Acquire *acq, void **prm, unsigned int *minor) |
Initialize the PDU hardware acquisition. |
CVS $Id: LIH_PDU.c,v 1.3 2008/08/28 21:02:56 apw Exp $
static __inline void copy_env | ( | unsigned int | pdu, | |
unsigned int | mpx, | |||
unsigned short * | dst, | |||
const unsigned short * | rpa[3] | |||
) | [static] |
Expand/copy ADCs from result list to target packet.
pdu | (in) PDU | |
mpx | (in) Multiplexer number | |
dst | (in) Destination | |
rpa | (in) Register pointer array |
unsigned int LIH_PDUinit | ( | LIH_Control * | hcb, | |
LIH_cb_Acquire * | acq, | |||
void ** | prm, | |||
unsigned int * | minor | |||
) |
Initialize the PDU hardware acquisition.
hcb | (in) Control block | |
acq | (out) PDU acquisition routine | |
prm | (out) PDU acquisition routine parameter | |
minor | (out) Number of minor cycles needed for PDU acquisition |
static __inline LCB_ci * load_mpx | ( | LCB_ci_cmd * | ci, | |
unsigned int | pdu, | |||
unsigned int | mpx, | |||
unsigned int | stall | |||
) | [static] |
Insert a command to set a PDU's ADC group multiplexer.
ci | (in) Command item pointer (LCBD version) | |
pdu | (in) PDU | |
mpx | (in) Multiplexer number | |
stall | (in) Stall time (LCB 20 MHz tics) |
void PDUacquire | ( | LIH_Control * | hcb, | |
void * | prm, | |||
unsigned int | minor | |||
) | [static] |
Acquire PDU environmental data for the requested minor cycle.
hcb | (in) Control block | |
prm | (in) User parameter (PDU control block) | |
minor | (in) Minor (PDU) cycle |
static __inline LCB_ci * read_env | ( | LCB_ci_cmdr * | ci, | |
unsigned int | pdu, | |||
unsigned int | reg, | |||
unsigned int | stall | |||
) | [static] |
Insert a command to read a PDU's environmental monitor ADCs.
ci | (in) Command item pointer (LCBD version) | |
pdu | (in) PDU | |
reg | (in) Environmental register | |
stall | (in) Stall time (LCB 20 MHz tics) |
static __inline LCB_ci * read_reg | ( | LCB_ci_cmd * | ci, | |
unsigned int | pdu, | |||
unsigned int | reg, | |||
unsigned int | stall | |||
) | [static] |
Insert a command to set a PDU's ADC group multiplexer.
ci | (in) Command item pointer (LCBD version) | |
pdu | (in) PDU | |
reg | (in) Power register number (offset from "CRATES" register) | |
stall | (in) Stall time (LCB 20 MHz tics) |