\hypertarget{GTB_8c}{
\section{GTB.c File Reference}
\label{GTB_8c}\index{GTB.c@{GTB.c}}
}
Implements input/output methods.  


{\tt \#include \char`\"{}GNAT/VME.h\char`\"{}}\par
{\tt \#include \char`\"{}TPG/GTBtypes.h\char`\"{}}\par
{\tt \#include \char`\"{}TPG/GTB.h\char`\"{}}\par
{\tt \#include \char`\"{}GTB\_\-p.h\char`\"{}}\par


Include dependency graph for GTB.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=196pt]{GTB_8c__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{GTB_8c_a0}{
\#define \hyperlink{GTB_8c_a0}{PACKET\_\-READY\_\-INTR\_\-LEVEL}\ (3)}
\label{GTB_8c_a0}

\begin{CompactList}\small\item\em Packet ready interrupt level. \item\end{CompactList}\item 
\hypertarget{GTB_8c_a1}{
\#define \hyperlink{GTB_8c_a1}{PACKET\_\-READY\_\-INTR\_\-VECTOR}\ (200)}
\label{GTB_8c_a1}

\begin{CompactList}\small\item\em Packet ready interrupt vector. \item\end{CompactList}\item 
\hypertarget{GTB_8c_a2}{
\#define \hyperlink{GTB_8c_a2}{GTB\_\-DEBUG\_\-OFF}\ 0x00000000}
\label{GTB_8c_a2}

\begin{CompactList}\small\item\em GTB debug off. \item\end{CompactList}\item 
\hypertarget{GTB_8c_a3}{
\#define \hyperlink{GTB_8c_a3}{GTB\_\-DEBUG\_\-CLKS}\ 0x00000010}
\label{GTB_8c_a3}

\begin{CompactList}\small\item\em GTB debug clocks. \item\end{CompactList}\item 
\hypertarget{GTB_8c_a4}{
\#define \hyperlink{GTB_8c_a4}{FIFO\_\-TEST\_\-LENGTH}\ 8}
\label{GTB_8c_a4}

\begin{CompactList}\small\item\em FIFO test length. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{GTB_8c_a6}{board\-Probe} (unsigned int)
\begin{CompactList}\small\item\em attempts to detect the presence of the board at the local\-Adr location \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a7}{gtb\-Is\-Full\-Fifo} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, int fifo\-Id)
\begin{CompactList}\small\item\em Test for FIFO full (what). \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a8}{gtb\-Is\-Empty\-Fifo} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, int fifo\-Id)
\begin{CompactList}\small\item\em Test for FIFO empty (what). \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a9}{gtb\-Fifo\-Test} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, int fifo\-Id)
\begin{CompactList}\small\item\em Test FIFO (what). \item\end{CompactList}\item 
\hyperlink{struct__GTB__T__}{gtb\-Hndl} \hyperlink{GTB_8c_a10}{gtb\-Open} (unsigned int phys\-Addr)
\begin{CompactList}\small\item\em maps the physical address to an instance of the driver object \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a11}{gtb\-Close} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em shuts down the device attached to {\em handle\/} \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a12}{gtb\-Get\-Logical\-Addr} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int $\ast$addr)
\begin{CompactList}\small\item\em returns the logical address attached to handle \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a13}{gtb\-Get\-Phys\-Addr} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int $\ast$addr)
\begin{CompactList}\small\item\em returns the physical address attached to handle \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a14}{gtb\-Probe} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\item 
int \hyperlink{GTB_8c_a15}{gtb\-Flush\-All\-F} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em flushes the record and playback FIFOs of the board referenced by handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a16}{gtb\-Flush\-F} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, int fifo\-Id)
\begin{CompactList}\small\item\em flushes the playback FIFO of the board referenced by handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a17}{gtb\-Flush\-RF} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em flushes the record FIFO of the board referenced by handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a18}{gtb\-Flush\-PF} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em flushes the playback FIFO of the board referenced by handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a19}{gtb\-Reset} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em resets the board referenced by handle. Returns the board to a known state. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a20}{gtb\-HWver} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned short int $\ast$version, unsigned short int $\ast$revision)
\begin{CompactList}\small\item\em fetches the hardware {\em version\/} and {\em revision\/} numbers from the board \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a21}{gtb\-SWver} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned short int $\ast$version, unsigned short int $\ast$revision)
\begin{CompactList}\small\item\em fetches the software {\em version\/} and {\em revision\/} numbers from the board \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a22}{gtb\-Write\-F16} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned short int val, int fifo\-Id)
\begin{CompactList}\small\item\em writes the 16-bit short word {\em val\/} to the play back FIFO \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a23}{gtb\-Write\-F16n} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned short int n\-Item, unsigned short int val, int fifo\-Id)
\begin{CompactList}\small\item\em writes the 16-bit short word {\em val\/} to the play back FIFO {\em n\-Item\/} times \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a24}{gtb\-Write\-F16v} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned short int n\-Val, unsigned short int $\ast$a\-Val, int fifo\-Id)
\begin{CompactList}\small\item\em writes the array of 16-bit short words {\em a\-Val\/} to the play back FIFO \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a25}{gtb\-Write\-F32} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int val, int fifo\-Id)
\begin{CompactList}\small\item\em writes the 32-bit word {\em val\/} to the play back FIFO \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a26}{gtb\-Write\-F32n} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned short int n\-Item, unsigned int val, int fifo\-Id)
\begin{CompactList}\small\item\em writes the 32-bit word {\em val\/} to the play back FIFO \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a27}{gtb\-Write\-F32v} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int n\-Val, unsigned int $\ast$a\-Val, int fifo\-Id)
\begin{CompactList}\small\item\em writes the array of 32-bit words {\em a\-Val\/} to the play back FIFO \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a28}{g\-Enable\-Clk0} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Enables continuous clock on channel 0, generated by board. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a29}{gtb\-Enable\-All\-F} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Prepares both the playback and record FIFOs for writing, by taking them out of reset. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a30}{gtb\-Enable\-F} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, int fifo\-Id)
\begin{CompactList}\small\item\em Prepares the play back FIFO for writing, by taking it out of reset. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a31}{gtb\-Enable\-PF} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Prepares the play back FIFO for writing, by taking it out of reset. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a32}{gtb\-Enable\-RF} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Prepares the record FIFO for writing, by taking it out of reset. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a33}{gtb\-Clr\-ALLhist} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Clears the latched occupancy status for both Playback and Record FIFOs. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a34}{gtb\-Clr\-Fhist} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, int fifo\-Id)
\begin{CompactList}\small\item\em Clears the latched occupancy status for the Playback FIFOs. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a35}{gtb\-Clr\-PFhist} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Clears the latched occupancy status for the Playback FIFOs. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a36}{gtb\-Clr\-RFhist} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Clears the latched occupancy status for the record FIFO. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a37}{gtb\-Start\-PB} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Start the playblack sequence. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a38}{gtb\-Set\-Acq\-Src} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int src)
\begin{CompactList}\small\item\em Set the source for initiating playback. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a39}{gtb\-Set\-Rec\-Dly} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned char dly)
\begin{CompactList}\small\item\em Set the delay for the read back FIFO. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a40}{gtb\-Set\-Clk\-Dly} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned char dly)
\begin{CompactList}\small\item\em Set the delay for the channel 0 clock. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a41}{gtb\-Set\-Irq\-Level} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int level)
\begin{CompactList}\small\item\em Set interrupt level for this gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a42}{gtb\-Get\-Irq\-Level} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int $\ast$level)
\begin{CompactList}\small\item\em Get interrupt level for this gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a43}{gtb\-Set\-Irq\-Vector} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int vector)
\begin{CompactList}\small\item\em Set interrupt vector for this gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a44}{gtb\-Get\-Irq\-Vector} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int $\ast$vec)
\begin{CompactList}\small\item\em Get interrupt vector for this gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a45}{gtb\-Set\-Irq\-Delay} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int dly)
\begin{CompactList}\small\item\em Set interrupt delay for this gnat\-Handle. \item\end{CompactList}\item 
void \hyperlink{GTB_8c_a46}{srv\-Intr} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em ISR that gives the m\_\-sync\-Sem semaphore when the record FIFO has a packet ready. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a47}{gtb\-Connect\-Irq} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Prepares driver and board for interrupts. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a48}{gtb\-Enable\-Irq} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Enables interrupt. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a49}{gtb\-Disable\-Irq} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Disables interrupt. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a50}{gtb\-Set\-Active} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int mode)
\begin{CompactList}\small\item\em Set active member for gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a51}{gtb\-Get\-Active} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int $\ast$mode)
\begin{CompactList}\small\item\em Returns current active mode for gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a52}{gtb\-Flush\-Pipe} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Purges stale cruft from internal FPGA state machine. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a53}{gtb\-Set\-Out\-Mask} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int mask)
\begin{CompactList}\small\item\em Sets the output XOR bit mask used when writing to the FIFO. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a54}{gtb\-Get\-Out\-Mask} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned int $\ast$mask)
\begin{CompactList}\small\item\em Gets the output XOR bit mask used when writing to the FIFO. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a55}{gtb\-Take\-Int\-Sem} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Takes the interrupt sync semaphore. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a56}{gtb\-Version} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, unsigned short hw\-Ver, unsigned short hw\-Rev, unsigned short sw\-Ver, unsigned short sw\-Rev)
\begin{CompactList}\small\item\em Checks the COMM Board hardware version/revision. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a57}{gtb\-Ready} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, int time\-Out)
\begin{CompactList}\small\item\em Waits for the COMM board to become ready, via polling. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a58}{gtb\-Lock\-FIFO} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, int time\-Out)
\begin{CompactList}\small\item\em Locks access to the COMM board FIFO. \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a59}{gtb\-Un\-Lock\-FIFO} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Unlocks access to the COMM board FIFO. \item\end{CompactList}\item 
\hyperlink{GTBtypes_8h_a0}{gtb\-Type\_\-t} \hyperlink{GTB_8c_a60}{gtb\-Type} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Return gtb type. \item\end{CompactList}\item 
\hyperlink{GTBtypes_8h_a1}{gtb\-Clk\_\-t} \hyperlink{GTB_8c_a61}{gtb\-Clk\-Detect} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Return (what). \item\end{CompactList}\item 
void \hyperlink{GTB_8c_a62}{gtb\-Clk\-Force} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, \hyperlink{GTBtypes_8h_a1}{gtb\-Clk\_\-t} clk)
\begin{CompactList}\small\item\em Force clock (what). \item\end{CompactList}\item 
void \hyperlink{GTB_8c_a63}{gtb\-Clk\-Use} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, \hyperlink{GTBtypes_8h_a1}{gtb\-Clk\_\-t} clk)
\begin{CompactList}\small\item\em Use clock (what). \item\end{CompactList}\item 
void \hyperlink{GTB_8c_a64}{gtb\-Veto\-Select} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Select veto (what). \item\end{CompactList}\item 
void \hyperlink{GTB_8c_a65}{gtb\-Cno\-Select} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Select CNO (what). \item\end{CompactList}\item 
void \hyperlink{GTB_8c_a66}{gtb\-Arm} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, \hyperlink{GTBtypes_8h_a2}{gtb\-Trig\_\-t} trig)
\begin{CompactList}\small\item\em Arm trigger (what). \item\end{CompactList}\item 
void \hyperlink{GTB_8c_a67}{gtb\-Disarm} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h, \hyperlink{GTBtypes_8h_a2}{gtb\-Trig\_\-t} trig)
\begin{CompactList}\small\item\em Disarm trigger (what). \item\end{CompactList}\item 
int \hyperlink{GTB_8c_a68}{gtb\-Is\-Valid\-Handle} (\hyperlink{struct__GTB__T__}{gtb\-Hndl} h)
\begin{CompactList}\small\item\em Is handle valid. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hypertarget{GTB_8c_a5}{
unsigned int \hyperlink{GTB_8c_a5}{gtb\-Debug} = GTB\_\-DEBUG\_\-OFF}
\label{GTB_8c_a5}

\begin{CompactList}\small\item\em Set debugging on/off. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Implements input/output methods. 

\begin{Desc}
\item[Author:]Mark Mc\-Dougald -- \href{mailto:mark@slac.stanford.edu}{\tt mark@slac.stanford.edu} \end{Desc}


\subsection{Function Documentation}
\hypertarget{GTB_8c_a6}{
\index{GTB.c@{GTB.c}!boardProbe@{boardProbe}}
\index{boardProbe@{boardProbe}!GTB.c@{GTB.c}}
\subsubsection[boardProbe]{\setlength{\rightskip}{0pt plus 5cm}int board\-Probe (unsigned int {\em local\-Addr})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{GTB_8c_a6}


attempts to detect the presence of the board at the local\-Adr location 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em local\-Addr}]address of COMM I/O board \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on success, non-zero for failure \end{Desc}
\hypertarget{GTB_8c_a28}{
\index{GTB.c@{GTB.c}!gEnableClk0@{gEnableClk0}}
\index{gEnableClk0@{gEnableClk0}!GTB.c@{GTB.c}}
\subsubsection[gEnableClk0]{\setlength{\rightskip}{0pt plus 5cm}int g\-Enable\-Clk0 (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a28}


Enables continuous clock on channel 0, generated by board. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a66}{
\index{GTB.c@{GTB.c}!gtbArm@{gtbArm}}
\index{gtbArm@{gtbArm}!GTB.c@{GTB.c}}
\subsubsection[gtbArm]{\setlength{\rightskip}{0pt plus 5cm}void gtb\-Arm (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, \hyperlink{GTBtypes_8h_a2}{gtb\-Trig\_\-t} {\em trig})}}
\label{GTB_8c_a66}


Arm trigger (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \item[{\em trig}]Trigger to arm (what) \end{description}
\end{Desc}
\hypertarget{GTB_8c_a61}{
\index{GTB.c@{GTB.c}!gtbClkDetect@{gtbClkDetect}}
\index{gtbClkDetect@{gtbClkDetect}!GTB.c@{GTB.c}}
\subsubsection[gtbClkDetect]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{GTBtypes_8h_a1}{gtb\-Clk\_\-t} gtb\-Clk\-Detect (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a61}


Return (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \end{description}
\end{Desc}
\hypertarget{GTB_8c_a62}{
\index{GTB.c@{GTB.c}!gtbClkForce@{gtbClkForce}}
\index{gtbClkForce@{gtbClkForce}!GTB.c@{GTB.c}}
\subsubsection[gtbClkForce]{\setlength{\rightskip}{0pt plus 5cm}void gtb\-Clk\-Force (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, \hyperlink{GTBtypes_8h_a1}{gtb\-Clk\_\-t} {\em clk})}}
\label{GTB_8c_a62}


Force clock (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \item[{\em clk}]clock (what) \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=110pt]{GTB_8c_a62_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a63}{
\index{GTB.c@{GTB.c}!gtbClkUse@{gtbClkUse}}
\index{gtbClkUse@{gtbClkUse}!GTB.c@{GTB.c}}
\subsubsection[gtbClkUse]{\setlength{\rightskip}{0pt plus 5cm}void gtb\-Clk\-Use (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, \hyperlink{GTBtypes_8h_a1}{gtb\-Clk\_\-t} {\em clk})}}
\label{GTB_8c_a63}


Use clock (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \item[{\em clk}]clock (what) \end{description}
\end{Desc}
\hypertarget{GTB_8c_a11}{
\index{GTB.c@{GTB.c}!gtbClose@{gtbClose}}
\index{gtbClose@{gtbClose}!GTB.c@{GTB.c}}
\subsubsection[gtbClose]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Close (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a11}


shuts down the device attached to {\em handle\/} 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device to close \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK if close successful \end{Desc}
\begin{Desc}
\item[See also:]g\-Open() \end{Desc}
\hypertarget{GTB_8c_a33}{
\index{GTB.c@{GTB.c}!gtbClrALLhist@{gtbClrALLhist}}
\index{gtbClrALLhist@{gtbClrALLhist}!GTB.c@{GTB.c}}
\subsubsection[gtbClrALLhist]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Clr\-ALLhist (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a33}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Clr\-PFhist(), g\-Clr\-RFhist()\end{Desc}
Clears the occupancy status flags ( Empty, Full, Almost Empty, Almost Full ) for both the record FIFO and the playback FIFO. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=119pt]{GTB_8c_a33_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a34}{
\index{GTB.c@{GTB.c}!gtbClrFhist@{gtbClrFhist}}
\index{gtbClrFhist@{gtbClrFhist}!GTB.c@{GTB.c}}
\subsubsection[gtbClrFhist]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Clr\-Fhist (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, int {\em fifo\-Id})}}
\label{GTB_8c_a34}


Clears the latched occupancy status for the Playback FIFOs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em fifo\-Id}]Id of FIFO to flush \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Clr\-RFhist(), g\-Clr\-ALLhist()\end{Desc}
Clears the occupancy status flags ( Empty, Full, Almost Empty, Almost Full ) for the playback FIFO. \hypertarget{GTB_8c_a35}{
\index{GTB.c@{GTB.c}!gtbClrPFhist@{gtbClrPFhist}}
\index{gtbClrPFhist@{gtbClrPFhist}!GTB.c@{GTB.c}}
\subsubsection[gtbClrPFhist]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Clr\-PFhist (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a35}


Clears the latched occupancy status for the Playback FIFOs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Clr\-RFhist(), g\-Clr\-ALLhist()\end{Desc}
Clears the occupancy status flags ( Empty, Full, Almost Empty, Almost Full ) for the playback FIFO. \hypertarget{GTB_8c_a36}{
\index{GTB.c@{GTB.c}!gtbClrRFhist@{gtbClrRFhist}}
\index{gtbClrRFhist@{gtbClrRFhist}!GTB.c@{GTB.c}}
\subsubsection[gtbClrRFhist]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Clr\-RFhist (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a36}


Clears the latched occupancy status for the record FIFO. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Clr\-PFhist(), g\-Clr\-ALLhist()\end{Desc}
Clears the occupancy status flags ( Empty, Full, Almost Empty, Almost Full ) for the record FIFO. \hypertarget{GTB_8c_a65}{
\index{GTB.c@{GTB.c}!gtbCnoSelect@{gtbCnoSelect}}
\index{gtbCnoSelect@{gtbCnoSelect}!GTB.c@{GTB.c}}
\subsubsection[gtbCnoSelect]{\setlength{\rightskip}{0pt plus 5cm}void gtb\-Cno\-Select (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a65}


Select CNO (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \end{description}
\end{Desc}
\hypertarget{GTB_8c_a47}{
\index{GTB.c@{GTB.c}!gtbConnectIrq@{gtbConnectIrq}}
\index{gtbConnectIrq@{gtbConnectIrq}!GTB.c@{GTB.c}}
\subsubsection[gtbConnectIrq]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Connect\-Irq (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a47}


Prepares driver and board for interrupts. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=107pt]{GTB_8c_a47_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a49}{
\index{GTB.c@{GTB.c}!gtbDisableIrq@{gtbDisableIrq}}
\index{gtbDisableIrq@{gtbDisableIrq}!GTB.c@{GTB.c}}
\subsubsection[gtbDisableIrq]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Disable\-Irq (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a49}


Disables interrupt. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a67}{
\index{GTB.c@{GTB.c}!gtbDisarm@{gtbDisarm}}
\index{gtbDisarm@{gtbDisarm}!GTB.c@{GTB.c}}
\subsubsection[gtbDisarm]{\setlength{\rightskip}{0pt plus 5cm}void gtb\-Disarm (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, \hyperlink{GTBtypes_8h_a2}{gtb\-Trig\_\-t} {\em trig})}}
\label{GTB_8c_a67}


Disarm trigger (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \item[{\em trig}]Trigger to disarm (what) \end{description}
\end{Desc}
\hypertarget{GTB_8c_a29}{
\index{GTB.c@{GTB.c}!gtbEnableAllF@{gtbEnableAllF}}
\index{gtbEnableAllF@{gtbEnableAllF}!GTB.c@{GTB.c}}
\subsubsection[gtbEnableAllF]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Enable\-All\-F (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a29}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Enable\-RF(), g\-Enable\-PF(), g\-Write\-PF32(), g\-Write\-PF32v(), g\-Write\-PF16(), g\-Write\-PF16v() \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=118pt]{GTB_8c_a29_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a30}{
\index{GTB.c@{GTB.c}!gtbEnableF@{gtbEnableF}}
\index{gtbEnableF@{gtbEnableF}!GTB.c@{GTB.c}}
\subsubsection[gtbEnableF]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Enable\-F (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, int {\em fifo\-Id})}}
\label{GTB_8c_a30}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em fifo\-Id}]FIFO Id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Enable\-RF(), g\-Enable\-All\-F(), g\-Write\-PF32(), g\-Write\-PF32v(), g\-Write\-PF16(), g\-Write\-PF16v() \end{Desc}
\hypertarget{GTB_8c_a48}{
\index{GTB.c@{GTB.c}!gtbEnableIrq@{gtbEnableIrq}}
\index{gtbEnableIrq@{gtbEnableIrq}!GTB.c@{GTB.c}}
\subsubsection[gtbEnableIrq]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Enable\-Irq (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a48}


Enables interrupt. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a31}{
\index{GTB.c@{GTB.c}!gtbEnablePF@{gtbEnablePF}}
\index{gtbEnablePF@{gtbEnablePF}!GTB.c@{GTB.c}}
\subsubsection[gtbEnablePF]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Enable\-PF (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a31}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Enable\-RF(), g\-Enable\-All\-F(), g\-Write\-PF32(), g\-Write\-PF32v(), g\-Write\-PF16(), g\-Write\-PF16v() \end{Desc}
\hypertarget{GTB_8c_a32}{
\index{GTB.c@{GTB.c}!gtbEnableRF@{gtbEnableRF}}
\index{gtbEnableRF@{gtbEnableRF}!GTB.c@{GTB.c}}
\subsubsection[gtbEnableRF]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Enable\-RF (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a32}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Enable\-PF(), g\-Enable\-All\-F(), g\-Read\-RF32(), g\-Read\-RF32v(), g\-Read\-RF16(), g\-Read\-RF16v() \end{Desc}
\hypertarget{GTB_8c_a9}{
\index{GTB.c@{GTB.c}!gtbFifoTest@{gtbFifoTest}}
\index{gtbFifoTest@{gtbFifoTest}!GTB.c@{GTB.c}}
\subsubsection[gtbFifoTest]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Fifo\-Test (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, int {\em fifo\-Id})}}
\label{GTB_8c_a9}


Test FIFO (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device to close \item[{\em fifo\-Id}]Id of FIFO to flush \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]What \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=121pt]{GTB_8c_a9_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a15}{
\index{GTB.c@{GTB.c}!gtbFlushAllF@{gtbFlushAllF}}
\index{gtbFlushAllF@{gtbFlushAllF}!GTB.c@{GTB.c}}
\subsubsection[gtbFlushAllF]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Flush\-All\-F (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a15}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK if successful \end{Desc}
\begin{Desc}
\item[See also:]g\-Flush\-RF(), g\-Flush\-PF() \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=112pt]{GTB_8c_a15_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a16}{
\index{GTB.c@{GTB.c}!gtbFlushF@{gtbFlushF}}
\index{gtbFlushF@{gtbFlushF}!GTB.c@{GTB.c}}
\subsubsection[gtbFlushF]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Flush\-F (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, int {\em fifo\-Id})}}
\label{GTB_8c_a16}


flushes the playback FIFO of the board referenced by handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em fifo\-Id}]Id of FIFO to flush \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK if successful \end{Desc}
\hypertarget{GTB_8c_a18}{
\index{GTB.c@{GTB.c}!gtbFlushPF@{gtbFlushPF}}
\index{gtbFlushPF@{gtbFlushPF}!GTB.c@{GTB.c}}
\subsubsection[gtbFlushPF]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Flush\-PF (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a18}


flushes the playback FIFO of the board referenced by handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK if successful \end{Desc}
\hypertarget{GTB_8c_a52}{
\index{GTB.c@{GTB.c}!gtbFlushPipe@{gtbFlushPipe}}
\index{gtbFlushPipe@{gtbFlushPipe}!GTB.c@{GTB.c}}
\subsubsection[gtbFlushPipe]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Flush\-Pipe (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a52}


Purges stale cruft from internal FPGA state machine. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success\end{Desc}
Purges stale data from internal FPGA pipeline by playing back one word of 0x3FFFF through the system. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=177pt]{GTB_8c_a52_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a17}{
\index{GTB.c@{GTB.c}!gtbFlushRF@{gtbFlushRF}}
\index{gtbFlushRF@{gtbFlushRF}!GTB.c@{GTB.c}}
\subsubsection[gtbFlushRF]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Flush\-RF (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a17}


flushes the record FIFO of the board referenced by handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK if successful \end{Desc}
\hypertarget{GTB_8c_a51}{
\index{GTB.c@{GTB.c}!gtbGetActive@{gtbGetActive}}
\index{gtbGetActive@{gtbGetActive}!GTB.c@{GTB.c}}
\subsubsection[gtbGetActive]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Get\-Active (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int $\ast$ {\em mode})}}
\label{GTB_8c_a51}


Returns current active mode for gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em mode}]pointer to storage to hold current mode \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]g\-Set\-Active() \end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success\end{Desc}
Returns the current active mode for the gnat\-Handle. A value of 0 means inactive, while a non-zero value means active. \hypertarget{GTB_8c_a42}{
\index{GTB.c@{GTB.c}!gtbGetIrqLevel@{gtbGetIrqLevel}}
\index{gtbGetIrqLevel@{gtbGetIrqLevel}!GTB.c@{GTB.c}}
\subsubsection[gtbGetIrqLevel]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Get\-Irq\-Level (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int $\ast$ {\em level})}}
\label{GTB_8c_a42}


Get interrupt level for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em level}]pointer to storage for interrupt level \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]g\-Set\-Irq\-Vector, g\-Set\-Irq\-Level, g\-Get\-Irq\-Vector \end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a44}{
\index{GTB.c@{GTB.c}!gtbGetIrqVector@{gtbGetIrqVector}}
\index{gtbGetIrqVector@{gtbGetIrqVector}!GTB.c@{GTB.c}}
\subsubsection[gtbGetIrqVector]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Get\-Irq\-Vector (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int $\ast$ {\em vec})}}
\label{GTB_8c_a44}


Get interrupt vector for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em vec}]interrupt vector to get \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]g\-Set\-Irq\-Vector, g\-Set\-Irq\-Level, g\-Get\-Irq\-Level \end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a12}{
\index{GTB.c@{GTB.c}!gtbGetLogicalAddr@{gtbGetLogicalAddr}}
\index{gtbGetLogicalAddr@{gtbGetLogicalAddr}!GTB.c@{GTB.c}}
\subsubsection[gtbGetLogicalAddr]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Get\-Logical\-Addr (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int $\ast$ {\em addr})}}
\label{GTB_8c_a12}


returns the logical address attached to handle 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device to close \item[{\em addr}]pointer to storage for holding logical address \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on successs \end{Desc}
\begin{Desc}
\item[See also:]g\-Open() \end{Desc}
\hypertarget{GTB_8c_a54}{
\index{GTB.c@{GTB.c}!gtbGetOutMask@{gtbGetOutMask}}
\index{gtbGetOutMask@{gtbGetOutMask}!GTB.c@{GTB.c}}
\subsubsection[gtbGetOutMask]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Get\-Out\-Mask (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int $\ast$ {\em mask})}}
\label{GTB_8c_a54}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em mask}]pointer to storage for XOR bit mask \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Write\-PF16(), g\-Write\-PF16v(), g\-Write\-PF32(), g\-Write\-PF32v(), g\-Set\-Out\-Mask()\end{Desc}
Gets the XOR bit mask used when writing data to the playback FIFO. \hypertarget{GTB_8c_a13}{
\index{GTB.c@{GTB.c}!gtbGetPhysAddr@{gtbGetPhysAddr}}
\index{gtbGetPhysAddr@{gtbGetPhysAddr}!GTB.c@{GTB.c}}
\subsubsection[gtbGetPhysAddr]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Get\-Phys\-Addr (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int $\ast$ {\em addr})}}
\label{GTB_8c_a13}


returns the physical address attached to handle 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device to close \item[{\em addr}]pointer to storage for holding physical address \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on successs \end{Desc}
\begin{Desc}
\item[See also:]g\-Open() \end{Desc}
\hypertarget{GTB_8c_a20}{
\index{GTB.c@{GTB.c}!gtbHWver@{gtbHWver}}
\index{gtbHWver@{gtbHWver}!GTB.c@{GTB.c}}
\subsubsection[gtbHWver]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-HWver (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned short int $\ast$ {\em version}, unsigned short int $\ast$ {\em revision})}}
\label{GTB_8c_a20}


fetches the hardware {\em version\/} and {\em revision\/} numbers from the board 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em version}]3 LSB contain hardware version number \item[{\em revision}]3 LSB contain hardware revision number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-SWver() \end{Desc}
\hypertarget{GTB_8c_a8}{
\index{GTB.c@{GTB.c}!gtbIsEmptyFifo@{gtbIsEmptyFifo}}
\index{gtbIsEmptyFifo@{gtbIsEmptyFifo}!GTB.c@{GTB.c}}
\subsubsection[gtbIsEmptyFifo]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Is\-Empty\-Fifo (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, int {\em fifo\-Id})}}
\label{GTB_8c_a8}


Test for FIFO empty (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device to close \item[{\em fifo\-Id}]Id of FIFO to flush \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]What \end{Desc}
\hypertarget{GTB_8c_a7}{
\index{GTB.c@{GTB.c}!gtbIsFullFifo@{gtbIsFullFifo}}
\index{gtbIsFullFifo@{gtbIsFullFifo}!GTB.c@{GTB.c}}
\subsubsection[gtbIsFullFifo]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Is\-Full\-Fifo (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, int {\em fifo\-Id})}}
\label{GTB_8c_a7}


Test for FIFO full (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device to close \item[{\em fifo\-Id}]Id of FIFO to flush \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]What \end{Desc}
\hypertarget{GTB_8c_a68}{
\index{GTB.c@{GTB.c}!gtbIsValidHandle@{gtbIsValidHandle}}
\index{gtbIsValidHandle@{gtbIsValidHandle}!GTB.c@{GTB.c}}
\subsubsection[gtbIsValidHandle]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Is\-Valid\-Handle (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a68}


Is handle valid. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \end{description}
\end{Desc}
\hypertarget{GTB_8c_a58}{
\index{GTB.c@{GTB.c}!gtbLockFIFO@{gtbLockFIFO}}
\index{gtbLockFIFO@{gtbLockFIFO}!GTB.c@{GTB.c}}
\subsubsection[gtbLockFIFO]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Lock\-FIFO (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, int {\em time\-Out})}}
\label{GTB_8c_a58}


Locks access to the COMM board FIFO. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \item[{\em time\-Out}]timeout value in sysclk ticks \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success or GTB\_\-ERR\_\-READY\_\-TIMEOUT on timeout. \end{Desc}
\hypertarget{GTB_8c_a10}{
\index{GTB.c@{GTB.c}!gtbOpen@{gtbOpen}}
\index{gtbOpen@{gtbOpen}!GTB.c@{GTB.c}}
\subsubsection[gtbOpen]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__GTB__T__}{gtb\-Hndl} gtb\-Open (unsigned int {\em phys\-Addr})}}
\label{GTB_8c_a10}


maps the physical address to an instance of the driver object 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em phys\-Addr}]the physical address of the comm IO board \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK for success \end{Desc}
\begin{Desc}
\item[See also:]g\-Close()\end{Desc}
Attempts to map {\em phys\-Addr\/} into a local (logical) address. If successful it binds the physical and logical address to the driver object refered to by handle. If unsuccessful it clears both the physical and local address for handle and returns ERROR. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=148pt]{GTB_8c_a10_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a14}{
\index{GTB.c@{GTB.c}!gtbProbe@{gtbProbe}}
\index{gtbProbe@{gtbProbe}!GTB.c@{GTB.c}}
\subsubsection[gtbProbe]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Probe (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a14}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device to probe \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK if board probed. \end{Desc}
\begin{Desc}
\item[See also:]\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=104pt]{GTB_8c_a14_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a57}{
\index{GTB.c@{GTB.c}!gtbReady@{gtbReady}}
\index{gtbReady@{gtbReady}!GTB.c@{GTB.c}}
\subsubsection[gtbReady]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Ready (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, int {\em time\-Out})}}
\label{GTB_8c_a57}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gtb driver handle previously allocated \item[{\em time\-Out}]timeout value in sysclk ticks \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success or GTB\_\-ERR\_\-READY\_\-TIMEOUT on timeout. \end{Desc}
\hypertarget{GTB_8c_a19}{
\index{GTB.c@{GTB.c}!gtbReset@{gtbReset}}
\index{gtbReset@{gtbReset}!GTB.c@{GTB.c}}
\subsubsection[gtbReset]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Reset (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a19}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device to resest \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK if board reset \end{Desc}
\hypertarget{GTB_8c_a38}{
\index{GTB.c@{GTB.c}!gtbSetAcqSrc@{gtbSetAcqSrc}}
\index{gtbSetAcqSrc@{gtbSetAcqSrc}!GTB.c@{GTB.c}}
\subsubsection[gtbSetAcqSrc]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Set\-Acq\-Src (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int {\em src})}}
\label{GTB_8c_a38}


Set the source for initiating playback. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em src}]source bit \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success\end{Desc}
The {\em src\/} parameter defines which of two possible sources to use for initiating playback from the FIFOs. If {\em is\/} zero the source is the transition of bit 31 of the control register from 0 to 1. If {\em is\/} non-zero the source is the external signal brought in through the front panel LEMO connector labeled \char`\"{}START IN\char`\"{}. \hypertarget{GTB_8c_a50}{
\index{GTB.c@{GTB.c}!gtbSetActive@{gtbSetActive}}
\index{gtbSetActive@{gtbSetActive}!GTB.c@{GTB.c}}
\subsubsection[gtbSetActive]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Set\-Active (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int {\em mode})}}
\label{GTB_8c_a50}


Set active member for gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em mode}]mode to set handle to \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]g\-Get\-Active() \end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success\end{Desc}
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. \hypertarget{GTB_8c_a40}{
\index{GTB.c@{GTB.c}!gtbSetClkDly@{gtbSetClkDly}}
\index{gtbSetClkDly@{gtbSetClkDly}!GTB.c@{GTB.c}}
\subsubsection[gtbSetClkDly]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Set\-Clk\-Dly (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned char {\em dly})}}
\label{GTB_8c_a40}


Set the delay for the channel 0 clock. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em dly}]the number of 2ns ticks to delay the channel 0 clock \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]g\-Start\-PB() \end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success\end{Desc}
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. \hypertarget{GTB_8c_a45}{
\index{GTB.c@{GTB.c}!gtbSetIrqDelay@{gtbSetIrqDelay}}
\index{gtbSetIrqDelay@{gtbSetIrqDelay}!GTB.c@{GTB.c}}
\subsubsection[gtbSetIrqDelay]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Set\-Irq\-Delay (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int {\em dly})}}
\label{GTB_8c_a45}


Set interrupt delay for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em dly}]interrupt dly to set \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]g\-Set\-Irq\-Level(), g\-Set\-Irq\-Vector() \end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a41}{
\index{GTB.c@{GTB.c}!gtbSetIrqLevel@{gtbSetIrqLevel}}
\index{gtbSetIrqLevel@{gtbSetIrqLevel}!GTB.c@{GTB.c}}
\subsubsection[gtbSetIrqLevel]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Set\-Irq\-Level (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int {\em level})}}
\label{GTB_8c_a41}


Set interrupt level for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em level}]interrupt level to set \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]g\-Set\-Irq\-Vector, g\-Set\-Irq\-Delay, g\-Get\-Irq\-Level, g\-Get\-Irq\-Vector \end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a43}{
\index{GTB.c@{GTB.c}!gtbSetIrqVector@{gtbSetIrqVector}}
\index{gtbSetIrqVector@{gtbSetIrqVector}!GTB.c@{GTB.c}}
\subsubsection[gtbSetIrqVector]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Set\-Irq\-Vector (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int {\em vector})}}
\label{GTB_8c_a43}


Set interrupt vector for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em vector}]interrupt vector to set \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]g\-Set\-Irq\-Level, g\-Set\-Irq\-Delay \end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a53}{
\index{GTB.c@{GTB.c}!gtbSetOutMask@{gtbSetOutMask}}
\index{gtbSetOutMask@{gtbSetOutMask}!GTB.c@{GTB.c}}
\subsubsection[gtbSetOutMask]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Set\-Out\-Mask (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int {\em mask})}}
\label{GTB_8c_a53}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em mask}]XOR bit mask \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Write\-PF16(), g\-Write\-PF16v(), g\-Write\-PF32(), g\-Write\-PF32v(), g\-Get\-Out\-Mask()\end{Desc}
Sets the XOR bit mask used when writing data to the playback FIFO. \hypertarget{GTB_8c_a39}{
\index{GTB.c@{GTB.c}!gtbSetRecDly@{gtbSetRecDly}}
\index{gtbSetRecDly@{gtbSetRecDly}!GTB.c@{GTB.c}}
\subsubsection[gtbSetRecDly]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Set\-Rec\-Dly (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned char {\em dly})}}
\label{GTB_8c_a39}


Set the delay for the read back FIFO. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em dly}]the number of 25ns ticks to delay the read back FIFO. \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]g\-Start\-PB() \end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success\end{Desc}
After starting playback wait {\em 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. \hypertarget{GTB_8c_a37}{
\index{GTB.c@{GTB.c}!gtbStartPB@{gtbStartPB}}
\index{gtbStartPB@{gtbStartPB}!GTB.c@{GTB.c}}
\subsubsection[gtbStartPB]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Start\-PB (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a37}


Start the playblack sequence. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a21}{
\index{GTB.c@{GTB.c}!gtbSWver@{gtbSWver}}
\index{gtbSWver@{gtbSWver}!GTB.c@{GTB.c}}
\subsubsection[gtbSWver]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-SWver (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned short int $\ast$ {\em version}, unsigned short int $\ast$ {\em revision})}}
\label{GTB_8c_a21}


fetches the software {\em version\/} and {\em revision\/} numbers from the board 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em version}]3 LSB contain software version number \item[{\em revision}]3 LSB contain software revision number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-HWver() \end{Desc}
\hypertarget{GTB_8c_a55}{
\index{GTB.c@{GTB.c}!gtbTakeIntSem@{gtbTakeIntSem}}
\index{gtbTakeIntSem@{gtbTakeIntSem}!GTB.c@{GTB.c}}
\subsubsection[gtbTakeIntSem]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Take\-Int\-Sem (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a55}


Takes the interrupt sync semaphore. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\hypertarget{GTB_8c_a60}{
\index{GTB.c@{GTB.c}!gtbType@{gtbType}}
\index{gtbType@{gtbType}!GTB.c@{GTB.c}}
\subsubsection[gtbType]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{GTBtypes_8h_a0}{gtb\-Type\_\-t} gtb\-Type (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a60}


Return gtb type. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \end{description}
\end{Desc}
\hypertarget{GTB_8c_a59}{
\index{GTB.c@{GTB.c}!gtbUnLockFIFO@{gtbUnLockFIFO}}
\index{gtbUnLockFIFO@{gtbUnLockFIFO}!GTB.c@{GTB.c}}
\subsubsection[gtbUnLockFIFO]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Un\-Lock\-FIFO (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a59}


Unlocks access to the COMM board FIFO. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success or GTB\_\-ERR\_\-READY\_\-TIMEOUT on timeout. \end{Desc}
\hypertarget{GTB_8c_a56}{
\index{GTB.c@{GTB.c}!gtbVersion@{gtbVersion}}
\index{gtbVersion@{gtbVersion}!GTB.c@{GTB.c}}
\subsubsection[gtbVersion]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Version (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned short {\em hw\-Ver}, unsigned short {\em hw\-Rev}, unsigned short {\em sw\-Ver}, unsigned short {\em sw\-Rev})}}
\label{GTB_8c_a56}


Checks the COMM Board hardware version/revision. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em hw\-Ver}]COMM Board hardware version \item[{\em hw\-Rev}]COMM Board hardware revision \item[{\em sw\-Ver}]COMM Board firmware version \item[{\em sw\-Rev}]COMM Board firmware revision \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=108pt]{GTB_8c_a56_cgraph}
\end{center}
\end{figure}
\hypertarget{GTB_8c_a64}{
\index{GTB.c@{GTB.c}!gtbVetoSelect@{gtbVetoSelect}}
\index{gtbVetoSelect@{gtbVetoSelect}!GTB.c@{GTB.c}}
\subsubsection[gtbVetoSelect]{\setlength{\rightskip}{0pt plus 5cm}void gtb\-Veto\-Select (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a64}


Select veto (what). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \end{description}
\end{Desc}
\hypertarget{GTB_8c_a22}{
\index{GTB.c@{GTB.c}!gtbWriteF16@{gtbWriteF16}}
\index{gtbWriteF16@{gtbWriteF16}!GTB.c@{GTB.c}}
\subsubsection[gtbWriteF16]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Write\-F16 (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned short int {\em val}, int {\em fifo\-Id})}}
\label{GTB_8c_a22}


writes the 16-bit short word {\em val\/} to the play back FIFO 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em val}]16-bit short word to write to play back FIFO \item[{\em fifo\-Id}]FIFO Id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Write\-PF16v(), g\-Write\-PF32(), g\-Write\-PF32v(), g\-Set\-Out\-Mask()\end{Desc}
The data is written to the play back FIFO -- the data is first XOR-ed with h-$>$out\-Mask before writing to the FIFO. \hypertarget{GTB_8c_a23}{
\index{GTB.c@{GTB.c}!gtbWriteF16n@{gtbWriteF16n}}
\index{gtbWriteF16n@{gtbWriteF16n}!GTB.c@{GTB.c}}
\subsubsection[gtbWriteF16n]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Write\-F16n (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned short int {\em n\-Item}, unsigned short int {\em val}, int {\em fifo\-Id})}}
\label{GTB_8c_a23}


writes the 16-bit short word {\em val\/} to the play back FIFO {\em n\-Item\/} times 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em n\-Item}]number of times to writes {\em val\/} to FIFO \item[{\em val}]16-bit short word to write to play back FIFO \item[{\em fifo\-Id}]FIFO Id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Write\-PF16v(), g\-Write\-PF32(), g\-Write\-PF32v(), g\-Set\-Out\-Mask()\end{Desc}
{\em n\-Item\/} copies of {\em val\/} is written to the play back FIFO -- the data is first XOR-ed with h-$>$out\-Mask before writing to the FIFO. \hypertarget{GTB_8c_a24}{
\index{GTB.c@{GTB.c}!gtbWriteF16v@{gtbWriteF16v}}
\index{gtbWriteF16v@{gtbWriteF16v}!GTB.c@{GTB.c}}
\subsubsection[gtbWriteF16v]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Write\-F16v (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned short int {\em n\-Val}, unsigned short int $\ast$ {\em a\-Val}, int {\em fifo\-Id})}}
\label{GTB_8c_a24}


writes the array of 16-bit short words {\em a\-Val\/} to the play back FIFO 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em n\-Val}]number of elements in {\em a\-Val\/} \item[{\em a\-Val}]pointer to array of 16-bit short words \item[{\em fifo\-Id}]FIFO Id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Write\-PF16(), g\-Write\-PF32(), g\-Write\-PF32v(), g\-Set\-Out\-Mask()\end{Desc}
The data is written to the play back FIFO -- the data is first XOR-ed with h-$>$out\-Mask before writing to the FIFO. \hypertarget{GTB_8c_a25}{
\index{GTB.c@{GTB.c}!gtbWriteF32@{gtbWriteF32}}
\index{gtbWriteF32@{gtbWriteF32}!GTB.c@{GTB.c}}
\subsubsection[gtbWriteF32]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Write\-F32 (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int {\em val}, int {\em fifo\-Id})}}
\label{GTB_8c_a25}


writes the 32-bit word {\em val\/} to the play back FIFO 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em val}]32-bit word to write to play back FIFO \item[{\em fifo\-Id}]FIFO Id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Write\-PF32v(), g\-Write\-PF16(), g\-Write\-PF16v(), g\-Set\-Out\-Mask()\end{Desc}
The data is written to the play back FIFO -- the data is first XOR-ed with h-$>$out\-Mask before writing to the FIFO. \hypertarget{GTB_8c_a26}{
\index{GTB.c@{GTB.c}!gtbWriteF32n@{gtbWriteF32n}}
\index{gtbWriteF32n@{gtbWriteF32n}!GTB.c@{GTB.c}}
\subsubsection[gtbWriteF32n]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Write\-F32n (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned short int {\em n\-Item}, unsigned int {\em val}, int {\em fifo\-Id})}}
\label{GTB_8c_a26}


writes the 32-bit word {\em val\/} to the play back FIFO 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em n\-Item}]number of times to writes {\em val\/} to FIFO \item[{\em val}]32-bit word to write to play back FIFO \item[{\em fifo\-Id}]FIFO Id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Write\-PF32v(), g\-Write\-PF16(), g\-Write\-PF16v(), g\-Set\-Out\-Mask()\end{Desc}
{\em n\-Item\/} copies of {\em val\/} is written to the play back FIFO -- the data is first XOR-ed with h-$>$out\-Mask before writing to the FIFO. \hypertarget{GTB_8c_a27}{
\index{GTB.c@{GTB.c}!gtbWriteF32v@{gtbWriteF32v}}
\index{gtbWriteF32v@{gtbWriteF32v}!GTB.c@{GTB.c}}
\subsubsection[gtbWriteF32v]{\setlength{\rightskip}{0pt plus 5cm}int gtb\-Write\-F32v (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h}, unsigned int {\em n\-Val}, unsigned int $\ast$ {\em a\-Val}, int {\em fifo\-Id})}}
\label{GTB_8c_a27}


writes the array of 32-bit words {\em a\-Val\/} to the play back FIFO 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]handle of device \item[{\em n\-Val}]number of elements in {\em a\-Val\/} \item[{\em a\-Val}]pointer to array of 32-bit words \item[{\em fifo\-Id}]FIFO Id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]GTB\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]g\-Write\-PF32(), g\-Write\-PF16(), g\-Write\-PF16v(), g\-Set\-Out\-Mask()\end{Desc}
The data is written to the play back FIFO -- the data is first XOR-ed with h-$>$out\-Mask before writing to the FIFO. \hypertarget{GTB_8c_a46}{
\index{GTB.c@{GTB.c}!srvIntr@{srvIntr}}
\index{srvIntr@{srvIntr}!GTB.c@{GTB.c}}
\subsubsection[srvIntr]{\setlength{\rightskip}{0pt plus 5cm}void srv\-Intr (\hyperlink{struct__GTB__T__}{gtb\-Hndl} {\em h})}}
\label{GTB_8c_a46}


ISR that gives the m\_\-sync\-Sem semaphore when the record FIFO has a packet ready. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em h}]gnat driver handle previously allocated \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}
