GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GNAT / V2-0-1 > gnat_cio / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

gio.h File Reference

Defines the input/output methods for the gnat driver. More...

#include "GNAT/gnat.h"

Functions

int gReset (gnatHandle gh)
 resets the board referenced by handle. Returns the board to a known state.
int gFlushAllF (gnatHandle gh)
 flushes the record and playback FIFOs of the board referenced by handle.
int gFlushRF (gnatHandle gh)
 flushes the record FIFO of the board referenced by handle.
int gFlushPF (gnatHandle gh)
 flushes the playback FIFO of the board referenced by handle.
int gProbe (gnatHandle gh)
 attempts to probe the local address previously determined by gMapAddr()
int gHWver (gnatHandle gh, unsigned short int *version, unsigned short int *revision)
 fetchs the hardware version and revision numbers from the board
int gSWver (gnatHandle gh, unsigned short int *version, unsigned short int *revision)
 fetchs the software version and revision numbers from the board
int gWritePF16 (gnatHandle gh, unsigned short int val)
 writes the 16-bit short word val to the play back FIFO
int gWritePF16n (gnatHandle gh, unsigned short int nItem, unsigned short int val)
 writes the 16-bit short word val to the play back FIFO nItem times
int gWritePF16v (gnatHandle gh, unsigned short int nVal, unsigned short int *aVal)
 writes the array of 16-bit short words aVal to the play back FIFO
int gWritePF32 (gnatHandle gh, unsigned int val)
 writes the 32-bit word val to the play back FIFO
int gWritePF32n (gnatHandle gh, unsigned short int nItem, unsigned int val)
 writes the 32-bit word val to the play back FIFO
int gWritePF32v (gnatHandle gh, unsigned int nVal, unsigned int *aVal)
 writes the array of 32-bit words aVal to the play back FIFO
int gReadRF16 (gnatHandle gh, unsigned short int *val)
 reads a 16-bit short word from record FIFO and stores it val
int gReadRF16v (gnatHandle gh, unsigned short int nVal, unsigned short int *aVal)
 reads nVal 16-bit short words from the record FIFO and stores them in aVal
int gReadRF32 (gnatHandle gh, unsigned int *val)
 reads a 32-bit word from record FIFO and stores it val
int gReadRF32v (gnatHandle gh, unsigned int nVal, unsigned int *aVal)
 reads nVal 32-bit words from the record FIFO and stores them in aVal
int gEnableAllF (gnatHandle gh)
 Prepares both the playback and record FIFOs for writing, by taking them out of reset.
int gEnablePF (gnatHandle gh)
 Prepares the play back FIFO for writing, by taking it out of reset.
int gEnableRF (gnatHandle gh)
 Prepares the record FIFO for writing, by taking it out of reset.
int gEnableClk0 (gnatHandle gh)
 Enables continuous clock on channel 0, generated by board.
int gFlushPipeline (gnatHandle gh)
 Purges stale cruft from internal FPGA state machine.
int gClrALLhist (gnatHandle gh)
 Clears the latched occupancy status for both Playback and Record FIFOs.
int gClrPFhist (gnatHandle gh)
 Clears the latched occupancy status for the Playback FIFOs.
int gClrRFhist (gnatHandle gh)
 Clears the latched occupancy status for the record FIFO.
int gIsEmptyRF (gnatHandle gh)
 Checks if the record FIFO is empty.
int gStartPB (gnatHandle gh)
 Start the playblack sequence.
int gSetAcqSrc (gnatHandle gh, unsigned int src)
 Set the source for initiating playback.
int gSetRecDly (gnatHandle gh, unsigned char dly)
 Set the delay for the read back FIFO.
int gSetClkDly (gnatHandle gh, unsigned char dly)
 Set the delay for the channel 0 clock.
int gSetIrqDelay (gnatHandle gh, unsigned int dly)
 Set interrupt delay for this gnatHandle.
int gSetIrqLevel (gnatHandle gh, unsigned int level)
 Set interrupt level for this gnatHandle.
int gGetIrqLevel (gnatHandle gh, unsigned int *level)
 Get interrupt level for this gnatHandle.
int gSetIrqVector (gnatHandle gh, unsigned int vector)
 Set interrupt vector for this gnatHandle.
int gGetIrqVector (gnatHandle gh, unsigned int *vector)
 Get interrupt vector for this gnatHandle.
int gConnectIrq (gnatHandle gh)
 Prepares driver and board for interrupts.
int gEnableIrq (gnatHandle gh)
 Enables interrupt.
int gDisableIrq (gnatHandle gh)
 Disables interrupt.
int gSetOutMask (gnatHandle gh, unsigned int mask)
 Sets the output XOR bit mask used when writing to the FIFO.
int gGetOutMask (gnatHandle gh, unsigned int *mask)
 Gets the output XOR bit mask used when writing to the FIFO.
int gTakeIntSem (gnatHandle gh)
 Takes the interrupt sync semaphore.
int gSetActive (gnatHandle gh, unsigned int mode)
 Set active member for gnatHandle.
int gGetActive (gnatHandle gh, unsigned int *mode)
 Returns current active mode for gnatHandle.
int gVersion (gnatHandle gh, unsigned short hwVer, unsigned short hwRev, unsigned short swVer, unsigned short swRev)
 Checks the COMM Board hardware version/revision.
int gCommReady (gnatHandle gh, int timeOut)
 Waits for the COMM board to become ready, via polling.
int gLockFIFO (gnatHandle gh, int timeOut)
 Locks access to the COMM board FIFO.
int gUnLockFIFO (gnatHandle gh)
 Unlocks access to the COMM board FIFO.
int gGetCmdChnl (gnatHandle gh)
 Wrapper for fetching value of gh->m_cmdChannel.
int gSetCmdChnl (gnatHandle gh, unsigned char chnl)
 Sets the outgoing command number for the clock line.
int gHasVASU (gnatHandle gh)
 Returns non-zero if VASU board detected.


Detailed Description

Defines the input/output methods for the gnat driver.

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

Function Documentation

int gClrALLhist ( gnatHandle  gh  ) 

Clears the latched occupancy status for both Playback and Record FIFOs.

Parameters:
gh handle of device
Returns:
OK on success
See also:
gClrPFhist(), gClrRFhist()
Clears the occupancy status flags ( Empty, Full, Almost Empty, Almost Full ) for both the record FIFO and the playback FIFO.

References _regStatus::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_statReg, _BFregStatus::pfael, _BFregStatus::pfafl, _BFregStatus::pfel, _BFregStatus::pffl, _BFregStatus::rfael, _BFregStatus::rfafl, _BFregStatus::rfel, _BFregStatus::rffl, _regStatus::ui, and VERIFY_HANDLE.

int gClrPFhist ( gnatHandle  gh  ) 

Clears the latched occupancy status for the Playback FIFOs.

Parameters:
gh handle of device
Returns:
OK on success
See also:
gClrRFhist(), gClrALLhist()
Clears the occupancy status flags ( Empty, Full, Almost Empty, Almost Full ) for the playback FIFO.

References _regStatus::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_statReg, _BFregStatus::pfael, _BFregStatus::pfafl, _BFregStatus::pfel, _BFregStatus::pffl, _regStatus::ui, and VERIFY_HANDLE.

int gClrRFhist ( gnatHandle  gh  ) 

Clears the latched occupancy status for the record FIFO.

Parameters:
gh handle of device
Returns:
OK on success
See also:
gClrPFhist(), gClrALLhist()
Clears the occupancy status flags ( Empty, Full, Almost Empty, Almost Full ) for the record FIFO.

References _regStatus::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_statReg, _BFregStatus::rfael, _BFregStatus::rfafl, _BFregStatus::rfel, _BFregStatus::rffl, _regStatus::ui, and VERIFY_HANDLE.

int gCommReady ( gnatHandle  gh,
int  timeOut 
)

Waits for the COMM board to become ready, via polling.

Parameters:
gh gnat driver handle previously allocated
timeOut timeout value in sysclk ticks
Returns:
G_OK on success or GERR_READY_TIMEOUT on timeout.

References _regStatus::bf, G_OK, GERR_READY_TIMEOUT, _gnat::m_baseAddr, _regBlock::m_statReg, _BFregStatus::runState, and _regStatus::ui.

Referenced by gSendPacket().

int gConnectIrq ( gnatHandle  gh  ) 

Prepares driver and board for interrupts.

Parameters:
gh handle of device
Returns:
OK on success

References G_OK, _gnat::m_irqVec, srvIntr(), and VERIFY_HANDLE.

int gDisableIrq ( gnatHandle  gh  ) 

Disables interrupt.

Parameters:
gh handle of device
Returns:
OK on success

References G_OK, _gnat::m_irqLevel, and VERIFY_HANDLE.

int gEnableAllF ( gnatHandle  gh  ) 

Prepares both the playback and record FIFOs for writing, by taking them out of reset.

Parameters:
gh handle of device
Returns:
OK on success
See also:
gEnableRF(), gEnablePF(), gWritePF32(), gWritePF32v(), gWritePF16(), gWritePF16v()

References _regControl::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _BFregControl::pfmr, _BFregControl::pfpr, _BFregControl::rfmr, _BFregControl::rfpr, _regControl::ui, and VERIFY_HANDLE.

Referenced by gFlushPipeline().

int gEnableClk0 ( gnatHandle  gh  ) 

Enables continuous clock on channel 0, generated by board.

Parameters:
gh handle of device
Returns:
OK on success

References _regControl::bf, _BFregControl::chn0clk, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _regControl::ui, and VERIFY_HANDLE.

int gEnableIrq ( gnatHandle  gh  ) 

Enables interrupt.

Parameters:
gh handle of device
Returns:
OK on success

References G_OK, _gnat::m_irqLevel, and VERIFY_HANDLE.

int gEnablePF ( gnatHandle  gh  ) 

Prepares the play back FIFO for writing, by taking it out of reset.

Parameters:
gh handle of device
Returns:
OK on success
See also:
gEnableRF(), gEnableAllF(), gWritePF32(), gWritePF32v(), gWritePF16(), gWritePF16v()

References _regControl::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _BFregControl::pfmr, _BFregControl::pfpr, _regControl::ui, and VERIFY_HANDLE.

Referenced by gSendPacket().

int gEnableRF ( gnatHandle  gh  ) 

Prepares the record FIFO for writing, by taking it out of reset.

Parameters:
gh handle of device
Returns:
OK on success
See also:
gEnablePF(), gEnableAllF(), gReadRF32(), gReadRF32v(), gReadRF16(), gReadRF16v()

References _regControl::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _BFregControl::rfmr, _BFregControl::rfpr, _regControl::ui, and VERIFY_HANDLE.

Referenced by gReadRsp(), and gSendPacket().

int gFlushAllF ( gnatHandle  gh  ) 

flushes the record and playback FIFOs of the board referenced by handle.

Parameters:
gh handle of device
Returns:
OK if successful
See also:
gFlushRF(), gFlushPF()

References _regControl::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _BFregControl::pfmr, _BFregControl::pfpr, _BFregControl::rfmr, _BFregControl::rfpr, _regControl::ui, and VERIFY_HANDLE.

Referenced by gFlushPipeline().

int gFlushPF ( gnatHandle  gh  ) 

flushes the playback FIFO of the board referenced by handle.

Parameters:
gh handle of device
Returns:
OK if successful

References _regControl::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _BFregControl::pfpr, _regControl::ui, and VERIFY_HANDLE.

Referenced by gSendPacket().

int gFlushPipeline ( gnatHandle  gh  ) 

Purges stale cruft from internal FPGA state machine.

Parameters:
gh handle of device
Returns:
OK on success
Purges stale data from internal FPGA pipeline by playing back one word of 0x3FFFF through the system.

References G_OK, gEnableAllF(), gFlushAllF(), gGetOutMask(), gSetOutMask(), gStartPB(), gWritePF32(), and VERIFY_HANDLE.

int gFlushRF ( gnatHandle  gh  ) 

flushes the record FIFO of the board referenced by handle.

Parameters:
gh handle of device
Returns:
OK if successful

References _regControl::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _BFregControl::rfpr, _regControl::ui, and VERIFY_HANDLE.

Referenced by gReadRsp(), and gSendPacket().

int gGetActive ( gnatHandle  gh,
unsigned int *  mode 
)

Returns current active mode for gnatHandle.

Parameters:
gh handle of device
mode pointer to storage to hold current mode
See also:
gSetActive()
Returns:
OK on success
Returns the current active mode for the gnatHandle. A value of 0 means inactive, while a non-zero value means active.

References G_OK, GERR_BAD_PARAM, _gnat::m_active, and VERIFY_HANDLE.

int gGetCmdChnl ( gnatHandle  gh  ) 

Wrapper for fetching value of gh->m_cmdChannel.

Parameters:
gh handle of device
Returns:
value of gh->m_cmdChannel

References _gnat::m_cmdChannel.

int gGetIrqLevel ( gnatHandle  gh,
unsigned int *  level 
)

Get interrupt level for this gnatHandle.

Parameters:
gh handle of device
level pointer to storage for interrupt level
See also:
gSetIrqVector, gSetIrqLevel, gGetIrqVector
Returns:
OK on success

References _regInt::bf, G_OK, _BFregInt::irq, _gnat::m_baseAddr, _regBlock::m_intReg, _regInt::ui, and VERIFY_HANDLE.

Referenced by gGetHardwareInfo().

int gGetIrqVector ( gnatHandle  gh,
unsigned int *  vec 
)

Get interrupt vector for this gnatHandle.

Parameters:
gh handle of device
vec interrupt vector to get
See also:
gSetIrqVector, gSetIrqLevel, gGetIrqLevel
Returns:
OK on success

References _regInt::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_intReg, _regInt::ui, _BFregInt::vec, and VERIFY_HANDLE.

Referenced by gGetHardwareInfo().

int gGetOutMask ( gnatHandle  gh,
unsigned int *  mask 
)

Gets the output XOR bit mask used when writing to the FIFO.

Parameters:
gh handle of device
mask pointer to storage for XOR bit mask
Returns:
OK on success
See also:
gWritePF16(), gWritePF16v(), gWritePF32(), gWritePF32v(), gSetOutMask()
Gets the XOR bit mask used when writing data to the playback FIFO.

References G_OK, _gnat::m_outMask, and VERIFY_HANDLE.

Referenced by gFlushPipeline().

int gHasVASU ( gnatHandle  gh  ) 

Returns non-zero if VASU board detected.

Parameters:
gh handle of device
Returns:
value of gh->m_vasu

References G_OK, GERR_BOARD_VERSION, and gSWver().

Referenced by gOpen().

int gHWver ( gnatHandle  gh,
unsigned short int *  version,
unsigned short int *  revision 
)

fetchs the hardware version and revision numbers from the board

Parameters:
gh handle of device
version 3 LSB contain hardware version number
revision 3 LSB contain hardware revision number
Returns:
OK on success
See also:
gSWver()

References _regStatus::bf, G_OK, GERR_BAD_PARAM, _BFregStatus::hwRev, _BFregStatus::hwVer, _gnat::m_baseAddr, _regBlock::m_statReg, _regStatus::ui, and VERIFY_HANDLE.

Referenced by gGetHardwareInfo(), and gVersion().

int gIsEmptyRF ( gnatHandle  gh  ) 

Checks if the record FIFO is empty.

Parameters:
gh handle of device
Returns:
Non-zero if record FIFO is empty, zero otherwise.

References _regStatus::bf, _gnat::m_baseAddr, _regBlock::m_statReg, _BFregStatus::rfec, _regStatus::ui, and VERIFY_HANDLE.

Referenced by __dumpFIFO(), gReadRsp(), and gSendPacket().

int gLockFIFO ( gnatHandle  gh,
int  timeOut 
)

Locks access to the COMM board FIFO.

Parameters:
gh gnat driver handle previously allocated
timeOut timeout value in sysclk ticks
Returns:
G_OK on success or GERR_READY_TIMEOUT on timeout.

References G_OK.

int gProbe ( gnatHandle  gh  ) 

attempts to probe the local address previously determined by gMapAddr()

Parameters:
gh handle of device to probe
Returns:
OK if board probed.
See also:
gMapAddr()

References _regControl::bf, boardProbe(), _BFregControl::c0delay, G_OK, GERR_BRD_DETECT, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _gnat::m_localAddr, and _regControl::ui.

Referenced by gOpen().

int gReadRF16 ( gnatHandle  gh,
unsigned short int *  val 
)

reads a 16-bit short word from record FIFO and stores it val

Parameters:
gh handle of device
val pointer to 16-bit short word to hold results of read
Returns:
OK on success
See also:
gReadRF16v(), gReadRF32(), gReadRF32v()

References G_OK, _gnat::m_baseAddr, _regBlock::m_rfReg, and VERIFY_HANDLE.

int gReadRF16v ( gnatHandle  gh,
unsigned short int  nVal,
unsigned short int *  aVal 
)

reads nVal 16-bit short words from the record FIFO and stores them in aVal

Parameters:
gh handle of device
nVal number of words to read from record FIFO
aVal pointer to array of 16-bit short words -- used to hold the read data
Returns:
OK on success
See also:
gReadRF16(), gReadRF32(), gReadRF32v()

References G_OK, _gnat::m_baseAddr, _regBlock::m_rfReg, and VERIFY_HANDLE.

int gReadRF32 ( gnatHandle  gh,
unsigned int *  val 
)

reads a 32-bit word from record FIFO and stores it val

Parameters:
gh handle of device
val 32-bit word to read from record FIFO
Returns:
OK on success
See also:
gReadRF32v(), gReadRF16(), gReadRF16v()
Note that the FIFO width is only 18 bits long so the result is anded with 0x3FFFF.

References G_OK, _gnat::m_baseAddr, _regBlock::m_rfReg, and VERIFY_HANDLE.

Referenced by __dumpFIFO(), and gReadRsp().

int gReadRF32v ( gnatHandle  gh,
unsigned int  nVal,
unsigned int *  aVal 
)

reads nVal 32-bit words from the record FIFO and stores them in aVal

Parameters:
gh handle of device
nVal number of elements in aVal
aVal pointer to array of 32-bit words -- used to hold the read data
Returns:
OK on success
See also:
gReadRF32(), gReadRF16(), gReadRF16v()
Note that the FIFO width is only 18 bits long so the result is anded with 0x3FFFF.

References G_OK, _gnat::m_baseAddr, _regBlock::m_rfReg, and VERIFY_HANDLE.

int gReset ( gnatHandle  gh  ) 

resets the board referenced by handle. Returns the board to a known state.

Parameters:
gh handle of device to resest
Returns:
OK if board reset

References G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _regBlock::m_intReg, _regBlock::m_maskCfgReg, _regBlock::m_optReg, _regBlock::m_statReg, and VERIFY_HANDLE.

int gSetAcqSrc ( gnatHandle  gh,
unsigned int  src 
)

Set the source for initiating playback.

Parameters:
gh handle of device
src source bit
Returns:
OK on success
The src parameter defines which of two possible sources to use for initiating playback from the FIFOs. If is zero the source is the transition of bit 31 of the control register from 0 to 1. If is non-zero the source is the external signal brought in through the front panel LEMO connector labeled "START IN".

References _regControl::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _BFregControl::startAcqSrc, _regControl::ui, and VERIFY_HANDLE.

int gSetActive ( gnatHandle  gh,
unsigned int  mode 
)

Set active member for gnatHandle.

Parameters:
gh handle of device
mode mode to set handle to
See also:
gGetActive()
Returns:
OK on success
Used to mode switch between commanding and event taking for single COMM board operation. A value of 0 means inactive, while a non-zero value means active.

References _LOG1, G_OK, _gnat::m_active, and VERIFY_HANDLE.

int gSetClkDly ( gnatHandle  gh,
unsigned char  dly 
)

Set the delay for the channel 0 clock.

Parameters:
gh handle of device
dly the number of 2ns ticks to delay the channel 0 clock
See also:
gStartPB()
Returns:
OK on success
Fix-up for timing skews between multiple COMM boards. The delay field is 6 bits wide, allowing for delays from 0 to 64ns in 2ns increments.

References _regControl::bf, _BFregControl::c0delay, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _regControl::ui, and VERIFY_HANDLE.

int gSetCmdChnl ( gnatHandle  gh,
unsigned char  chnl 
)

Sets the outgoing command number for the clock line.

Parameters:
gh handle of device
chnl channel number
Returns:
G_OK on success

References G_OK, GERR_BAD_PARAM, _gnat::m_cmdChannel, MAX_CHANNEL, and VERIFY_HANDLE.

int gSetIrqDelay ( gnatHandle  gh,
unsigned int  dly 
)

Set interrupt delay for this gnatHandle.

Parameters:
gh handle of device
dly interrupt dly to set
See also:
gSetIrqLevel(), gSetIrqVector()
Returns:
OK on success

References _LOG1, _regInt::bf, _BFregInt::delay, G_OK, _gnat::m_baseAddr, _regBlock::m_intReg, _regInt::ui, and VERIFY_HANDLE.

int gSetIrqLevel ( gnatHandle  gh,
unsigned int  level 
)

Set interrupt level for this gnatHandle.

Parameters:
gh handle of device
level interrupt level to set
See also:
gSetIrqVector, gSetIrqDelay, gGetIrqLevel, gGetIrqVector
Returns:
OK on success

References _LOG1, _regInt::bf, G_OK, _BFregInt::irq, _gnat::m_baseAddr, _regBlock::m_intReg, _gnat::m_irqLevel, _regInt::ui, and VERIFY_HANDLE.

int gSetIrqVector ( gnatHandle  gh,
unsigned int  vector 
)

Set interrupt vector for this gnatHandle.

Parameters:
gh handle of device
vector interrupt vector to set
See also:
gSetIrqLevel, gSetIrqDelay
Returns:
OK on success

References _LOG1, _regInt::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_intReg, _gnat::m_irqVec, _regInt::ui, _BFregInt::vec, and VERIFY_HANDLE.

int gSetOutMask ( gnatHandle  gh,
unsigned int  mask 
)

Sets the output XOR bit mask used when writing to the FIFO.

Parameters:
gh handle of device
mask XOR bit mask
Returns:
OK on success
See also:
gWritePF16(), gWritePF16v(), gWritePF32(), gWritePF32v(), gGetOutMask()
Sets the XOR bit mask used when writing data to the playback FIFO.

References G_OK, _gnat::m_outMask, and VERIFY_HANDLE.

Referenced by gFlushPipeline().

int gSetRecDly ( gnatHandle  gh,
unsigned char  dly 
)

Set the delay for the read back FIFO.

Parameters:
gh handle of device
dly the number of 25ns ticks to delay the read back FIFO.
See also:
gStartPB()
Returns:
OK on success
After starting playback wait dly 25ns intervals before clocking data into the record FIFO. The delay register is 8 bits wide, allowing for delays from 0 to 6.4usec in 25ns increments.

References _regControl::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _BFregControl::rbfwDelay, _regControl::ui, and VERIFY_HANDLE.

int gStartPB ( gnatHandle  gh  ) 

Start the playblack sequence.

Parameters:
gh handle of device
Returns:
OK on success

References _regControl::bf, G_OK, _gnat::m_baseAddr, _regBlock::m_ctrlReg, _BFregControl::startAcq, _regControl::ui, and VERIFY_HANDLE.

Referenced by gFlushPipeline(), and gSendPacket().

int gSWver ( gnatHandle  gh,
unsigned short int *  version,
unsigned short int *  revision 
)

fetchs the software version and revision numbers from the board

Parameters:
gh handle of device
version 3 LSB contain software version number
revision 3 LSB contain software revision number
Returns:
OK on success
See also:
gHWver()

References _regStatus::bf, G_OK, GERR_BAD_PARAM, _gnat::m_baseAddr, _regBlock::m_statReg, _BFregStatus::swRev, _BFregStatus::swVer, _regStatus::ui, and VERIFY_HANDLE.

Referenced by gGetHardwareInfo(), gHasVASU(), and gVersion().

int gTakeIntSem ( gnatHandle  gh  ) 

Takes the interrupt sync semaphore.

Parameters:
gh handle of device
Returns:
OK on success

References G_OK.

int gUnLockFIFO ( gnatHandle  gh  ) 

Unlocks access to the COMM board FIFO.

Parameters:
gh gnat driver handle previously allocated
Returns:
G_OK on success or GERR_READY_TIMEOUT on timeout.

References G_OK.

int gVersion ( gnatHandle  gh,
unsigned short  hwVer,
unsigned short  hwRev,
unsigned short  swVer,
unsigned short  swRev 
)

Checks the COMM Board hardware version/revision.

Parameters:
gh handle of device
hwVer COMM Board hardware version
hwRev COMM Board hardware revision
swVer COMM Board firmware version
swRev COMM Board firmware revision
Returns:
OK on success

References _CHECK, G_OK, GERR, gHWver(), and gSWver().

int gWritePF16 ( gnatHandle  gh,
unsigned short int  val 
)

writes the 16-bit short word val to the play back FIFO

Parameters:
gh handle of device
val 16-bit short word to write to play back FIFO
Returns:
OK on success
See also:
gWritePF16v(), gWritePF32(), gWritePF32v(), gSetOutMask()
The data is written to the play back FIFO -- the data is first XOR-ed with gh->m_outMask before writing to the FIFO.

References _LOG2B, G_OK, _gnat::m_baseAddr, _gnat::m_outMask, _regBlock::m_pfReg, and VERIFY_HANDLE.

Referenced by sendLATpCell().

int gWritePF16n ( gnatHandle  gh,
unsigned short int  nItem,
unsigned short int  val 
)

writes the 16-bit short word val to the play back FIFO nItem times

Parameters:
gh handle of device
nItem number of times to writes val to FIFO
val 16-bit short word to write to play back FIFO
Returns:
OK on success
See also:
gWritePF16v(), gWritePF32(), gWritePF32v(), gSetOutMask()
nItem copies of val is written to the play back FIFO -- the data is first XOR-ed with gh->m_outMask before writing to the FIFO.

References G_OK, _gnat::m_baseAddr, _gnat::m_outMask, _regBlock::m_pfReg, and VERIFY_HANDLE.

int gWritePF16v ( gnatHandle  gh,
unsigned short int  nVal,
unsigned short int *  aVal 
)

writes the array of 16-bit short words aVal to the play back FIFO

Parameters:
gh handle of device
nVal number of elements in aVal
aVal pointer to array of 16-bit short words
Returns:
OK on success
See also:
gWritePF16(), gWritePF32(), gWritePF32v(), gSetOutMask()
The data is written to the play back FIFO -- the data is first XOR-ed with gh->m_outMask before writing to the FIFO.

References G_OK, _gnat::m_baseAddr, _gnat::m_outMask, _regBlock::m_pfReg, and VERIFY_HANDLE.

Referenced by sendLATpCell().

int gWritePF32 ( gnatHandle  gh,
unsigned int  val 
)

writes the 32-bit word val to the play back FIFO

Parameters:
gh handle of device
val 32-bit word to write to play back FIFO
Returns:
OK on success
See also:
gWritePF32v(), gWritePF16(), gWritePF16v(), gSetOutMask()
The data is written to the play back FIFO -- the data is first XOR-ed with gh->m_outMask before writing to the FIFO.

References G_OK, _gnat::m_baseAddr, _gnat::m_outMask, _regBlock::m_pfReg, and VERIFY_HANDLE.

Referenced by gFlushPipeline().

int gWritePF32n ( gnatHandle  gh,
unsigned short int  nItem,
unsigned int  val 
)

writes the 32-bit word val to the play back FIFO

Parameters:
gh handle of device
nItem number of times to writes val to FIFO
val 32-bit word to write to play back FIFO
Returns:
OK on success
See also:
gWritePF32v(), gWritePF16(), gWritePF16v(), gSetOutMask()
nItem copies of val is written to the play back FIFO -- the data is first XOR-ed with gh->m_outMask before writing to the FIFO.

References G_OK, _gnat::m_baseAddr, _gnat::m_outMask, _regBlock::m_pfReg, and VERIFY_HANDLE.

int gWritePF32v ( gnatHandle  gh,
unsigned int  nVal,
unsigned int *  aVal 
)

writes the array of 32-bit words aVal to the play back FIFO

Parameters:
gh handle of device
nVal number of elements in aVal
aVal pointer to array of 32-bit words
Returns:
OK on success
See also:
gWritePF32(), gWritePF16(), gWritePF16v(), gSetOutMask()
The data is written to the play back FIFO -- the data is first XOR-ed with gh->m_outMask before writing to the FIFO.

References G_OK, _gnat::m_baseAddr, _gnat::m_outMask, _regBlock::m_pfReg, and VERIFY_HANDLE.


Generated on Wed Nov 21 22:06:11 2012 by  doxygen 1.5.8