Doxygen Documentation

Main Index

Package Index

Package:

GTEM

Version:

V1-3-4

Marked:

(not marked)

Constituent:

gtem

Tag:

sun-gcc


Interface   Compound List   File List   Compound Members   File Members  

gGTIC.c File Reference

Implements command/response for the GTIC. More...

#include <string.h>
#include "gt_p.h"
#include "gTEM_p.h"
#include "GTEM/gGTIC.h"

Defines

#define __GTIC_REG_ADCS   (14)
 Constant for GTIC ADCS register number.


Functions

int gGTICcmd (gtemHandle gt, unsigned short temAddr, unsigned short opcode)
 Sends a dataless command to the GTIC address.

int gGTICload (gtemHandle gt, unsigned short temAddr, unsigned short reg, unsigned int value)
 Loads a register with value.

int gGTICread (gtemHandle gt, unsigned short temAddr, unsigned short reg, unsigned int *val)
 Reads a register returing value in val.

int gGTICreadEnv (gtemHandle gt, unsigned short temAddr, unsigned short *env)
 Reads a block of 8 16-bit ADC values for environmental quantities.


Detailed Description

Implements command/response for the GTIC.

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

Function Documentation

int gGTICcmd gtemHandle  gt,
unsigned short  temAddr,
unsigned short  opcode
 

Sends a dataless command to the GTIC address.

Parameters:
gt gtemHandle for TEM
temAddr TEM address of command
opcode opcode of command to send
Returns:
G_OK on success
Sends the dataless command specified by opcode to the GTIC address specified by temAddr.

int gGTICload gtemHandle  gt,
unsigned short  temAddr,
unsigned short  reg,
unsigned int  value
 

Loads a register with value.

Parameters:
gt gtemHandle for TEM
temAddr TEM address of command
reg register of GTIC to load
value 32-bit value to load into GTIC register
Returns:
G_OK on success
Loads the GTIC register specified by reg with value

int gGTICread gtemHandle  gt,
unsigned short  temAddr,
unsigned short  reg,
unsigned int *  val
 

Reads a register returing value in val.

Parameters:
gt gtemHandle for TEM
temAddr TEM address of command
reg register of GTIC to read
val pointer to storage to hold the response of the read command
Returns:
G_OK on success
Reads the GTIC register specified by reg. val is filled on return.

int gGTICreadEnv gtemHandle  gt,
unsigned short  temAddr,
unsigned short *  env
 

Reads a block of 8 16-bit ADC values for environmental quantities.

Parameters:
gt gtemHandle for TEM
temAddr TEM address of command
env pointer to storage to hold 8 * 16-bit environmental quantities
Returns:
G_OK on success
Reads the GTIC ADCS register which returns 8 12-bit environmental ADC values. This function returns the data as 8 16-bit values.


Generated on Sat Nov 15 15:37:02 2003 by doxygen 1.3.3