\hypertarget{gGCRC_8h}{
\section{g\-GCRC.h File Reference}
\label{gGCRC_8h}\index{gGCRC.h@{gGCRC.h}}
}
command/response methods for the GCRC  


\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{gGCRC_8h_a0}{g\-GCRCcmd} (\hyperlink{struct__gtem}{gtem\-Handle} gt, unsigned short tem\-Addr, unsigned short gccc\-Addr, unsigned short gcrc\-Addr, unsigned short opcode)
\begin{CompactList}\small\item\em Sends a dataless command to the destination. \item\end{CompactList}\item 
int \hyperlink{gGCRC_8h_a1}{g\-GCRCload} (\hyperlink{struct__gtem}{gtem\-Handle} gt, unsigned short tem\-Addr, unsigned short gccc\-Addr, unsigned short gcrc\-Addr, unsigned short reg\-Id, unsigned short val)
\begin{CompactList}\small\item\em Loads a register with value. \item\end{CompactList}\item 
int \hyperlink{gGCRC_8h_a2}{g\-GCRCread} (\hyperlink{struct__gtem}{gtem\-Handle} gt, unsigned short tem\-Addr, unsigned short gccc\-Addr, unsigned short gcrc\-Addr, unsigned short reg\-Id, unsigned short $\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 GCRC 

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


\subsection{Function Documentation}
\hypertarget{gGCRC_8h_a0}{
\index{gGCRC.h@{g\-GCRC.h}!gGCRCcmd@{gGCRCcmd}}
\index{gGCRCcmd@{gGCRCcmd}!gGCRC.h@{g\-GCRC.h}}
\subsubsection[gGCRCcmd]{\setlength{\rightskip}{0pt plus 5cm}int g\-GCRCcmd (\hyperlink{struct__gtem}{gtem\-Handle} {\em gt}, unsigned short {\em tem\-Addr}, unsigned short {\em gccc\-Addr}, unsigned short {\em gcrc\-Addr}, unsigned short {\em opcode})}}
\label{gGCRC_8h_a0}


Sends a dataless command to the destination. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gt}]gtem\-Handle for TEM \item[{\em tem\-Addr}]TEM address \item[{\em gccc\-Addr}]GCCC address \item[{\em gcrc\-Addr}]GCRC address \item[{\em opcode}]opcode of command to send \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\hypertarget{gGCRC_8h_a1}{
\index{gGCRC.h@{g\-GCRC.h}!gGCRCload@{gGCRCload}}
\index{gGCRCload@{gGCRCload}!gGCRC.h@{g\-GCRC.h}}
\subsubsection[gGCRCload]{\setlength{\rightskip}{0pt plus 5cm}int g\-GCRCload (\hyperlink{struct__gtem}{gtem\-Handle} {\em gt}, unsigned short {\em tem\-Addr}, unsigned short {\em gccc\-Addr}, unsigned short {\em gcrc\-Addr}, unsigned short {\em reg}, unsigned short {\em value})}}
\label{gGCRC_8h_a1}


Loads a register with value. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gt}]gtem\-Handle for TEM \item[{\em tem\-Addr}]TEM address \item[{\em gccc\-Addr}]GCCC address \item[{\em gcrc\-Addr}]GCRC address \item[{\em reg}]register of GCRC to load \item[{\em value}]16-bit value to load into GCRC register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Loads the GCRC register specified by {\em reg\/} with {\em value\/} \hypertarget{gGCRC_8h_a2}{
\index{gGCRC.h@{g\-GCRC.h}!gGCRCread@{gGCRCread}}
\index{gGCRCread@{gGCRCread}!gGCRC.h@{g\-GCRC.h}}
\subsubsection[gGCRCread]{\setlength{\rightskip}{0pt plus 5cm}int g\-GCRCread (\hyperlink{struct__gtem}{gtem\-Handle} {\em gt}, unsigned short {\em tem\-Addr}, unsigned short {\em gccc\-Addr}, unsigned short {\em gcrc\-Addr}, unsigned short {\em reg}, unsigned short $\ast$ {\em val})}}
\label{gGCRC_8h_a2}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gt}]gtem\-Handle for TEM \item[{\em tem\-Addr}]tem\-Addrination of command \item[{\em gccc\-Addr}]GCCC address \item[{\em gcrc\-Addr}]GCRC address \item[{\em reg}]register of GCRC 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}
\begin{Desc}
\item[See also:]\_\-g\-GCRCread()\end{Desc}
Reads the GCRC 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}
