\hypertarget{gGARC_8h}{
\section{g\-GARC.h File Reference}
\label{gGARC_8h}\index{gGARC.h@{gGARC.h}}
}
command/response methods for the GARC  


\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{gGARC_8h_a0}{g\-GARCcmd} (\hyperlink{struct__gaem}{gaem\-Handle} ga, unsigned short garc\-Addr, unsigned short opcode)
\begin{CompactList}\small\item\em Sends a dataless command to the destination. \item\end{CompactList}\item 
int \hyperlink{gGARC_8h_a1}{g\-GARCload} (\hyperlink{struct__gaem}{gaem\-Handle} ga, unsigned short garc\-Addr, unsigned short reg\-Id, unsigned int val)
\begin{CompactList}\small\item\em Loads a register with value. \item\end{CompactList}\item 
int \hyperlink{gGARC_8h_a2}{g\-GARCread} (\hyperlink{struct__gaem}{gaem\-Handle} ga, unsigned short garc\-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 GARC 

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


\subsection{Function Documentation}
\hypertarget{gGARC_8h_a0}{
\index{gGARC.h@{g\-GARC.h}!gGARCcmd@{gGARCcmd}}
\index{gGARCcmd@{gGARCcmd}!gGARC.h@{g\-GARC.h}}
\subsubsection[gGARCcmd]{\setlength{\rightskip}{0pt plus 5cm}int g\-GARCcmd (\hyperlink{struct__gaem}{gaem\-Handle} {\em ga}, unsigned short {\em garc\-Addr}, unsigned short {\em opcode})}}
\label{gGARC_8h_a0}


Sends a dataless command to the destination. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ga}]gaem\-Handle for AEM \item[{\em garc\-Addr}]GARC address \item[{\em opcode}]opcode of command to send \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\hypertarget{gGARC_8h_a1}{
\index{gGARC.h@{g\-GARC.h}!gGARCload@{gGARCload}}
\index{gGARCload@{gGARCload}!gGARC.h@{g\-GARC.h}}
\subsubsection[gGARCload]{\setlength{\rightskip}{0pt plus 5cm}int g\-GARCload (\hyperlink{struct__gaem}{gaem\-Handle} {\em ga}, unsigned short {\em garc\-Addr}, unsigned short {\em reg}, unsigned int {\em value})}}
\label{gGARC_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 reg}]register of GARC to load \item[{\em value}]16-bit value to load into GARC register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Loads the GARC register specified by {\em reg\/} with {\em value\/} \hypertarget{gGARC_8h_a2}{
\index{gGARC.h@{g\-GARC.h}!gGARCread@{gGARCread}}
\index{gGARCread@{gGARCread}!gGARC.h@{g\-GARC.h}}
\subsubsection[gGARCread]{\setlength{\rightskip}{0pt plus 5cm}int g\-GARCread (\hyperlink{struct__gaem}{gaem\-Handle} {\em ga}, unsigned short {\em garc\-Addr}, unsigned short {\em reg}, unsigned int $\ast$ {\em val})}}
\label{gGARC_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 reg}]register of GARC 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 GARC register specified by {\em reg\/}. {\em val\/} is filled on return.

The following error codes are returned when LATp errors occur:

\begin{itemize}
\item GERR\_\-LATP\_\-HEADER\_\-PARITY \item GERR\_\-LATP\_\-CELL\_\-PARITY \item GERR\_\-LATP\_\-TRUNCATE \end{itemize}
