\hypertarget{latp_8c}{
\section{latp.c File Reference}
\label{latp_8c}\index{latp.c@{latp.c}}
}
LATp operations. 

{\tt \#include \char`\"{}latp\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}error\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}map\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}data\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}AG\_\-init\-RIM\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}AG\_\-descriptions\_\-s.h\char`\"{}}\par
{\tt \#include \char`\"{}AG\_\-addr\_\-s.h\char`\"{}}\par
{\tt \#include \char`\"{}AG\_\-fld\-Enums\_\-s.h\char`\"{}}\par
{\tt \#include \char`\"{}AG\_\-reg\-Enums\_\-s.h\char`\"{}}\par
{\tt \#include \char`\"{}number.ic\char`\"{}}\par
{\tt \#include \char`\"{}LEM/defs.h\char`\"{}}\par


Include dependency graph for latp.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=393pt]{latp_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned \hyperlink{latp_8c_a0}{traverse\-Read} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$lem\_\-r, \hyperlink{lrd_8h_a0}{RIM\_\-type} type, unsigned $\ast$index, \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$addr, unsigned depth, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ign)
\begin{CompactList}\small\item\em Traverses the LAT reading the configuration for all nodes. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8c_a1}{traverse\-Load} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$lem\_\-l, \hyperlink{lrd_8h_a0}{RIM\_\-type} type, unsigned $\ast$index, \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$addr, unsigned depth)
\begin{CompactList}\small\item\em Traverses the LAT loading the configuration for any instances of the current component whose configuration differs from the default. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a2}{load\-Low\-SPT} (\hyperlink{structLEM__load}{LEM\_\-load} $\ast$lem\_\-l, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn, const \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$addr, short low)
\begin{CompactList}\small\item\em Set the mode registers on the low talking TFEs. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a3}{load\-High\-SPT} (\hyperlink{structLEM__load}{LEM\_\-load} $\ast$lem\_\-l, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn, const \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$addr, short high)
\begin{CompactList}\small\item\em Set the mode registers on the high talking GTFEs. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a4}{load\-Simple} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$lem\_\-l, \hyperlink{lrd_8h_a0}{RIM\_\-type} type)
\begin{CompactList}\small\item\em Load a generic LAT component. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a5}{load\-Split} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$lem\_\-l, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn)
\begin{CompactList}\small\item\em Load the layer splits. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a6}{load\-Tracker} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$lem\_\-l, \hyperlink{lrd_8h_a0}{RIM\_\-type} type)
\begin{CompactList}\small\item\em Load the tracker front ends from the configuration tree. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a7}{load\-Cpt} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$lem\_\-l, \hyperlink{lrd_8h_a0}{RIM\_\-type} type, unsigned index, const \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$addr)
\begin{CompactList}\small\item\em Sets all the registers of the target component. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a8}{read\-Simple} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$lem\_\-r, \hyperlink{lrd_8h_a0}{RIM\_\-type} type, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ign)
\begin{CompactList}\small\item\em Read the registers of one of the \char`\"{}simple\char`\"{} types. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a9}{read\-Split} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$lem\_\-r, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ign)
\begin{CompactList}\small\item\em Reads the current layer splits from the TRC TFE\_\-CNT settings. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a10}{read\-Tracker} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$lem\_\-r, \hyperlink{lrd_8h_a0}{RIM\_\-type} type, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ign)
\begin{CompactList}\small\item\em Reads the current TFE settings. \item\end{CompactList}\item 
static unsigned \hyperlink{latp_8c_a11}{read\-Cpt} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$lem\_\-r, \hyperlink{lrd_8h_a0}{RIM\_\-type} type, unsigned index, const \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$addr)
\begin{CompactList}\small\item\em Reads all the registers of the current component. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8c_a12}{RIM\_\-read} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, void $\ast$param, \hyperlink{latp_8h_a2}{RIM\_\-read\-Fn} $\ast$$\ast$read\-Fn, \hyperlink{latp_8h_a0}{RIM\_\-decode\-Fn} $\ast$$\ast$decode\-Fn, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ign)
\begin{CompactList}\small\item\em Populate the RIM structure with the current state of the LAT. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8c_a13}{RIM\_\-load} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, void $\ast$param, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn)
\begin{CompactList}\small\item\em Loads the LAT with the configuration held in {\em imm\/}. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8c_a14}{RIM\_\-load\-CFE} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, unsigned val, unsigned mask, unsigned shift, unsigned reg\-Id, void $\ast$param, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn)
\begin{CompactList}\small\item\em Load one of the CFE registers with a modified version of the value from the LAT configuration, with some portion of the register replaced by the {\em val\/} suitably masked and shifted. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8c_a15}{RIM\_\-load\-CFEmask} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, unsigned mask, void $\ast$param, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn)
\begin{CompactList}\small\item\em Load one of the CFE registers with a modified version of the value from the LAT configuration, with some portion of the register replaced by the {\em val\/} suitably masked and shifted. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8c_a16}{RIM\_\-load\-TDC} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, unsigned val, unsigned mask, unsigned shift, unsigned reg\-Id, void $\ast$param, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn)
\begin{CompactList}\small\item\em Load one of the TFE registers with a modified version of the value from the LAT configuration, with some portion of the register replaced by the {\em val\/} suitably masked and shifted. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8c_a17}{RIM\_\-enable\-All\-AFE} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, void $\ast$param, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn)
\begin{CompactList}\small\item\em Enable all channels of the ACD for charge injection calibration. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8c_a18}{RIM\_\-disable\-All\-AFE} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, void $\ast$param, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn)
\begin{CompactList}\small\item\em Disable all channels of the ACD for charge injection calibration. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8c_a19}{RIM\_\-enable\-AFE} (\hyperlink{rim_8h_a0}{RIM} $\ast$rim, unsigned rc, unsigned fe, void $\ast$param, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$load\-Fn)
\begin{CompactList}\small\item\em Enable one channel of the ACD for charge injection calibration. \item\end{CompactList}\item 
void \hyperlink{latp_8c_a20}{RIM\_\-set\-SPT} (void $\ast$ptr, unsigned short value, unsigned is\-High)
\begin{CompactList}\small\item\em Decode the result item use to populate a split. \item\end{CompactList}\item 
void \hyperlink{latp_8c_a21}{RIM\_\-correct} (\hyperlink{rim_8h_a0}{RIM} $\ast$orig, \hyperlink{rim_8h_a0}{RIM} $\ast$capt)
\begin{CompactList}\small\item\em Copy select portions of an original RIM into a copy, to ensure that the subsequent comparison will succeed. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
LATp operations. 

\begin{Desc}
\item[Author:]James Swain -- \href{mailto:jswain@slac.stanford.edu}{\tt jswain@slac.stanford.edu}\end{Desc}


\subsection{Function Documentation}
\hypertarget{latp_8c_a7}{
\index{latp.c@{latp.c}!loadCpt@{loadCpt}}
\index{loadCpt@{loadCpt}!latp.c@{latp.c}}
\subsubsection[loadCpt]{\setlength{\rightskip}{0pt plus 5cm}unsigned load\-Cpt (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$ {\em lem\_\-l}, \hyperlink{lrd_8h_a0}{RIM\_\-type} {\em type}, unsigned {\em index}, const \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$ {\em addr})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a7}


Sets all the registers of the target component. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]RIM structure containing the values to load onto the LAT \item[{\em lem\_\-l}]Pointer to the command/response lists to use for loading the LAT \item[{\em type}]Component type \item[{\em index}]Componenet instance being loaded \item[{\em addr}]Hierarchical representation of the index (address of the instance)\end{description}
\end{Desc}
\hypertarget{latp_8c_a3}{
\index{latp.c@{latp.c}!loadHighSPT@{loadHighSPT}}
\index{loadHighSPT@{loadHighSPT}!latp.c@{latp.c}}
\subsubsection[loadHighSPT]{\setlength{\rightskip}{0pt plus 5cm}unsigned load\-High\-SPT (\hyperlink{structLEM__load}{LEM\_\-load} $\ast$ {\em lem\_\-l}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn}, const \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$ {\em addr}, short {\em high})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a3}


Set the mode registers on the high talking GTFEs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lem\_\-l}]Pointer to the command and response lists used for loading the LAT \item[{\em load\-Fn}]Type ordered array of pointers to functions that load the LAT registers \item[{\em addr}]Pointer to an address structure used for loading the TFEs and TRC \item[{\em high}]ID of the lowest high talking TFE\end{description}
\end{Desc}
\hypertarget{latp_8c_a2}{
\index{latp.c@{latp.c}!loadLowSPT@{loadLowSPT}}
\index{loadLowSPT@{loadLowSPT}!latp.c@{latp.c}}
\subsubsection[loadLowSPT]{\setlength{\rightskip}{0pt plus 5cm}unsigned load\-Low\-SPT (\hyperlink{structLEM__load}{LEM\_\-load} $\ast$ {\em lem\_\-l}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn}, const \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$ {\em addr}, short {\em low})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a2}


Set the mode registers on the low talking TFEs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lem\_\-l}]Pointer to the command and response lists used for loading the LAT \item[{\em load\-Fn}]Type ordered array of pointers to functions that load the LAT registers \item[{\em addr}]Pointer to an address strcture used for loading the TFEs and TRC \item[{\em low}]ID of the highest low talking TFE\end{description}
\end{Desc}
\hypertarget{latp_8c_a4}{
\index{latp.c@{latp.c}!loadSimple@{loadSimple}}
\index{loadSimple@{loadSimple}!latp.c@{latp.c}}
\subsubsection[loadSimple]{\setlength{\rightskip}{0pt plus 5cm}unsigned load\-Simple (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$ {\em lem\_\-l}, \hyperlink{lrd_8h_a0}{RIM\_\-type} {\em type})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a4}


Load a generic LAT component. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]RIM structure containing the values to load onto the LAT \item[{\em lem\_\-l}]Pointer to command and response lists used for loading the LAT \item[{\em type}]Type of LAT component to load\end{description}
\end{Desc}
\hypertarget{latp_8c_a5}{
\index{latp.c@{latp.c}!loadSplit@{loadSplit}}
\index{loadSplit@{loadSplit}!latp.c@{latp.c}}
\subsubsection[loadSplit]{\setlength{\rightskip}{0pt plus 5cm}unsigned load\-Split (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$ {\em lem\_\-l}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a5}


Load the layer splits. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]RIM structure containing the values to load onto the LAT \item[{\em lem\_\-l}]Pointer to the command response lists used for loading the LAT \item[{\em load\-Fn}]Type ordered array of pointers to functions that load the LAT registers\end{description}
\end{Desc}
\hypertarget{latp_8c_a6}{
\index{latp.c@{latp.c}!loadTracker@{loadTracker}}
\index{loadTracker@{loadTracker}!latp.c@{latp.c}}
\subsubsection[loadTracker]{\setlength{\rightskip}{0pt plus 5cm}unsigned load\-Tracker (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$ {\em lem\_\-l}, \hyperlink{lrd_8h_a0}{RIM\_\-type} {\em type})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a6}


Load the tracker front ends from the configuration tree. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]RIM structure containing the values to load onto the LAT \item[{\em lem\_\-l}]Pointer to the command/response lists used for loading the LAT \item[{\em type}]Type of component being loaded, either TFE or TDC\end{description}
\end{Desc}
\hypertarget{latp_8c_a11}{
\index{latp.c@{latp.c}!readCpt@{readCpt}}
\index{readCpt@{readCpt}!latp.c@{latp.c}}
\subsubsection[readCpt]{\setlength{\rightskip}{0pt plus 5cm}unsigned read\-Cpt (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$ {\em lem\_\-r}, \hyperlink{lrd_8h_a0}{RIM\_\-type} {\em type}, unsigned {\em index}, const \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$ {\em addr})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a11}


Reads all the registers of the current component. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the structure to populate from the LAT register values \item[{\em lem\_\-r}]Command/response lists to use for the read \item[{\em type}]Cpt type being read \item[{\em index}]Instance of the component being read \item[{\em addr}]Hierarchical representation of the index (address of the instance to read).\end{description}
\end{Desc}
\hypertarget{latp_8c_a8}{
\index{latp.c@{latp.c}!readSimple@{readSimple}}
\index{readSimple@{readSimple}!latp.c@{latp.c}}
\subsubsection[readSimple]{\setlength{\rightskip}{0pt plus 5cm}unsigned read\-Simple (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$ {\em lem\_\-r}, \hyperlink{lrd_8h_a0}{RIM\_\-type} {\em type}, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ {\em ign})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a8}


Read the registers of one of the \char`\"{}simple\char`\"{} types. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]RIM structure being populated by the read operation \item[{\em lem\_\-r}]Pointer to the command/response lists and other structures used to read the LAT \item[{\em type}]Component type to read \item[{\em ign}]Map of the sections of the LAT known to be bad or not present so can be ignored.\end{description}
\end{Desc}
\hypertarget{latp_8c_a9}{
\index{latp.c@{latp.c}!readSplit@{readSplit}}
\index{readSplit@{readSplit}!latp.c@{latp.c}}
\subsubsection[readSplit]{\setlength{\rightskip}{0pt plus 5cm}unsigned read\-Split (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$ {\em lem\_\-r}, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ {\em ign})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a9}


Reads the current layer splits from the TRC TFE\_\-CNT settings. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the structure to populate from the LAT register values \item[{\em lem\_\-r}]Pointer to the command response lists \item[{\em ign}]Map of the sections of the LAT known to be bad or not present so can be ignored.\end{description}
\end{Desc}
\hypertarget{latp_8c_a10}{
\index{latp.c@{latp.c}!readTracker@{readTracker}}
\index{readTracker@{readTracker}!latp.c@{latp.c}}
\subsubsection[readTracker]{\setlength{\rightskip}{0pt plus 5cm}unsigned read\-Tracker (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$ {\em lem\_\-r}, \hyperlink{lrd_8h_a0}{RIM\_\-type} {\em type}, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ {\em ign})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{latp_8c_a10}


Reads the current TFE settings. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the structure to populate from the LAT register values \item[{\em lem\_\-r}]Pointer to the command/response lists used for reading the LAT \item[{\em type}]Component type being read (either TFE or TDC) \item[{\em ign}]Map of the sections of the LAT known to be bad ornot present so can be ignored.\end{description}
\end{Desc}
\hypertarget{latp_8c_a21}{
\index{latp.c@{latp.c}!RIM_correct@{RIM\_\-correct}}
\index{RIM_correct@{RIM\_\-correct}!latp.c@{latp.c}}
\subsubsection[RIM\_\-correct]{\setlength{\rightskip}{0pt plus 5cm}void RIM\_\-correct (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em orig}, \hyperlink{rim_8h_a0}{RIM} $\ast$ {\em capt})}}
\label{latp_8c_a21}


Copy select portions of an original RIM into a copy, to ensure that the subsequent comparison will succeed. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em orig}]Orignal RIM \item[{\em capt}]New copy of the RIM (probably captured from the LAT)\end{description}
\end{Desc}
\hypertarget{latp_8c_a18}{
\index{latp.c@{latp.c}!RIM_disableAllAFE@{RIM\_\-disableAllAFE}}
\index{RIM_disableAllAFE@{RIM\_\-disableAllAFE}!latp.c@{latp.c}}
\subsubsection[RIM\_\-disableAllAFE]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-disable\-All\-AFE (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, void $\ast$ {\em param}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn})}}
\label{latp_8c_a18}


Disable all channels of the ACD for charge injection calibration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the cached in-memory model of the LAT registers \item[{\em param}]Parameter passed through to the load function \item[{\em load\-Fn}]Type ordered array of functions that load a given type of LAT register \item[{\em param}]Parameter passed through to the load function\end{description}
\end{Desc}
\hypertarget{latp_8c_a19}{
\index{latp.c@{latp.c}!RIM_enableAFE@{RIM\_\-enableAFE}}
\index{RIM_enableAFE@{RIM\_\-enableAFE}!latp.c@{latp.c}}
\subsubsection[RIM\_\-enableAFE]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-enable\-AFE (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, unsigned {\em rc}, unsigned {\em fe}, void $\ast$ {\em param}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn})}}
\label{latp_8c_a19}


Enable one channel of the ACD for charge injection calibration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the cached in-memory model of the LAT registers \item[{\em rc}]ID of the FREE board holding the channel to enable \item[{\em fe}]ID of the channel to enable \item[{\em param}]Parameter passed through to the load function \item[{\em load\-Fn}]Type ordered array of functions that load a given type of LAT register\end{description}
\end{Desc}
\hypertarget{latp_8c_a17}{
\index{latp.c@{latp.c}!RIM_enableAllAFE@{RIM\_\-enableAllAFE}}
\index{RIM_enableAllAFE@{RIM\_\-enableAllAFE}!latp.c@{latp.c}}
\subsubsection[RIM\_\-enableAllAFE]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-enable\-All\-AFE (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, void $\ast$ {\em param}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn})}}
\label{latp_8c_a17}


Enable all channels of the ACD for charge injection calibration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the cached in-memory model of the LAT registers \item[{\em load\-Fn}]Type ordered array of pointers to functions that load the LAT registers \item[{\em param}]Parameter passed through to the load function\end{description}
\end{Desc}
\hypertarget{latp_8c_a13}{
\index{latp.c@{latp.c}!RIM_load@{RIM\_\-load}}
\index{RIM_load@{RIM\_\-load}!latp.c@{latp.c}}
\subsubsection[RIM\_\-load]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-load (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, void $\ast$ {\em param}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn})}}
\label{latp_8c_a13}


Loads the LAT with the configuration held in {\em imm\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the RIM structure to populate from the LAT \item[{\em param}]Pointer passed through to the {\em load\-Reg\-Fn\/} \item[{\em load\-Fn}]Type ordered array of pointers to functions that load the LAT registers\end{description}
\end{Desc}
\hypertarget{latp_8c_a14}{
\index{latp.c@{latp.c}!RIM_loadCFE@{RIM\_\-loadCFE}}
\index{RIM_loadCFE@{RIM\_\-loadCFE}!latp.c@{latp.c}}
\subsubsection[RIM\_\-loadCFE]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-load\-CFE (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, unsigned {\em val}, unsigned {\em mask}, unsigned {\em shift}, unsigned {\em reg\-Id}, void $\ast$ {\em param}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn})}}
\label{latp_8c_a14}


Load one of the CFE registers with a modified version of the value from the LAT configuration, with some portion of the register replaced by the {\em val\/} suitably masked and shifted. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the cached in-memory model of the LAT registers \item[{\em val}]Value to use in place of some part of one of the CFE registers \item[{\em mask}]Bit mask of the fields of the register being replaced \item[{\em shift}]Offset into the register of the LSB of the value \item[{\em reg\-Id}]The register ID (from LEM/defs.h) of the register being manipulated \item[{\em param}]Parameter passed through to the load function \item[{\em load\-Fn}]Type ordered array of pointers to functions that load the LAT registers\end{description}
\end{Desc}
\hypertarget{latp_8c_a15}{
\index{latp.c@{latp.c}!RIM_loadCFEmask@{RIM\_\-loadCFEmask}}
\index{RIM_loadCFEmask@{RIM\_\-loadCFEmask}!latp.c@{latp.c}}
\subsubsection[RIM\_\-loadCFEmask]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-load\-CFEmask (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, unsigned {\em mask}, void $\ast$ {\em param}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn})}}
\label{latp_8c_a15}


Load one of the CFE registers with a modified version of the value from the LAT configuration, with some portion of the register replaced by the {\em val\/} suitably masked and shifted. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the cached in-memory model of the LAT registers \item[{\em mask}]CFEs to enable for calibration \item[{\em param}]Parameter passed through to the load function \item[{\em load\-Fn}]Type ordered array of pointers to functions that load the LAT registers \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well\end{description}
\end{Desc}
\hypertarget{latp_8c_a16}{
\index{latp.c@{latp.c}!RIM_loadTDC@{RIM\_\-loadTDC}}
\index{RIM_loadTDC@{RIM\_\-loadTDC}!latp.c@{latp.c}}
\subsubsection[RIM\_\-loadTDC]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-load\-TDC (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, unsigned {\em val}, unsigned {\em mask}, unsigned {\em shift}, unsigned {\em reg\-Id}, void $\ast$ {\em param}, \hyperlink{latp_8h_a1}{RIM\_\-load\-Fn} $\ast$$\ast$ {\em load\-Fn})}}
\label{latp_8c_a16}


Load one of the TFE registers with a modified version of the value from the LAT configuration, with some portion of the register replaced by the {\em val\/} suitably masked and shifted. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the in-memory model holding the LAT registers \item[{\em val}]Value to use in place of some part of one of the TFE registers \item[{\em mask}]Bit mask of the fields of the register being replaced \item[{\em shift}]Offset into the register of the LSB of the value \item[{\em reg\-Id}]The register ID (from LEM/defs.h) of the register being manipulated \item[{\em load\-Fn}]Type ordered array of pointers to functions that load the LAT registers \item[{\em param}]Parameter passed through to the load function\end{description}
\end{Desc}
\hypertarget{latp_8c_a12}{
\index{latp.c@{latp.c}!RIM_read@{RIM\_\-read}}
\index{RIM_read@{RIM\_\-read}!latp.c@{latp.c}}
\subsubsection[RIM\_\-read]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-read (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, void $\ast$ {\em param}, \hyperlink{latp_8h_a2}{RIM\_\-read\-Fn} $\ast$$\ast$ {\em read\-Fn}, \hyperlink{latp_8h_a0}{RIM\_\-decode\-Fn} $\ast$$\ast$ {\em decode\-Fn}, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ {\em ign})}}
\label{latp_8c_a12}


Populate the RIM structure with the current state of the LAT. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the RIM structure to populate from the LAT \item[{\em param}]Pointer passed through to the {\em read\-Reg\-Fn\/} \item[{\em read\-Fn}]Type ordered array of pointers to functions that read the LAT registers \item[{\em decode\-Fn}]Type ordered array of pointers to functions that decode the register responses \item[{\em ign}]Map of the sections of the LAT known to be bad or not present so can be ignored.\end{description}
\end{Desc}
\hypertarget{latp_8c_a20}{
\index{latp.c@{latp.c}!RIM_setSPT@{RIM\_\-setSPT}}
\index{RIM_setSPT@{RIM\_\-setSPT}!latp.c@{latp.c}}
\subsubsection[RIM\_\-setSPT]{\setlength{\rightskip}{0pt plus 5cm}void RIM\_\-set\-SPT (void $\ast$ {\em ptr}, unsigned short {\em value}, unsigned {\em is\-High})}}
\label{latp_8c_a20}


Decode the result item use to populate a split. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ptr}]Pointer to memory location to put decoded value \item[{\em value}]One of the split fields \item[{\em is\-High}]Indicates which of the split fields this is\end{description}
\end{Desc}
\hypertarget{latp_8c_a1}{
\index{latp.c@{latp.c}!traverseLoad@{traverseLoad}}
\index{traverseLoad@{traverseLoad}!latp.c@{latp.c}}
\subsubsection[traverseLoad]{\setlength{\rightskip}{0pt plus 5cm}unsigned traverse\-Load (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__load}{LEM\_\-load} $\ast$ {\em lem\_\-l}, \hyperlink{lrd_8h_a0}{RIM\_\-type} {\em type}, unsigned $\ast$ {\em index}, \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$ {\em addr}, unsigned {\em depth})}}
\label{latp_8c_a1}


Traverses the LAT loading the configuration for any instances of the current component whose configuration differs from the default. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]RIM structure containing the values to load onto the LAT \item[{\em lem\_\-l}]Pointer to the command response lists used for loading the LAT \item[{\em type}]Type of component to load \item[{\em index}]Pointer to the index of the next instance to load \item[{\em addr}]Hierarchical representation of the index \item[{\em depth}]Number of recursive calls to traverse\_\-Load\end{description}
\end{Desc}
\hypertarget{latp_8c_a0}{
\index{latp.c@{latp.c}!traverseRead@{traverseRead}}
\index{traverseRead@{traverseRead}!latp.c@{latp.c}}
\subsubsection[traverseRead]{\setlength{\rightskip}{0pt plus 5cm}unsigned traverse\-Read (\hyperlink{rim_8h_a0}{RIM} $\ast$ {\em rim}, \hyperlink{structLEM__read}{LEM\_\-read} $\ast$ {\em lem\_\-r}, \hyperlink{lrd_8h_a0}{RIM\_\-type} {\em type}, unsigned $\ast$ {\em index}, \hyperlink{unionRIM__addr}{RIM\_\-addr} $\ast$ {\em addr}, unsigned {\em depth}, const \hyperlink{structRIM__map__}{RIM\_\-map} $\ast$ {\em ign})}}
\label{latp_8c_a0}


Traverses the LAT reading the configuration for all nodes. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the structure to populate from the LAT register values \item[{\em lem\_\-r}]Pointer to the command/response lists used for reading the LAT \item[{\em type}]The type of component to read \item[{\em index}]Pointer to a variable tracking the current instance being read \item[{\em addr}]Pointer to an address structure containing the same information as index, but in heirarchical form \item[{\em depth}]Number of times this function has been recursively called. \item[{\em ign}]Map of the sections of the LAT known to be bad or not present so can be ignored.\end{description}
\end{Desc}
