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  

gGTCC.c File Reference

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

#include <string.h>
#include "gt_p.h"
#include "gTKR_p.h"
#include "GTEM/gGTCC.h"

Functions

void setCmdHeaderTKR (gtemHandle gt, cmdHeaderTKR *ch, unsigned short ext, unsigned short gtccAddr)
 initializes a command header structure for a GTCC

int __gtccCmdLoad (gtemHandle gt, unsigned short temAddr, unsigned short gtccAddr, unsigned short func, unsigned short reg, unsigned int value)
 Generic routine for sending response-less commands.

int gGTCCcmd (gtemHandle gt, unsigned short temAddr, unsigned short gtccAddr, unsigned short opcode)
 Sends a dataless command to the TEM address.

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

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


Detailed Description

Implements command/response for the GTCC.

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

Function Documentation

static int __gtccCmdLoad gtemHandle  gt,
unsigned short  temAddr,
unsigned short  gtccAddr,
unsigned short  func,
unsigned short  reg,
unsigned int  value
[static]
 

Generic routine for sending response-less commands.

Parameters:
gt gtemHandle for TEM
temAddr TEM address of command
gtccAddr GTCC address of command
func command/response function code
reg register of GTCC to load
value 32-bit value to load into GTCC register
Returns:
G_OK on success
Common subroutine for sending dataless commands and loading GTCC registers. The func parameter indicates a "dataless" or "load" command.

For dataless commands reg is interpreted as the "opcode" of the dataless command and value is ignored.

For load commands reg is the GTCC register to load with value.

int gGTCCcmd gtemHandle  gt,
unsigned short  temAddr,
unsigned short  gtccAddr,
unsigned short  opcode
 

Sends a dataless command to the TEM address.

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

int gGTCCload gtemHandle  gt,
unsigned short  temAddr,
unsigned short  gtccAddr,
unsigned short  reg,
unsigned int  value
 

Loads a register with value.

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

int gGTCCread gtemHandle  gt,
unsigned short  temAddr,
unsigned short  gtccAddr,
unsigned short  reg,
unsigned int *  val
 

Reads a register returing value in val.

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

The following error codes are returned when LATp errors occur:

  • GERR_LATP_HEADER_PARITY
  • GERR_LATP_CELL_PARITY
  • GERR_LATP_TRUNCATE

void setCmdHeaderTKR gtemHandle  gt,
cmdHeaderTKR ch,
unsigned short  ext,
unsigned short  gtccAddr
 

initializes a command header structure for a GTCC

Parameters:
gt gtemHandle for TEM
ch pointer to command header structure
ext set for "off board" commands, i.e. GTRC and GTFE commands
gtccAddr GTCC address
Returns:
G_OK on void


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