GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > GNAT / dev

Constituent: gnat_trg     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

gtrg.c File Reference

Expose mini-GLT registers. More...

#include "GNAT/log.h"
#include "gnat_p.h"
#include "GNAT/gtrg.h"
#include "GNAT/gio.h"

Include dependency graph for gtrg.c:

Include dependency graph

Functions

int gGetTrgMaskCfgReg (gnatHandle gh, unsigned int *val)
 returns the contents of the trigger mask / config register

int gSetTrgMaskCfgReg (gnatHandle gh, unsigned int val)
 sets the contents of the trigger mask / config register

int gGetTrgOptReg (gnatHandle gh, unsigned int *val)
 returns the contents of the trigger options register

int gSetTrgOptReg (gnatHandle gh, unsigned int val)
 sets the contents of the trigger options register

int gSetTrgSelfTrg (gnatHandle gh)
 Creates a self trigger signal.

int gReadTrgMsg (gnatHandle gh, gResponse *rsp)
 Attempts to read a trigger message from record FIFO.


Detailed Description

Expose mini-GLT registers.

Author:
Curt Brune -- curt@slac.stanford.edu

Function Documentation

int gGetTrgMaskCfgReg gnatHandle  gh,
unsigned int *  val
 

returns the contents of the trigger mask / config register

Parameters:
gh handle of device
val pointer to storage to hold register on return
Returns:
OK on success
See also:
gSetTrgMaskCfgReg()

int gGetTrgOptReg gnatHandle  gh,
unsigned int *  val
 

returns the contents of the trigger options register

Parameters:
gh handle of device
val pointer to storage to hold register on return
Returns:
OK on success
See also:
gSetTrgOptReg()

int gReadTrgMsg gnatHandle  gh,
gResponse *  rsp
 

Attempts to read a trigger message from record FIFO.

Parameters:
gh handle of device
rsp pointer to response structure to hold the result
Returns:
OK on success

The trigger message is 32 bits long and looks like this in the record FIFO (18 bits wide).

----------------------------------- 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 ----------------------------------- Word 1 1 M M M M M M M M M M M M M M M M M Word 2 D D M M M M M M M M M M M M M M Z Z Word 3 D D Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Word 4 D D Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Word 5 D D Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Word 6 D D Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Word 7 D D Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Word 8 D D Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Word 9 D D Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Word 10 D D Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z

Legend:

1 -- Start Bit, first bit of trigger message M -- Message bit, 31 in all D -- Do not care, ignored Z -- Zero

I want to return the start bit plus the 31 message bits.

int gSetTrgMaskCfgReg gnatHandle  gh,
unsigned int  val
 

sets the contents of the trigger mask / config register

Parameters:
gh handle of device
val value to put in register
Returns:
OK on success
See also:
gGetTrgMaskCfgReg()

int gSetTrgOptReg gnatHandle  gh,
unsigned int  val
 

sets the contents of the trigger options register

Parameters:
gh handle of device
val value to put in register
Returns:
OK on success
See also:
gGetTrgOptReg()

int gSetTrgSelfTrg gnatHandle  gh  ) 
 

Creates a self trigger signal.

Parameters:
gh handle of device
Returns:
OK on success

Raises the self trigger signal -- the COMM board may ignore this signal if the internal trigger is disable (see gSetTrgMask() ).


Generated on Thu Oct 21 08:31:44 2004 by doxygen 1.3.3