\hypertarget{gio_8h}{
\section{gio.h File Reference}
\label{gio_8h}\index{gio.h@{gio.h}}
}
Defines the input/output methods for the gnat driver.  


{\tt \#include \char`\"{}GNAT/gnat.h\char`\"{}}\par


Include dependency graph for gio.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=57pt]{gio_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=114pt]{gio_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{gio_8h_a0}{g\-Reset} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em resets the board referenced by handle. Returns the board to a known state. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a1}{g\-Flush\-All\-F} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em flushes the record and playback FIFOs of the board referenced by handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a2}{g\-Flush\-RF} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em flushes the record FIFO of the board referenced by handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a3}{g\-Flush\-PF} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em flushes the playback FIFO of the board referenced by handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a4}{g\-Probe} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em attempts to probe the local address previously determined by g\-Map\-Addr() \item\end{CompactList}\item 
int \hyperlink{gio_8h_a5}{g\-HWver} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned short int $\ast$version, unsigned short int $\ast$revision)
\begin{CompactList}\small\item\em fetchs the hardware {\em version\/} and {\em revision\/} numbers from the board \item\end{CompactList}\item 
int \hyperlink{gio_8h_a6}{g\-SWver} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned short int $\ast$version, unsigned short int $\ast$revision)
\begin{CompactList}\small\item\em fetchs the software {\em version\/} and {\em revision\/} numbers from the board \item\end{CompactList}\item 
int \hyperlink{gio_8h_a7}{g\-Write\-PF16} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned short int val)
\begin{CompactList}\small\item\em writes the 16-bit short word {\em val\/} to the play back FIFO \item\end{CompactList}\item 
int \hyperlink{gio_8h_a8}{g\-Write\-PF16n} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned short int n\-Item, unsigned short int val)
\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{gio_8h_a9}{g\-Write\-PF16v} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned short int n\-Val, unsigned short int $\ast$a\-Val)
\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{gio_8h_a10}{g\-Write\-PF32} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int val)
\begin{CompactList}\small\item\em writes the 32-bit word {\em val\/} to the play back FIFO \item\end{CompactList}\item 
int \hyperlink{gio_8h_a11}{g\-Write\-PF32n} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned short int n\-Item, unsigned int val)
\begin{CompactList}\small\item\em writes the 32-bit word {\em val\/} to the play back FIFO \item\end{CompactList}\item 
int \hyperlink{gio_8h_a12}{g\-Write\-PF32v} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int n\-Val, unsigned int $\ast$a\-Val)
\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{gio_8h_a13}{g\-Read\-RF16} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned short int $\ast$val)
\begin{CompactList}\small\item\em reads a 16-bit short word from record FIFO and stores it {\em val\/} \item\end{CompactList}\item 
int \hyperlink{gio_8h_a14}{g\-Read\-RF16v} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned short int n\-Val, unsigned short int $\ast$a\-Val)
\begin{CompactList}\small\item\em reads {\em n\-Val\/} 16-bit short words from the record FIFO and stores them in {\em a\-Val\/} \item\end{CompactList}\item 
int \hyperlink{gio_8h_a15}{g\-Read\-RF32} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int $\ast$val)
\begin{CompactList}\small\item\em reads a 32-bit word from record FIFO and stores it {\em val\/} \item\end{CompactList}\item 
int \hyperlink{gio_8h_a16}{g\-Read\-RF32v} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int n\-Val, unsigned int $\ast$a\-Val)
\begin{CompactList}\small\item\em reads {\em n\-Val\/} 32-bit words from the record FIFO and stores them in {\em a\-Val\/} \item\end{CompactList}\item 
int \hyperlink{gio_8h_a17}{g\-Enable\-All\-F} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\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{gio_8h_a18}{g\-Enable\-PF} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Prepares the play back FIFO for writing, by taking it out of reset. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a19}{g\-Enable\-RF} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Prepares the record FIFO for writing, by taking it out of reset. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a20}{g\-Enable\-Clk0} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Enables continuous clock on channel 0, generated by board. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a21}{g\-Flush\-Pipeline} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Purges stale cruft from internal FPGA state machine. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a22}{g\-Clr\-ALLhist} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Clears the latched occupancy status for both Playback and Record FIFOs. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a23}{g\-Clr\-PFhist} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Clears the latched occupancy status for the Playback FIFOs. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a24}{g\-Clr\-RFhist} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Clears the latched occupancy status for the record FIFO. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a25}{g\-Is\-Empty\-RF} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Checks if the record FIFO is empty. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a26}{g\-Start\-PB} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Start the playblack sequence. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a27}{g\-Set\-Acq\-Src} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int src)
\begin{CompactList}\small\item\em Set the source for initiating playback. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a28}{g\-Set\-Rec\-Dly} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned char dly)
\begin{CompactList}\small\item\em Set the delay for the read back FIFO. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a29}{g\-Set\-Clk\-Dly} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned char dly)
\begin{CompactList}\small\item\em Set the delay for the channel 0 clock. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a30}{g\-Set\-Irq\-Delay} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int dly)
\begin{CompactList}\small\item\em Set interrupt delay for this gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a31}{g\-Set\-Irq\-Level} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int level)
\begin{CompactList}\small\item\em Set interrupt level for this gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a32}{g\-Get\-Irq\-Level} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int $\ast$level)
\begin{CompactList}\small\item\em Get interrupt level for this gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a33}{g\-Set\-Irq\-Vector} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int vector)
\begin{CompactList}\small\item\em Set interrupt vector for this gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a34}{g\-Get\-Irq\-Vector} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int $\ast$vector)
\begin{CompactList}\small\item\em Get interrupt vector for this gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a35}{g\-Connect\-Irq} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Prepares driver and board for interrupts. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a36}{g\-Enable\-Irq} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Enables interrupt. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a37}{g\-Disable\-Irq} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Disables interrupt. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a38}{g\-Set\-Out\-Mask} (\hyperlink{struct__gnat}{gnat\-Handle} gh, 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{gio_8h_a39}{g\-Get\-Out\-Mask} (\hyperlink{struct__gnat}{gnat\-Handle} gh, 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{gio_8h_a40}{g\-Take\-Int\-Sem} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Takes the interrupt sync semaphore. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a41}{g\-Set\-Active} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int mode)
\begin{CompactList}\small\item\em Set active member for gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a42}{g\-Get\-Active} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned int $\ast$mode)
\begin{CompactList}\small\item\em Returns current active mode for gnat\-Handle. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a43}{g\-Version} (\hyperlink{struct__gnat}{gnat\-Handle} gh, 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{gio_8h_a44}{g\-Comm\-Ready} (\hyperlink{struct__gnat}{gnat\-Handle} gh, int time\-Out)
\begin{CompactList}\small\item\em Waits for the COMM board to become ready, via polling. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a45}{g\-Lock\-FIFO} (\hyperlink{struct__gnat}{gnat\-Handle} gh, int time\-Out)
\begin{CompactList}\small\item\em Locks access to the COMM board FIFO. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a46}{g\-Un\-Lock\-FIFO} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Unlocks access to the COMM board FIFO. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a47}{g\-Get\-Cmd\-Chnl} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Wrapper for fetching value of {\em gh-$>$m\_\-cmd\-Channel\/}. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a48}{g\-Set\-Cmd\-Chnl} (\hyperlink{struct__gnat}{gnat\-Handle} gh, unsigned char chnl)
\begin{CompactList}\small\item\em Sets the outgoing command number for the clock line. \item\end{CompactList}\item 
int \hyperlink{gio_8h_a49}{g\-Has\-VASU} (\hyperlink{struct__gnat}{gnat\-Handle} gh)
\begin{CompactList}\small\item\em Returns non-zero if VASU board detected. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Defines the input/output methods for the gnat driver. 

\begin{Desc}
\item[Author:]Curt Brune -- \href{mailto:curt@slac.stanford.edu}{\tt curt@slac.stanford.edu}\end{Desc}


\subsection{Function Documentation}
\hypertarget{gio_8h_a22}{
\index{gio.h@{gio.h}!gClrALLhist@{gClrALLhist}}
\index{gClrALLhist@{gClrALLhist}!gio.h@{gio.h}}
\subsubsection[gClrALLhist]{\setlength{\rightskip}{0pt plus 5cm}g\-Clr\-ALLhist (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a22}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a23}{g\-Clr\-PFhist()}, \hyperlink{gio_8h_a24}{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. \hypertarget{gio_8h_a23}{
\index{gio.h@{gio.h}!gClrPFhist@{gClrPFhist}}
\index{gClrPFhist@{gClrPFhist}!gio.h@{gio.h}}
\subsubsection[gClrPFhist]{\setlength{\rightskip}{0pt plus 5cm}g\-Clr\-PFhist (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a23}


Clears the latched occupancy status for the Playback FIFOs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a24}{g\-Clr\-RFhist()}, \hyperlink{gio_8h_a22}{g\-Clr\-ALLhist()}\end{Desc}
Clears the occupancy status flags ( Empty, Full, Almost Empty, Almost Full ) for the playback FIFO. \hypertarget{gio_8h_a24}{
\index{gio.h@{gio.h}!gClrRFhist@{gClrRFhist}}
\index{gClrRFhist@{gClrRFhist}!gio.h@{gio.h}}
\subsubsection[gClrRFhist]{\setlength{\rightskip}{0pt plus 5cm}g\-Clr\-RFhist (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a24}


Clears the latched occupancy status for the record FIFO. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a23}{g\-Clr\-PFhist()}, \hyperlink{gio_8h_a22}{g\-Clr\-ALLhist()}\end{Desc}
Clears the occupancy status flags ( Empty, Full, Almost Empty, Almost Full ) for the record FIFO. \hypertarget{gio_8h_a44}{
\index{gio.h@{gio.h}!gCommReady@{gCommReady}}
\index{gCommReady@{gCommReady}!gio.h@{gio.h}}
\subsubsection[gCommReady]{\setlength{\rightskip}{0pt plus 5cm}int g\-Comm\-Ready (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, int {\em time\-Out})}}
\label{gio_8h_a44}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]gnat driver handle previously allocated \item[{\em time\-Out}]timeout value in sysclk ticks \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success or GERR\_\-READY\_\-TIMEOUT on timeout. \end{Desc}
\hypertarget{gio_8h_a35}{
\index{gio.h@{gio.h}!gConnectIrq@{gConnectIrq}}
\index{gConnectIrq@{gConnectIrq}!gio.h@{gio.h}}
\subsubsection[gConnectIrq]{\setlength{\rightskip}{0pt plus 5cm}g\-Connect\-Irq (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a35}


Prepares driver and board for interrupts. 

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


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=102pt]{gio_8h_a35_cgraph}
\end{center}
\end{figure}
\hypertarget{gio_8h_a37}{
\index{gio.h@{gio.h}!gDisableIrq@{gDisableIrq}}
\index{gDisableIrq@{gDisableIrq}!gio.h@{gio.h}}
\subsubsection[gDisableIrq]{\setlength{\rightskip}{0pt plus 5cm}g\-Disable\-Irq (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a37}


Disables interrupt. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a17}{
\index{gio.h@{gio.h}!gEnableAllF@{gEnableAllF}}
\index{gEnableAllF@{gEnableAllF}!gio.h@{gio.h}}
\subsubsection[gEnableAllF]{\setlength{\rightskip}{0pt plus 5cm}g\-Enable\-All\-F (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a17}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a19}{g\-Enable\-RF()}, \hyperlink{gio_8h_a18}{g\-Enable\-PF()}, \hyperlink{gio_8h_a10}{g\-Write\-PF32()}, \hyperlink{gio_8h_a12}{g\-Write\-PF32v()}, \hyperlink{gio_8h_a7}{g\-Write\-PF16()}, \hyperlink{gio_8h_a9}{g\-Write\-PF16v()} \end{Desc}
\hypertarget{gio_8h_a20}{
\index{gio.h@{gio.h}!gEnableClk0@{gEnableClk0}}
\index{gEnableClk0@{gEnableClk0}!gio.h@{gio.h}}
\subsubsection[gEnableClk0]{\setlength{\rightskip}{0pt plus 5cm}g\-Enable\-Clk0 (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a20}


Enables continuous clock on channel 0, generated by board. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a36}{
\index{gio.h@{gio.h}!gEnableIrq@{gEnableIrq}}
\index{gEnableIrq@{gEnableIrq}!gio.h@{gio.h}}
\subsubsection[gEnableIrq]{\setlength{\rightskip}{0pt plus 5cm}g\-Enable\-Irq (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a36}


Enables interrupt. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a18}{
\index{gio.h@{gio.h}!gEnablePF@{gEnablePF}}
\index{gEnablePF@{gEnablePF}!gio.h@{gio.h}}
\subsubsection[gEnablePF]{\setlength{\rightskip}{0pt plus 5cm}g\-Enable\-PF (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a18}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a19}{g\-Enable\-RF()}, \hyperlink{gio_8h_a17}{g\-Enable\-All\-F()}, \hyperlink{gio_8h_a10}{g\-Write\-PF32()}, \hyperlink{gio_8h_a12}{g\-Write\-PF32v()}, \hyperlink{gio_8h_a7}{g\-Write\-PF16()}, \hyperlink{gio_8h_a9}{g\-Write\-PF16v()} \end{Desc}
\hypertarget{gio_8h_a19}{
\index{gio.h@{gio.h}!gEnableRF@{gEnableRF}}
\index{gEnableRF@{gEnableRF}!gio.h@{gio.h}}
\subsubsection[gEnableRF]{\setlength{\rightskip}{0pt plus 5cm}g\-Enable\-RF (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a19}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a18}{g\-Enable\-PF()}, \hyperlink{gio_8h_a17}{g\-Enable\-All\-F()}, \hyperlink{gio_8h_a15}{g\-Read\-RF32()}, \hyperlink{gio_8h_a16}{g\-Read\-RF32v()}, \hyperlink{gio_8h_a13}{g\-Read\-RF16()}, \hyperlink{gio_8h_a14}{g\-Read\-RF16v()} \end{Desc}
\hypertarget{gio_8h_a1}{
\index{gio.h@{gio.h}!gFlushAllF@{gFlushAllF}}
\index{gFlushAllF@{gFlushAllF}!gio.h@{gio.h}}
\subsubsection[gFlushAllF]{\setlength{\rightskip}{0pt plus 5cm}int g\-Flush\-All\-F (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a1}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK if successful \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a2}{g\-Flush\-RF()}, \hyperlink{gio_8h_a3}{g\-Flush\-PF()} \end{Desc}
\hypertarget{gio_8h_a3}{
\index{gio.h@{gio.h}!gFlushPF@{gFlushPF}}
\index{gFlushPF@{gFlushPF}!gio.h@{gio.h}}
\subsubsection[gFlushPF]{\setlength{\rightskip}{0pt plus 5cm}int g\-Flush\-PF (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a3}


flushes the playback FIFO of the board referenced by handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK if successful \end{Desc}
\hypertarget{gio_8h_a21}{
\index{gio.h@{gio.h}!gFlushPipeline@{gFlushPipeline}}
\index{gFlushPipeline@{gFlushPipeline}!gio.h@{gio.h}}
\subsubsection[gFlushPipeline]{\setlength{\rightskip}{0pt plus 5cm}g\-Flush\-Pipeline (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a21}


Purges stale cruft from internal FPGA state machine. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]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=125pt]{gio_8h_a21_cgraph}
\end{center}
\end{figure}
\hypertarget{gio_8h_a2}{
\index{gio.h@{gio.h}!gFlushRF@{gFlushRF}}
\index{gFlushRF@{gFlushRF}!gio.h@{gio.h}}
\subsubsection[gFlushRF]{\setlength{\rightskip}{0pt plus 5cm}int g\-Flush\-RF (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a2}


flushes the record FIFO of the board referenced by handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK if successful \end{Desc}
\hypertarget{gio_8h_a42}{
\index{gio.h@{gio.h}!gGetActive@{gGetActive}}
\index{gGetActive@{gGetActive}!gio.h@{gio.h}}
\subsubsection[gGetActive]{\setlength{\rightskip}{0pt plus 5cm}g\-Get\-Active (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int $\ast$ {\em mode})}}
\label{gio_8h_a42}


Returns current active mode for gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em mode}]pointer to storage to hold current mode \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a41}{g\-Set\-Active()} \end{Desc}
\begin{Desc}
\item[Returns:]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{gio_8h_a47}{
\index{gio.h@{gio.h}!gGetCmdChnl@{gGetCmdChnl}}
\index{gGetCmdChnl@{gGetCmdChnl}!gio.h@{gio.h}}
\subsubsection[gGetCmdChnl]{\setlength{\rightskip}{0pt plus 5cm}int g\-Get\-Cmd\-Chnl (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a47}


Wrapper for fetching value of {\em gh-$>$m\_\-cmd\-Channel\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]value of {\em gh-$>$m\_\-cmd\-Channel\/} \end{Desc}
\hypertarget{gio_8h_a32}{
\index{gio.h@{gio.h}!gGetIrqLevel@{gGetIrqLevel}}
\index{gGetIrqLevel@{gGetIrqLevel}!gio.h@{gio.h}}
\subsubsection[gGetIrqLevel]{\setlength{\rightskip}{0pt plus 5cm}g\-Get\-Irq\-Level (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int $\ast$ {\em level})}}
\label{gio_8h_a32}


Get interrupt level for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em level}]pointer to storage for interrupt level \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8c_a32}{g\-Set\-Irq\-Vector}, \hyperlink{gio_8c_a30}{g\-Set\-Irq\-Level}, \hyperlink{gio_8c_a33}{g\-Get\-Irq\-Vector} \end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a34}{
\index{gio.h@{gio.h}!gGetIrqVector@{gGetIrqVector}}
\index{gGetIrqVector@{gGetIrqVector}!gio.h@{gio.h}}
\subsubsection[gGetIrqVector]{\setlength{\rightskip}{0pt plus 5cm}g\-Get\-Irq\-Vector (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int $\ast$ {\em vec})}}
\label{gio_8h_a34}


Get interrupt vector for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em vec}]interrupt vector to get \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8c_a32}{g\-Set\-Irq\-Vector}, \hyperlink{gio_8c_a30}{g\-Set\-Irq\-Level}, \hyperlink{gio_8c_a31}{g\-Get\-Irq\-Level} \end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a39}{
\index{gio.h@{gio.h}!gGetOutMask@{gGetOutMask}}
\index{gGetOutMask@{gGetOutMask}!gio.h@{gio.h}}
\subsubsection[gGetOutMask]{\setlength{\rightskip}{0pt plus 5cm}g\-Get\-Out\-Mask (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int $\ast$ {\em mask})}}
\label{gio_8h_a39}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em mask}]pointer to storage for XOR bit mask \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a7}{g\-Write\-PF16()}, \hyperlink{gio_8h_a9}{g\-Write\-PF16v()}, \hyperlink{gio_8h_a10}{g\-Write\-PF32()}, \hyperlink{gio_8h_a12}{g\-Write\-PF32v()}, \hyperlink{gio_8h_a38}{g\-Set\-Out\-Mask()}\end{Desc}
Gets the XOR bit mask used when writing data to the playback FIFO. \hypertarget{gio_8h_a49}{
\index{gio.h@{gio.h}!gHasVASU@{gHasVASU}}
\index{gHasVASU@{gHasVASU}!gio.h@{gio.h}}
\subsubsection[gHasVASU]{\setlength{\rightskip}{0pt plus 5cm}int g\-Has\-VASU (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a49}


Returns non-zero if VASU board detected. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]value of {\em gh-$>$m\_\-vasu\/} \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=103pt]{gio_8h_a49_cgraph}
\end{center}
\end{figure}
\hypertarget{gio_8h_a5}{
\index{gio.h@{gio.h}!gHWver@{gHWver}}
\index{gHWver@{gHWver}!gio.h@{gio.h}}
\subsubsection[gHWver]{\setlength{\rightskip}{0pt plus 5cm}g\-HWver (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned short int $\ast$ {\em version}, unsigned short int $\ast$ {\em revision})}}
\label{gio_8h_a5}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]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:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a6}{g\-SWver()} \end{Desc}
\hypertarget{gio_8h_a25}{
\index{gio.h@{gio.h}!gIsEmptyRF@{gIsEmptyRF}}
\index{gIsEmptyRF@{gIsEmptyRF}!gio.h@{gio.h}}
\subsubsection[gIsEmptyRF]{\setlength{\rightskip}{0pt plus 5cm}g\-Is\-Empty\-RF (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a25}


Checks if the record FIFO is empty. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Non-zero if record FIFO is empty, zero otherwise. \end{Desc}
\hypertarget{gio_8h_a45}{
\index{gio.h@{gio.h}!gLockFIFO@{gLockFIFO}}
\index{gLockFIFO@{gLockFIFO}!gio.h@{gio.h}}
\subsubsection[gLockFIFO]{\setlength{\rightskip}{0pt plus 5cm}int g\-Lock\-FIFO (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, int {\em time\-Out})}}
\label{gio_8h_a45}


Locks access to the COMM board FIFO. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]gnat driver handle previously allocated \item[{\em time\-Out}]timeout value in sysclk ticks \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success or GERR\_\-READY\_\-TIMEOUT on timeout. \end{Desc}
\hypertarget{gio_8h_a4}{
\index{gio.h@{gio.h}!gProbe@{gProbe}}
\index{gProbe@{gProbe}!gio.h@{gio.h}}
\subsubsection[gProbe]{\setlength{\rightskip}{0pt plus 5cm}int g\-Probe (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a4}


attempts to probe the local address previously determined by g\-Map\-Addr() 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device to probe \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK if board probed. \end{Desc}
\begin{Desc}
\item[See also:]g\-Map\-Addr() \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=220pt]{gio_8h_a4_cgraph}
\end{center}
\end{figure}
\hypertarget{gio_8h_a13}{
\index{gio.h@{gio.h}!gReadRF16@{gReadRF16}}
\index{gReadRF16@{gReadRF16}!gio.h@{gio.h}}
\subsubsection[gReadRF16]{\setlength{\rightskip}{0pt plus 5cm}g\-Read\-RF16 (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned short int $\ast$ {\em val})}}
\label{gio_8h_a13}


reads a 16-bit short word from record FIFO and stores it {\em val\/} 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em val}]pointer to 16-bit short word to hold results of read \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a14}{g\-Read\-RF16v()}, \hyperlink{gio_8h_a15}{g\-Read\-RF32()}, \hyperlink{gio_8h_a16}{g\-Read\-RF32v()} \end{Desc}
\hypertarget{gio_8h_a14}{
\index{gio.h@{gio.h}!gReadRF16v@{gReadRF16v}}
\index{gReadRF16v@{gReadRF16v}!gio.h@{gio.h}}
\subsubsection[gReadRF16v]{\setlength{\rightskip}{0pt plus 5cm}g\-Read\-RF16v (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned short int {\em n\-Val}, unsigned short int $\ast$ {\em a\-Val})}}
\label{gio_8h_a14}


reads {\em n\-Val\/} 16-bit short words from the record FIFO and stores them in {\em a\-Val\/} 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em n\-Val}]number of words to read from record FIFO \item[{\em a\-Val}]pointer to array of 16-bit short words -- used to hold the read data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a13}{g\-Read\-RF16()}, \hyperlink{gio_8h_a15}{g\-Read\-RF32()}, \hyperlink{gio_8h_a16}{g\-Read\-RF32v()} \end{Desc}
\hypertarget{gio_8h_a15}{
\index{gio.h@{gio.h}!gReadRF32@{gReadRF32}}
\index{gReadRF32@{gReadRF32}!gio.h@{gio.h}}
\subsubsection[gReadRF32]{\setlength{\rightskip}{0pt plus 5cm}g\-Read\-RF32 (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int $\ast$ {\em val})}}
\label{gio_8h_a15}


reads a 32-bit word from record FIFO and stores it {\em val\/} 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em val}]32-bit word to read from record FIFO \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a16}{g\-Read\-RF32v()}, \hyperlink{gio_8h_a13}{g\-Read\-RF16()}, \hyperlink{gio_8h_a14}{g\-Read\-RF16v()}\end{Desc}
Note that the FIFO width is only 18 bits long so the result is anded with 0x3FFFF. \hypertarget{gio_8h_a16}{
\index{gio.h@{gio.h}!gReadRF32v@{gReadRF32v}}
\index{gReadRF32v@{gReadRF32v}!gio.h@{gio.h}}
\subsubsection[gReadRF32v]{\setlength{\rightskip}{0pt plus 5cm}g\-Read\-RF32v (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int {\em n\-Val}, unsigned int $\ast$ {\em a\-Val})}}
\label{gio_8h_a16}


reads {\em n\-Val\/} 32-bit words from the record FIFO and stores them in {\em a\-Val\/} 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]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 -- used to hold the read data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a15}{g\-Read\-RF32()}, \hyperlink{gio_8h_a13}{g\-Read\-RF16()}, \hyperlink{gio_8h_a14}{g\-Read\-RF16v()}\end{Desc}
Note that the FIFO width is only 18 bits long so the result is anded with 0x3FFFF. \hypertarget{gio_8h_a0}{
\index{gio.h@{gio.h}!gReset@{gReset}}
\index{gReset@{gReset}!gio.h@{gio.h}}
\subsubsection[gReset]{\setlength{\rightskip}{0pt plus 5cm}int g\-Reset (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a0}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device to resest \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK if board reset \end{Desc}
\hypertarget{gio_8h_a27}{
\index{gio.h@{gio.h}!gSetAcqSrc@{gSetAcqSrc}}
\index{gSetAcqSrc@{gSetAcqSrc}!gio.h@{gio.h}}
\subsubsection[gSetAcqSrc]{\setlength{\rightskip}{0pt plus 5cm}g\-Set\-Acq\-Src (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int {\em src})}}
\label{gio_8h_a27}


Set the source for initiating playback. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em src}]source bit \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]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{gio_8h_a41}{
\index{gio.h@{gio.h}!gSetActive@{gSetActive}}
\index{gSetActive@{gSetActive}!gio.h@{gio.h}}
\subsubsection[gSetActive]{\setlength{\rightskip}{0pt plus 5cm}g\-Set\-Active (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int {\em mode})}}
\label{gio_8h_a41}


Set active member for gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em mode}]mode to set handle to \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a42}{g\-Get\-Active()} \end{Desc}
\begin{Desc}
\item[Returns:]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{gio_8h_a29}{
\index{gio.h@{gio.h}!gSetClkDly@{gSetClkDly}}
\index{gSetClkDly@{gSetClkDly}!gio.h@{gio.h}}
\subsubsection[gSetClkDly]{\setlength{\rightskip}{0pt plus 5cm}g\-Set\-Clk\-Dly (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned char {\em dly})}}
\label{gio_8h_a29}


Set the delay for the channel 0 clock. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]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:]\hyperlink{gio_8h_a26}{g\-Start\-PB()} \end{Desc}
\begin{Desc}
\item[Returns:]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{gio_8h_a48}{
\index{gio.h@{gio.h}!gSetCmdChnl@{gSetCmdChnl}}
\index{gSetCmdChnl@{gSetCmdChnl}!gio.h@{gio.h}}
\subsubsection[gSetCmdChnl]{\setlength{\rightskip}{0pt plus 5cm}int g\-Set\-Cmd\-Chnl (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned char {\em chnl})}}
\label{gio_8h_a48}


Sets the outgoing command number for the clock line. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em chnl}]channel number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\hypertarget{gio_8h_a30}{
\index{gio.h@{gio.h}!gSetIrqDelay@{gSetIrqDelay}}
\index{gSetIrqDelay@{gSetIrqDelay}!gio.h@{gio.h}}
\subsubsection[gSetIrqDelay]{\setlength{\rightskip}{0pt plus 5cm}g\-Set\-Irq\-Delay (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int {\em dly})}}
\label{gio_8h_a30}


Set interrupt delay for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em dly}]interrupt dly to set \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a31}{g\-Set\-Irq\-Level()}, \hyperlink{gio_8h_a33}{g\-Set\-Irq\-Vector()} \end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a31}{
\index{gio.h@{gio.h}!gSetIrqLevel@{gSetIrqLevel}}
\index{gSetIrqLevel@{gSetIrqLevel}!gio.h@{gio.h}}
\subsubsection[gSetIrqLevel]{\setlength{\rightskip}{0pt plus 5cm}g\-Set\-Irq\-Level (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int {\em level})}}
\label{gio_8h_a31}


Set interrupt level for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em level}]interrupt level to set \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8c_a32}{g\-Set\-Irq\-Vector}, \hyperlink{gio_8c_a34}{g\-Set\-Irq\-Delay}, \hyperlink{gio_8c_a31}{g\-Get\-Irq\-Level}, \hyperlink{gio_8c_a33}{g\-Get\-Irq\-Vector} \end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a33}{
\index{gio.h@{gio.h}!gSetIrqVector@{gSetIrqVector}}
\index{gSetIrqVector@{gSetIrqVector}!gio.h@{gio.h}}
\subsubsection[gSetIrqVector]{\setlength{\rightskip}{0pt plus 5cm}g\-Set\-Irq\-Vector (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int {\em vector})}}
\label{gio_8h_a33}


Set interrupt vector for this gnat\-Handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em vector}]interrupt vector to set \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8c_a30}{g\-Set\-Irq\-Level}, \hyperlink{gio_8c_a34}{g\-Set\-Irq\-Delay} \end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a38}{
\index{gio.h@{gio.h}!gSetOutMask@{gSetOutMask}}
\index{gSetOutMask@{gSetOutMask}!gio.h@{gio.h}}
\subsubsection[gSetOutMask]{\setlength{\rightskip}{0pt plus 5cm}g\-Set\-Out\-Mask (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int {\em mask})}}
\label{gio_8h_a38}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em mask}]XOR bit mask \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a7}{g\-Write\-PF16()}, \hyperlink{gio_8h_a9}{g\-Write\-PF16v()}, \hyperlink{gio_8h_a10}{g\-Write\-PF32()}, \hyperlink{gio_8h_a12}{g\-Write\-PF32v()}, \hyperlink{gio_8h_a39}{g\-Get\-Out\-Mask()}\end{Desc}
Sets the XOR bit mask used when writing data to the playback FIFO. \hypertarget{gio_8h_a28}{
\index{gio.h@{gio.h}!gSetRecDly@{gSetRecDly}}
\index{gSetRecDly@{gSetRecDly}!gio.h@{gio.h}}
\subsubsection[gSetRecDly]{\setlength{\rightskip}{0pt plus 5cm}g\-Set\-Rec\-Dly (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned char {\em dly})}}
\label{gio_8h_a28}


Set the delay for the read back FIFO. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]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:]\hyperlink{gio_8h_a26}{g\-Start\-PB()} \end{Desc}
\begin{Desc}
\item[Returns:]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{gio_8h_a26}{
\index{gio.h@{gio.h}!gStartPB@{gStartPB}}
\index{gStartPB@{gStartPB}!gio.h@{gio.h}}
\subsubsection[gStartPB]{\setlength{\rightskip}{0pt plus 5cm}g\-Start\-PB (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a26}


Start the playblack sequence. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a6}{
\index{gio.h@{gio.h}!gSWver@{gSWver}}
\index{gSWver@{gSWver}!gio.h@{gio.h}}
\subsubsection[gSWver]{\setlength{\rightskip}{0pt plus 5cm}g\-SWver (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned short int $\ast$ {\em version}, unsigned short int $\ast$ {\em revision})}}
\label{gio_8h_a6}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]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:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a5}{g\-HWver()} \end{Desc}
\hypertarget{gio_8h_a40}{
\index{gio.h@{gio.h}!gTakeIntSem@{gTakeIntSem}}
\index{gTakeIntSem@{gTakeIntSem}!gio.h@{gio.h}}
\subsubsection[gTakeIntSem]{\setlength{\rightskip}{0pt plus 5cm}g\-Take\-Int\-Sem (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a40}


Takes the interrupt sync semaphore. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\hypertarget{gio_8h_a46}{
\index{gio.h@{gio.h}!gUnLockFIFO@{gUnLockFIFO}}
\index{gUnLockFIFO@{gUnLockFIFO}!gio.h@{gio.h}}
\subsubsection[gUnLockFIFO]{\setlength{\rightskip}{0pt plus 5cm}int g\-Un\-Lock\-FIFO (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh})}}
\label{gio_8h_a46}


Unlocks access to the COMM board FIFO. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]gnat driver handle previously allocated \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success or GERR\_\-READY\_\-TIMEOUT on timeout. \end{Desc}
\hypertarget{gio_8h_a43}{
\index{gio.h@{gio.h}!gVersion@{gVersion}}
\index{gVersion@{gVersion}!gio.h@{gio.h}}
\subsubsection[gVersion]{\setlength{\rightskip}{0pt plus 5cm}g\-Version (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned short {\em hw\-Ver}, unsigned short {\em hw\-Rev}, unsigned short {\em sw\-Ver}, unsigned short {\em sw\-Rev})}}
\label{gio_8h_a43}


Checks the COMM Board hardware version/revision. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]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:]OK on success \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=98pt]{gio_8h_a43_cgraph}
\end{center}
\end{figure}
\hypertarget{gio_8h_a7}{
\index{gio.h@{gio.h}!gWritePF16@{gWritePF16}}
\index{gWritePF16@{gWritePF16}!gio.h@{gio.h}}
\subsubsection[gWritePF16]{\setlength{\rightskip}{0pt plus 5cm}g\-Write\-PF16 (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned short int {\em val})}}
\label{gio_8h_a7}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em val}]16-bit short word to write to play back FIFO \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a9}{g\-Write\-PF16v()}, \hyperlink{gio_8h_a10}{g\-Write\-PF32()}, \hyperlink{gio_8h_a12}{g\-Write\-PF32v()}, \hyperlink{gio_8h_a38}{g\-Set\-Out\-Mask()}\end{Desc}
The data is written to the play back FIFO -- the data is first XOR-ed with gh-$>$m\_\-out\-Mask before writing to the FIFO. \hypertarget{gio_8h_a8}{
\index{gio.h@{gio.h}!gWritePF16n@{gWritePF16n}}
\index{gWritePF16n@{gWritePF16n}!gio.h@{gio.h}}
\subsubsection[gWritePF16n]{\setlength{\rightskip}{0pt plus 5cm}g\-Write\-PF16n (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned short int {\em n\-Item}, unsigned short int {\em val})}}
\label{gio_8h_a8}


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 gh}]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 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a9}{g\-Write\-PF16v()}, \hyperlink{gio_8h_a10}{g\-Write\-PF32()}, \hyperlink{gio_8h_a12}{g\-Write\-PF32v()}, \hyperlink{gio_8h_a38}{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 gh-$>$m\_\-out\-Mask before writing to the FIFO. \hypertarget{gio_8h_a9}{
\index{gio.h@{gio.h}!gWritePF16v@{gWritePF16v}}
\index{gWritePF16v@{gWritePF16v}!gio.h@{gio.h}}
\subsubsection[gWritePF16v]{\setlength{\rightskip}{0pt plus 5cm}g\-Write\-PF16v (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned short int {\em n\-Val}, unsigned short int $\ast$ {\em a\-Val})}}
\label{gio_8h_a9}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]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 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a7}{g\-Write\-PF16()}, \hyperlink{gio_8h_a10}{g\-Write\-PF32()}, \hyperlink{gio_8h_a12}{g\-Write\-PF32v()}, \hyperlink{gio_8h_a38}{g\-Set\-Out\-Mask()}\end{Desc}
The data is written to the play back FIFO -- the data is first XOR-ed with gh-$>$m\_\-out\-Mask before writing to the FIFO. \hypertarget{gio_8h_a10}{
\index{gio.h@{gio.h}!gWritePF32@{gWritePF32}}
\index{gWritePF32@{gWritePF32}!gio.h@{gio.h}}
\subsubsection[gWritePF32]{\setlength{\rightskip}{0pt plus 5cm}g\-Write\-PF32 (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int {\em val})}}
\label{gio_8h_a10}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]handle of device \item[{\em val}]32-bit word to write to play back FIFO \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a12}{g\-Write\-PF32v()}, \hyperlink{gio_8h_a7}{g\-Write\-PF16()}, \hyperlink{gio_8h_a9}{g\-Write\-PF16v()}, \hyperlink{gio_8h_a38}{g\-Set\-Out\-Mask()}\end{Desc}
The data is written to the play back FIFO -- the data is first XOR-ed with gh-$>$m\_\-out\-Mask before writing to the FIFO. \hypertarget{gio_8h_a11}{
\index{gio.h@{gio.h}!gWritePF32n@{gWritePF32n}}
\index{gWritePF32n@{gWritePF32n}!gio.h@{gio.h}}
\subsubsection[gWritePF32n]{\setlength{\rightskip}{0pt plus 5cm}g\-Write\-PF32n (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned short int {\em n\-Item}, unsigned int {\em val})}}
\label{gio_8h_a11}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]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 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a12}{g\-Write\-PF32v()}, \hyperlink{gio_8h_a7}{g\-Write\-PF16()}, \hyperlink{gio_8h_a9}{g\-Write\-PF16v()}, \hyperlink{gio_8h_a38}{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 gh-$>$m\_\-out\-Mask before writing to the FIFO. \hypertarget{gio_8h_a12}{
\index{gio.h@{gio.h}!gWritePF32v@{gWritePF32v}}
\index{gWritePF32v@{gWritePF32v}!gio.h@{gio.h}}
\subsubsection[gWritePF32v]{\setlength{\rightskip}{0pt plus 5cm}g\-Write\-PF32v (\hyperlink{struct__gnat}{gnat\-Handle} {\em gh}, unsigned int {\em n\-Val}, unsigned int $\ast$ {\em a\-Val})}}
\label{gio_8h_a12}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gh}]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 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gio_8h_a10}{g\-Write\-PF32()}, \hyperlink{gio_8h_a7}{g\-Write\-PF16()}, \hyperlink{gio_8h_a9}{g\-Write\-PF16v()}, \hyperlink{gio_8h_a38}{g\-Set\-Out\-Mask()}\end{Desc}
The data is written to the play back FIFO -- the data is first XOR-ed with gh-$>$m\_\-out\-Mask before writing to the FIFO. 