Doxygen Documentation

Main Index

Package Index

Package:

GAEM

Version:

V2-1-2

Marked:

(not marked)

Constituent:

gaem

Tag:

sun-gcc


Interface   Compound List   File List   Compound Members   File Members  

gACD.c File Reference

Implements command/response for off board ACD modules. More...

#include <string.h>
#include "ga_p.h"
#include "gAEM_p.h"
#include "gACD_p.h"

Functions

void setAEMextAD (gaemHandle ga, unsigned short type, unsigned short addr, unsigned short func, unsigned short opcode, unsigned short value, aemExtAD *ad)
void packPayloadACD (gaemHandle ga, cmdHeaderLATp ch, aemExtAD ad, unsigned int *payload)
 Packs ch and ad into the 64-bit payload.

int __ACDcmd (gaemHandle ga, unsigned short type, unsigned short garcAddr, unsigned short funcBlock, unsigned short func, unsigned short funcOpcode, unsigned int value)
 Generic routine for sending response-less commands to GARC.

int __ACDread (gaemHandle ga, unsigned short type, unsigned short garcAddr, unsigned short funcBlock, unsigned short func, unsigned short funcOpcode, unsigned int *value)
 Generic routine for reading GARC/GAFE registers.


Detailed Description

Implements command/response for off board ACD modules.

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

Function Documentation

int __ACDcmd gaemHandle  ga,
unsigned short  type,
unsigned short  garcAddr,
unsigned short  funcBlock,
unsigned short  func,
unsigned short  funcOpcode,
unsigned int  value
 

Generic routine for sending response-less commands to GARC.

Parameters:
ga gaemHandle for AEM
type single bit indicating GARC/GAFE
garcAddr GARC address of command
funcBlock GARC function block code
func command/response function code
funcOpcode fucntion opcode for GARC function block
value 16-bit value to load into GARC register
Returns:
G_OK on success
Common subroutine for sending dataless commands and loading GARC registers. The func parameter indicates a "dataless" or "load" command.

int __ACDread gaemHandle  ga,
unsigned short  type,
unsigned short  garcAddr,
unsigned short  funcBlock,
unsigned short  func,
unsigned short  funcOpcode,
unsigned int *  value
 

Generic routine for reading GARC/GAFE registers.

Parameters:
ga gaemHandle for AEM
type single bit indicating GARC/GAFE
garcAddr GARC address of command
funcBlock GARC function block code
func command/response function code
funcOpcode fucntion opcode for GARC function block
value pointer to hold 16-bit register value
Returns:
G_OK on success
Common subroutine for reading GARC/GAFE registers.

void packPayloadACD gaemHandle  ga,
cmdHeaderLATp  ch,
aemExtAD  ad,
unsigned int *  payload
 

Packs ch and ad into the 64-bit payload.

Parameters:
ga gaemHandle for AEM
ch 9-bit command header word (in MSB)
ad 32-bit external access descriptor word
payload pointer to 64-bits of pre-allocated storage
Returns:
void
Packs the bits of ch and ad into the 64-bits pointed to by payload. The packing is specific to external "off board" registers for the GARC and GAFE.

The format of the bits goes as:

9 bit AEM command header + 1 start bit + 32 bit ext AD + 1 command parity bit

void setAEMextAD gaemHandle  ga,
unsigned short  type,
unsigned short  addr,
unsigned short  func,
unsigned short  opcode,
unsigned short  value,
aemExtAD ad
 

Parameters:
ga GAEM driver handle previously allocated
type single bit indicating GARC/GAFE
addr GARC function block or GAFE address
func read, write or dataless command
opcode GARC function code or GAFE register
value 16-bit payload for write commands
ad pointer to storage for access descriptor
Returns:
void


Generated on Sat Nov 15 15:42:28 2003 by doxygen 1.3.3