\hypertarget{gGAFE_8h}{
\section{g\-GAFE.h File Reference}
\label{gGAFE_8h}\index{gGAFE.h@{gGAFE.h}}
}
command/response methods for the GAFE  


\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{gGAFE_8h_a0}{g\-GAFEcmd} (\hyperlink{struct__gaem}{gaem\-Handle} ga, unsigned short garc\-Addr, unsigned short gafe\-Addr, unsigned short opcode)
\begin{CompactList}\small\item\em Sends a dataless command to the destination GAFE. \item\end{CompactList}\item 
int \hyperlink{gGAFE_8h_a1}{g\-GAFEload} (\hyperlink{struct__gaem}{gaem\-Handle} ga, unsigned short garc\-Addr, unsigned short gafe\-Addr, unsigned short reg\-Id, unsigned int val)
\begin{CompactList}\small\item\em Loads a register with value. \item\end{CompactList}\item 
int \hyperlink{gGAFE_8h_a2}{g\-GAFEread} (\hyperlink{struct__gaem}{gaem\-Handle} ga, unsigned short garc\-Addr, unsigned short gafe\-Addr, unsigned short reg\-Id, unsigned int $\ast$val)
\begin{CompactList}\small\item\em Reads a register returing value in {\em val\/}. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
command/response methods for the GAFE 

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


\subsection{Function Documentation}
\hypertarget{gGAFE_8h_a0}{
\index{gGAFE.h@{g\-GAFE.h}!gGAFEcmd@{gGAFEcmd}}
\index{gGAFEcmd@{gGAFEcmd}!gGAFE.h@{g\-GAFE.h}}
\subsubsection[gGAFEcmd]{\setlength{\rightskip}{0pt plus 5cm}int g\-GAFEcmd (\hyperlink{struct__gaem}{gaem\-Handle} {\em ga}, unsigned short {\em garc\-Addr}, unsigned short {\em gafe\-Addr}, unsigned short {\em opcode})}}
\label{gGAFE_8h_a0}


Sends a dataless command to the destination GAFE. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ga}]gaem\-Handle for AEM \item[{\em garc\-Addr}]GARC address \item[{\em gafe\-Addr}]GAFE address \item[{\em opcode}]opcode of command to send \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\hypertarget{gGAFE_8h_a1}{
\index{gGAFE.h@{g\-GAFE.h}!gGAFEload@{gGAFEload}}
\index{gGAFEload@{gGAFEload}!gGAFE.h@{g\-GAFE.h}}
\subsubsection[gGAFEload]{\setlength{\rightskip}{0pt plus 5cm}int g\-GAFEload (\hyperlink{struct__gaem}{gaem\-Handle} {\em ga}, unsigned short {\em garc\-Addr}, unsigned short {\em gafe\-Addr}, unsigned short {\em reg}, unsigned int {\em value})}}
\label{gGAFE_8h_a1}


Loads a register with value. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ga}]gaem\-Handle for AEM \item[{\em garc\-Addr}]GARC address \item[{\em gafe\-Addr}]GAFE address \item[{\em reg}]register of GAFE to load \item[{\em value}]16-bit value to load into GAFE register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Loads the GAFE register specified by {\em reg\/} with {\em value\/} \hypertarget{gGAFE_8h_a2}{
\index{gGAFE.h@{g\-GAFE.h}!gGAFEread@{gGAFEread}}
\index{gGAFEread@{gGAFEread}!gGAFE.h@{g\-GAFE.h}}
\subsubsection[gGAFEread]{\setlength{\rightskip}{0pt plus 5cm}int g\-GAFEread (\hyperlink{struct__gaem}{gaem\-Handle} {\em ga}, unsigned short {\em garc\-Addr}, unsigned short {\em gafe\-Addr}, unsigned short {\em reg}, unsigned int $\ast$ {\em val})}}
\label{gGAFE_8h_a2}


Reads a register returing value in {\em val\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ga}]gaem\-Handle for TEM \item[{\em garc\-Addr}]GARC address \item[{\em gafe\-Addr}]GAFE address \item[{\em reg}]register of GAFE to read \item[{\em val}]pointer to storage to hold the response of the read command \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Reads the GAFE register specified by {\em reg\/}. {\em val\/} is filled on return. 