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

Constituent: gnat_xbrd     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

xbrd_init.c File Reference

Initialization methods for the LAT transition board interface. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "GNAT/log.h"
#include "GNAT/xbrd_hw.h"
#include "GNAT/VME.h"
#include "xbrd_p.h"

Include dependency graph for xbrd_init.c:

Include dependency graph

Functions

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

int __xbrd_Open (xbrdHandle gx, unsigned int physAddr)
 maps the physical address to an instance of the driver object

int xbrd_Open (xbrdHandle gx, unsigned int physAddr)
 Initializes a xbrd handle.

int xbrd_Init (xbrdHandle gx)
 Initializes transition board hardware.

int xbrd_Close (xbrdHandle gx)
 shuts down the device attached to handle

int xbrd_GetLogicalAddr (xbrdHandle gx, unsigned int *addr)
 returns the logical address attached to handle

int xbrd_GetPhysAddr (xbrdHandle gx, unsigned int *addr)
 returns the physical address attached to handle

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

int xbrd_PrintDriverInfo (xbrdHandle gx)
 prints XBRD driver info to stdout


Detailed Description

Initialization methods for the LAT transition board interface.

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

Function Documentation

__xbrd_Open xbrdHandle  gx,
unsigned int  physAddr
[static]
 

maps the physical address to an instance of the driver object

Parameters:
gx xbrd 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:

int xbrd_Close xbrdHandle  gx  ) 
 

shuts down the device attached to handle

Parameters:
gx xbrd device handle
Returns:
OK if close successful
See also:
gOpen()

int xbrd_GetDriverInfo DriverInfo di  ) 
 

fills in driver info struct

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

int xbrd_GetLogicalAddr xbrdHandle  gx,
unsigned int *  addr
 

returns the logical address attached to handle

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

int xbrd_GetPhysAddr xbrdHandle  gx,
unsigned int *  addr
 

returns the physical address attached to handle

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

int xbrd_Init xbrdHandle  gx  ) 
 

Initializes transition board hardware.

Parameters:
gx xbrd handle
Returns:
G_OK on success
See source code for laundry list of initiailizations.

Here is the call graph for this function:

xbrd_Open xbrdHandle  gx,
unsigned int  physAddr
 

Initializes a xbrd handle.

Parameters:
gx xbrd handle previously allocated
physAddr physical address of transition board
Returns:
OK for success
See also:
xbrd_Close()

Here is the call graph for this function:

int xbrd_PrintDriverInfo xbrdHandle  gx  ) 
 

prints XBRD driver info to stdout

Parameters:
gx xbrd device handle
Returns:
G_OK on successs

Here is the call graph for this function:

unsigned int xbrd_SizeOf void   ) 
 

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

Returns:
the size of struct _xbrd
See also:
xbrd_Open()


Generated on Fri Oct 22 04:27:32 2004 by doxygen 1.3.3