GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GNAT / V2-0-1 > gnat_cio / sun-gcc
#include "GNAT/gnat.h"
#include "GNAT/info.h"
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 |
int gClose | ( | gnatHandle | gh | ) |
shuts down the device attached to handle
gh | handle of device to close |
References G_OK, GERR_BAD_HANDLE, _gnat::m_active, _gnat::m_baseAddr, _gnat::m_irqLevel, _gnat::m_localAddr, and _gnat::m_physAddr.
int gGetDriverInfo | ( | DriverInfo * | di | ) |
fills in driver info struct
di | pointer to storage to hold driver info |
References _driverInfo::compiler, _driverInfo::driverBuildDate, _driverInfo::driverDesc, _driverInfo::driverName, _driverInfo::driverVersion, _driverInfo::drvMajRevision, _driverInfo::drvMinRevision, _driverInfo::drvPatchLevel, G_OK, and GERR_BAD_PARAM.
int gGetHardwareInfo | ( | gnatHandle | gh, | |
HardwareInfo * | hi | |||
) |
fills in hardware info struct
gh | handle of device | |
hi | pointer to storage to hold hardware info |
References _hardwareInfo::fwRev, _hardwareInfo::fwVer, G_OK, GERR_BAD_PARAM, gGetAddr(), gGetIrqLevel(), gGetIrqVector(), gGetLogicalAddr(), gGetPhysAddr(), gHWver(), gSWver(), _hardwareInfo::hwRev, _hardwareInfo::hwVer, _hardwareInfo::irqLevel, _hardwareInfo::irqVec, _hardwareInfo::logicAddr, _hardwareInfo::physAddr, and _hardwareInfo::sourceAddr.
int gGetLogicalAddr | ( | gnatHandle | gh, | |
unsigned int * | addr | |||
) |
returns the logical address attached to handle
gh | handle of device to close | |
addr | pointer to storage for holding logical address |
References G_OK, GERR_BAD_HANDLE, GERR_BAD_PARAM, and _gnat::m_localAddr.
Referenced by gGetHardwareInfo().
int gGetPhysAddr | ( | gnatHandle | gh, | |
unsigned int * | addr | |||
) |
returns the physical address attached to handle
gh | handle of device to close | |
addr | pointer to storage for holding physical address |
References G_OK, GERR_BAD_HANDLE, GERR_BAD_PARAM, and _gnat::m_physAddr.
Referenced by gGetHardwareInfo().
gInitDev | ( | void | ) |
Device initialization: flush buffers, init registers, etc...
References G_OK.
gInitDrv | ( | void | ) |
Driver wide initialization: allocate memory, semaphores, etc...
References G_OK.
gOpen | ( | gnatHandle | gh, | |
unsigned int | physAddr | |||
) |
maps the physical address to an instance of the driver object
gh | gnat driver handle previously allocated | |
physAddr | the physical address of the comm IO board |
References CLK_CHNL_NUM, CMD_CHNL_NUM, G_OK, GERR_ADDR_MAP, GERR_BAD_HANDLE, GERR_MEM, gHasVASU(), gProbe(), _gnat::m_active, _gnat::m_baseAddr, _gnat::m_bndlDepth, _gnat::m_clkChannel, _gnat::m_cmdChannel, _gnat::m_detect, _gnat::m_intCount, _gnat::m_irqLevel, _gnat::m_irqVec, _gnat::m_latpIntr, _gnat::m_localAddr, _gnat::m_nSkipRsp, _gnat::m_outMask, _gnat::m_physAddr, _gnat::m_vasu, MAX_BNDL_DEPTH, PACKET_READY_INTR_LEVEL, PACKET_READY_INTR_VECTOR, and _LATp_Interface::timeout.
unsigned int gSizeOfGh | ( | void | ) |