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.h File Reference

Defines the creation and initialization methods for the gnat driver. More...

#include "GNAT/gnat.h"

Include dependency graph for ginit.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Data Structures

struct  _driverInfo
 Common attributes about the driver version. More...

struct  _hardwareInfo
 Attributes for the hardware configuration. More...


Typedefs

typedef _driverInfo DriverInfo
 typedef for struct _driverInfo

typedef _hardwareInfo HardwareInfo
 typedef for struct _hardwareInfo


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 gGetDriverInfo (DriverInfo *di)
 fills in driver info struct

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

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


Detailed Description

Defines the creation and initialization methods for the gnat driver.

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()

int gInitDev void   ) 
 

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

Returns:
G_OK on success
See also:
gInitDev()

int gInitDrv void   ) 
 

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

Returns:
G_OK on success
See also:
gInitDev()

int 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:23 2004 by doxygen 1.3.3