Doxygen Documentation

Main Index

Package Index

Package:

GNAT

Version:

V1-0-23

Marked:

(not marked)

Constituent:

gnat

Tag:

sun-gcc


Interface   Compound List   File List   Compound Members   File Members  

ginit.c File Reference

Implements the ginit methods. More...

#include <stdlib.h>
#include <string.h>
#include "GNAT/log.h"
#include "GNAT/ginit.h"
#include "GNAT/VME.h"
#include "GNAT/gio.h"
#include "gnat_p.h"

Include dependency graph for ginit.c:

Include dependency graph

Defines

#define PACKET_READY_INTR_LEVEL   (3)
 The interrupt level for indicating a complete packet in the record FIFO.

#define PACKET_READY_INTR_VECTOR   (200)
 The interrupt vector indicating a complete packet in the record FIFO.

#define CMD_CHNL_NUM   (7)
 The default out going command channel number in the range 0 - 15.

#define CLK_CHNL_NUM   (0)
 The default out going clock channel number in the range 0 - 15.


Functions

unsigned int gSizeOfGh (void)
 Hides the private implemenation of the gnat registers. Allows user to allocate memory.

int gInitDrv (void)
 Driver wide initialization: allocate memory, semaphores, etc...

int gInitDev (void)
 Device initialization: flush buffers, init registers, etc...

int gOpen (gnatHandle gh, unsigned int physAddr)
 maps the physical address to an instance of the driver object

int gClose (gnatHandle gh)
 shuts down the device attached to handle

int gGetLogicalAddr (gnatHandle gh, unsigned int *addr)
 returns the logical address attached to handle

int gGetPhysAddr (gnatHandle gh, unsigned int *addr)
 returns the physical address attached to handle

int gGetDriverInfo (DriverInfo *di)
 fills in driver info struct

int gGetHardwareInfo (gnatHandle gh, HardwareInfo *hi)
 fills in hardware info struct


Detailed Description

Implements the ginit methods.

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

Function Documentation

int gClose gnatHandle  gh  ) 
 

shuts down the device attached to handle

Parameters:
gh handle of device to close
Returns:
OK if close successful
See also:
gOpen()

int gGetDriverInfo DriverInfo di  ) 
 

fills in driver info struct

Parameters:
di pointer to storage to hold driver info
Returns:
G_OK on successs

int gGetHardwareInfo gnatHandle  gh,
HardwareInfo hi
 

fills in hardware info struct

Parameters:
gh handle of device
hi pointer to storage to hold hardware info
Returns:
G_OK on successs

Here is the call graph for this function:

int gGetLogicalAddr gnatHandle  gh,
unsigned int *  addr
 

returns the logical address attached to handle

Parameters:
gh handle of device to close
addr pointer to storage for holding logical address
Returns:
G_OK on successs
See also:
gOpen()

int gGetPhysAddr gnatHandle  gh,
unsigned int *  addr
 

returns the physical address attached to handle

Parameters:
gh handle of device to close
addr pointer to storage for holding physical address
Returns:
G_OK on successs
See also:
gOpen()

gInitDev void   ) 
 

Device initialization: flush buffers, init registers, etc...

Returns:
G_OK on success
See also:
gInitDev()

gInitDrv void   ) 
 

Driver wide initialization: allocate memory, semaphores, etc...

Returns:
G_OK on success
See also:
gInitDev()

gOpen gnatHandle  gh,
unsigned int  physAddr
 

maps the physical address to an instance of the driver object

Parameters:
gh gnat driver handle previously allocated
physAddr the physical address of the comm IO board
Returns:
OK for success
See also:
gClose()
Attempts to map physAddr into a local (logical) address. If successful it binds the physical and logical address to the driver object refered to by handle. If unsucessful it clears both the physical and local address for handle and returns ERROR.

Here is the call graph for this function:

unsigned int gSizeOfGh void   ) 
 

Hides the private implemenation of the gnat registers. Allows user to allocate memory.

Returns:
the size of struct _gnat
See also:
gOpen()


Generated on Tue Apr 6 11:12:19 2004 by doxygen 1.3.3