\hypertarget{latc_8c}{
\section{latc.c File Reference}
\label{latc_8c}\index{latc.c@{latc.c}}
}
Provides the functionality associated with the principal LAT configuration interface along with the additional functions required by LPA and LCI. 

{\tt \#include \char`\"{}LATC/LATC\_\-msgs.h\char`\"{}}\par
{\tt \#include \char`\"{}latc\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}enums\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}consume.h\char`\"{}}\par
{\tt \#include \char`\"{}data.h\char`\"{}}\par
{\tt \#include \char`\"{}record.h\char`\"{}}\par
{\tt \#include \char`\"{}latp\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}AG\_\-reg\-Enums\_\-s.h\char`\"{}}\par
{\tt \#include \char`\"{}number.ic\char`\"{}}\par
{\tt \#include \char`\"{}PBS/MBA.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/WCT.h\char`\"{}}\par
{\tt \#include \char`\"{}MSG/MSG\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}LEM/list.h\char`\"{}}\par


Include dependency graph for latc.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=251pt]{latc_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{structLATC__controller}{LATC\_\-controller} $\ast$ \hyperlink{latc_8c_a1}{LATC\_\-new} (void)
\begin{CompactList}\small\item\em Allocate a new controller. \item\end{CompactList}\item 
void \hyperlink{latc_8c_a2}{LATC\_\-delete} (\hyperlink{structLATC__controller}{LATC\_\-controller} $\ast$cnt)
\begin{CompactList}\small\item\em Release the previously allocated resources. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a3}{LATC\_\-initialise} (void)
\begin{CompactList}\small\item\em Allocate the resources required for LATC. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a4}{LATC\_\-teardown} (void)
\begin{CompactList}\small\item\em Release the resources acquired by LATC\_\-initialise. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a5}{LATC\_\-cache} (unsigned fid)
\begin{CompactList}\small\item\em Read a LATC configuration. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a6}{LATC\_\-configure} (\hyperlink{structs_8h_a0}{LATC\_\-source} source, unsigned run\-Id)
\begin{CompactList}\small\item\em Configure the LAT using the currently cached configuration. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a7}{LATC\_\-verify} (\hyperlink{structs_8h_a0}{LATC\_\-source} source, unsigned run\-Id)
\begin{CompactList}\small\item\em Verify the captured configuration of the LAT matches the in-memory cache. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a8}{LATC\_\-capture} (void)
\begin{CompactList}\small\item\em Read the registers of the LAT. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a9}{LATC\_\-consign} (unsigned dst)
\begin{CompactList}\small\item\em Write out the captured data to file/SSR. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a10}{LATC\_\-ignore} (unsigned fid)
\begin{CompactList}\small\item\em Read the LATC ignore map file. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a11}{LATC\_\-get\-Cache\-Key} (void)
\begin{CompactList}\small\item\em Return the file key identifying the last cached configuration. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a12}{LATC\_\-get\-Configure\-Key} (void)
\begin{CompactList}\small\item\em Return the file key identifying the last configuration loaded. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a13}{LATC\_\-get\-Ignore\-Key} (void)
\begin{CompactList}\small\item\em Return the file key identifying the ignore map. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a14}{LATC\_\-load\-Afe\-Config} (unsigned int mask, unsigned int value0, unsigned int value1, unsigned int rc\-Mask, unsigned int fe\-Mask)
\begin{CompactList}\small\item\em Load the AFE configuration register. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a15}{LATC\_\-load\-Cfe\-Config0} (unsigned int mask, unsigned int value)
\begin{CompactList}\small\item\em Load CFE configuration register 0. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a16}{LATC\_\-load\-Cfe\-Config1} (unsigned int mask, unsigned int value0, unsigned int value1, unsigned int c\-Mask)
\begin{CompactList}\small\item\em Load CFE configuration register 1. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a17}{LATC\_\-load\-Tkr\-Splits} (int n\-Low, int n\-High)
\begin{CompactList}\small\item\em Load TKR splits values. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a18}{LATC\_\-load\-Tfe\-Dac} (unsigned int mask, unsigned int value, int n\-Low, int n\-High)
\begin{CompactList}\small\item\em Load the TFE DAC register. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a19}{LATC\_\-enable\-Triggers} (int marker)
\begin{CompactList}\small\item\em Enable triggers. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a20}{LATC\_\-disable\-Triggers} (int marker)
\begin{CompactList}\small\item\em Disable triggers. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a21}{LATC\_\-get\-Hsk\-Info} (\hyperlink{struct__LATC__hsk}{LATC\_\-hsk} $\ast$info)
\begin{CompactList}\small\item\em Get LATC housekeeping information. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a22}{LATC\_\-sizeof\-Hsk\-Info} (void)
\begin{CompactList}\small\item\em Get the size of the LATC housekeeping information. \item\end{CompactList}\item 
unsigned \hyperlink{latc_8c_a23}{LATC\_\-set\-Dirty} (void)
\begin{CompactList}\small\item\em Set the LATC \char`\"{}dirty\char`\"{} flag. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hypertarget{latc_8c_a0}{
static \hyperlink{structLATC__controller}{LATC\_\-controller} $\ast$ \hyperlink{latc_8c_a0}{latc}}
\label{latc_8c_a0}

\begin{CompactList}\small\item\em Pointer to the global \hyperlink{structLATC__controller}{LATC\_\-controller} structure. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Provides the functionality associated with the principal LAT configuration interface along with the additional functions required by LPA and LCI. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{latc_8c}{latc.c},v 1.47 2007/08/26 21:28:05 saxton Exp \end{Desc}


\subsection{Function Documentation}
\hypertarget{latc_8c_a5}{
\index{latc.c@{latc.c}!LATC_cache@{LATC\_\-cache}}
\index{LATC_cache@{LATC\_\-cache}!latc.c@{latc.c}}
\subsubsection[LATC\_\-cache]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-cache (unsigned {\em fid})}}
\label{latc_8c_a5}


Read a LATC configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fid}]The file ID of the master configuration file.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LATC\_\-BADFOPEN}]if the fid, or any of the names the configuration master file contains, does not match a valid file. \item[{\em LATC\_\-BADTYPE}]if the file contains a bad type identifier \item[{\em LATC\_\-BADREAD}]if an error occurs while the file is being read\end{description}
\end{Desc}
\hypertarget{latc_8c_a8}{
\index{latc.c@{latc.c}!LATC_capture@{LATC\_\-capture}}
\index{LATC_capture@{LATC\_\-capture}!latc.c@{latc.c}}
\subsubsection[LATC\_\-capture]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-capture (void)}}
\label{latc_8c_a8}


Read the registers of the LAT. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there was an error arising from one of the read commands\end{description}
\end{Desc}
\hypertarget{latc_8c_a6}{
\index{latc.c@{latc.c}!LATC_configure@{LATC\_\-configure}}
\index{LATC_configure@{LATC\_\-configure}!latc.c@{latc.c}}
\subsubsection[LATC\_\-configure]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-configure (\hyperlink{structs_8h_a0}{LATC\_\-source} {\em source}, unsigned {\em run\-Id})}}
\label{latc_8c_a6}


Configure the LAT using the currently cached configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em source}]The identity of the caller (LPA, LCI, command)\item[{\em run\-Id}]The ID of the run associated with an LPA or LCI source\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there are errors arising from the register load commands\end{description}
\end{Desc}
\hypertarget{latc_8c_a9}{
\index{latc.c@{latc.c}!LATC_consign@{LATC\_\-consign}}
\index{LATC_consign@{LATC\_\-consign}!latc.c@{latc.c}}
\subsubsection[LATC\_\-consign]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-consign (unsigned {\em dst})}}
\label{latc_8c_a9}


Write out the captured data to file/SSR. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]Ignored\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well. \item[{\em LATC\_\-BADFOPEN}]if the file cannot be created \item[{\em LATC\_\-BADWRITE}]if the final write of the buffer failed \item[{\em LATC\_\-BADCLOSE}]if the file close failed \item[{\em LATC\_\-BADWRITE}]if either the map or the configuration data write has an error\end{description}
\end{Desc}
\hypertarget{latc_8c_a2}{
\index{latc.c@{latc.c}!LATC_delete@{LATC\_\-delete}}
\index{LATC_delete@{LATC\_\-delete}!latc.c@{latc.c}}
\subsubsection[LATC\_\-delete]{\setlength{\rightskip}{0pt plus 5cm}void LATC\_\-delete (\hyperlink{structLATC__controller}{LATC\_\-controller} $\ast$ {\em cnt})}}
\label{latc_8c_a2}


Release the previously allocated resources. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnt}]Pointer to the controller structure\end{description}
\end{Desc}
\hypertarget{latc_8c_a20}{
\index{latc.c@{latc.c}!LATC_disableTriggers@{LATC\_\-disableTriggers}}
\index{LATC_disableTriggers@{LATC\_\-disableTriggers}!latc.c@{latc.c}}
\subsubsection[LATC\_\-disableTriggers]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-disable\-Triggers (int {\em marker})}}
\label{latc_8c_a20}


Disable triggers. 

The window open mask is cleared. If the marker parameter is non-zero, the LAT is first configured to broadcast a trigger message to CPUs upon receipt of a solicited trigger, a solicited trigger is fired, and the configuration restored from the LATC cache.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em marker}]If non-zero, causes a solicited trigger with this value in the event data.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands.\end{description}
\end{Desc}
\hypertarget{latc_8c_a19}{
\index{latc.c@{latc.c}!LATC_enableTriggers@{LATC\_\-enableTriggers}}
\index{LATC_enableTriggers@{LATC\_\-enableTriggers}!latc.c@{latc.c}}
\subsubsection[LATC\_\-enableTriggers]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-enable\-Triggers (int {\em marker})}}
\label{latc_8c_a19}


Enable triggers. 

The window open mask is loaded with the value held in the cache. If the marker parameter is non-zero, the LAT is first configured to broadcast a trigger message to CPUs upon receipt of a solicited trigger, a solicited trigger is fired, and the configuration restored from the LATC cache.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em marker}]If non-zero, causes a solicited trigger with this value in the event data.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands\end{description}
\end{Desc}
\hypertarget{latc_8c_a11}{
\index{latc.c@{latc.c}!LATC_getCacheKey@{LATC\_\-getCacheKey}}
\index{LATC_getCacheKey@{LATC\_\-getCacheKey}!latc.c@{latc.c}}
\subsubsection[LATC\_\-getCacheKey]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-get\-Cache\-Key (void)}}
\label{latc_8c_a11}


Return the file key identifying the last cached configuration. 

\begin{Desc}
\item[Returns:]The file key for the LATC master file of the last cached configuration\end{Desc}
\hypertarget{latc_8c_a12}{
\index{latc.c@{latc.c}!LATC_getConfigureKey@{LATC\_\-getConfigureKey}}
\index{LATC_getConfigureKey@{LATC\_\-getConfigureKey}!latc.c@{latc.c}}
\subsubsection[LATC\_\-getConfigureKey]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-get\-Configure\-Key (void)}}
\label{latc_8c_a12}


Return the file key identifying the last configuration loaded. 

\begin{Desc}
\item[Returns:]The file key for the LATC master file of the last configuration loaded\end{Desc}
\hypertarget{latc_8c_a21}{
\index{latc.c@{latc.c}!LATC_getHskInfo@{LATC\_\-getHskInfo}}
\index{LATC_getHskInfo@{LATC\_\-getHskInfo}!latc.c@{latc.c}}
\subsubsection[LATC\_\-getHskInfo]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-get\-Hsk\-Info (\hyperlink{struct__LATC__hsk}{LATC\_\-hsk} $\ast$ {\em info})}}
\label{latc_8c_a21}


Get LATC housekeeping information. 

LATC housekeeping information is copied to the supplied area.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em info}]The address of the area to receive the housekeeping information.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]Always success\end{description}
\end{Desc}
\hypertarget{latc_8c_a13}{
\index{latc.c@{latc.c}!LATC_getIgnoreKey@{LATC\_\-getIgnoreKey}}
\index{LATC_getIgnoreKey@{LATC\_\-getIgnoreKey}!latc.c@{latc.c}}
\subsubsection[LATC\_\-getIgnoreKey]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-get\-Ignore\-Key (void)}}
\label{latc_8c_a13}


Return the file key identifying the ignore map. 

\begin{Desc}
\item[Returns:]The file key for the ignore file\end{Desc}
\hypertarget{latc_8c_a10}{
\index{latc.c@{latc.c}!LATC_ignore@{LATC\_\-ignore}}
\index{LATC_ignore@{LATC\_\-ignore}!latc.c@{latc.c}}
\subsubsection[LATC\_\-ignore]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-ignore (unsigned {\em fid})}}
\label{latc_8c_a10}


Read the LATC ignore map file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fid}]ID of the file containing the map data to use as the ignore map\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well\end{description}
\end{Desc}
\hypertarget{latc_8c_a3}{
\index{latc.c@{latc.c}!LATC_initialise@{LATC\_\-initialise}}
\index{LATC_initialise@{LATC\_\-initialise}!latc.c@{latc.c}}
\subsubsection[LATC\_\-initialise]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-initialise (void)}}
\label{latc_8c_a3}


Allocate the resources required for LATC. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]Success \item[{\em LATC\_\-BADALLOC}]If there was an error allocating memory\end{description}
\end{Desc}
\hypertarget{latc_8c_a14}{
\index{latc.c@{latc.c}!LATC_loadAfeConfig@{LATC\_\-loadAfeConfig}}
\index{LATC_loadAfeConfig@{LATC\_\-loadAfeConfig}!latc.c@{latc.c}}
\subsubsection[LATC\_\-loadAfeConfig]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-load\-Afe\-Config (unsigned int {\em mask}, unsigned int {\em value0}, unsigned int {\em value1}, unsigned int {\em rc\-Mask}, unsigned int {\em fe\-Mask})}}
\label{latc_8c_a14}


Load the AFE configuration register. 

The AFE configuration register is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mask}]Mask of bits to be changed from the configuration.\item[{\em value0}]The value to be masked and merged with the configuration value for front-ends not selected by the RC and FE masks.\item[{\em value1}]The value to be masked and merged with the configuration value for front-ends selected by the RC and FE masks.\item[{\em rc\-Mask}]Mask of bits, one per RC, specifying which RCs are selected.\item[{\em fe\-Mask}]Mask of bits, one per FE, specifying which FEs within selected RCs are selected.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands\end{description}
\end{Desc}
\hypertarget{latc_8c_a15}{
\index{latc.c@{latc.c}!LATC_loadCfeConfig0@{LATC\_\-loadCfeConfig0}}
\index{LATC_loadCfeConfig0@{LATC\_\-loadCfeConfig0}!latc.c@{latc.c}}
\subsubsection[LATC\_\-loadCfeConfig0]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-load\-Cfe\-Config0 (unsigned int {\em mask}, unsigned int {\em value})}}
\label{latc_8c_a15}


Load CFE configuration register 0. 

CFE configuration register 0 is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mask}]Mask of bits to be changed from the configuration.\item[{\em value}]The value to be masked and merged with the configuration value.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands\end{description}
\end{Desc}
\hypertarget{latc_8c_a16}{
\index{latc.c@{latc.c}!LATC_loadCfeConfig1@{LATC\_\-loadCfeConfig1}}
\index{LATC_loadCfeConfig1@{LATC\_\-loadCfeConfig1}!latc.c@{latc.c}}
\subsubsection[LATC\_\-loadCfeConfig1]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-load\-Cfe\-Config1 (unsigned int {\em mask}, unsigned int {\em value0}, unsigned int {\em value1}, unsigned int {\em c\-Mask})}}
\label{latc_8c_a16}


Load CFE configuration register 1. 

CFE configuration register 1 is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mask}]Mask of bits to be changed from the configuration.\item[{\em value0}]The value to be masked and merged with the configuration value for front-ends whose bit is clear in the column mask.\item[{\em value1}]The value to be masked and merged with the configuration value for front-ends whose bit is set in the column mask.\item[{\em c\-Mask}]Mask of bits, one per column, specifying which value is to be used for loading the config register.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands\end{description}
\end{Desc}
\hypertarget{latc_8c_a18}{
\index{latc.c@{latc.c}!LATC_loadTfeDac@{LATC\_\-loadTfeDac}}
\index{LATC_loadTfeDac@{LATC\_\-loadTfeDac}!latc.c@{latc.c}}
\subsubsection[LATC\_\-loadTfeDac]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-load\-Tfe\-Dac (unsigned int {\em mask}, unsigned int {\em value}, int {\em n\-Low}, int {\em n\-High})}}
\label{latc_8c_a18}


Load the TFE DAC register. 

The TFE DAC register is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mask}]Mask of bits to be changed from the configuration.\item[{\em value}]The value to be masked and merged with the configuration value.\item[{\em n\-Low}]Number of TFEs talking on the low side, or -1 if the configured values are being used.\item[{\em n\-High}]Number of TFEs talking on the high side, or -1 if the configured values are being used.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands\end{description}
\end{Desc}
\hypertarget{latc_8c_a17}{
\index{latc.c@{latc.c}!LATC_loadTkrSplits@{LATC\_\-loadTkrSplits}}
\index{LATC_loadTkrSplits@{LATC\_\-loadTkrSplits}!latc.c@{latc.c}}
\subsubsection[LATC\_\-loadTkrSplits]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-load\-Tkr\-Splits (int {\em n\-Low}, int {\em n\-High})}}
\label{latc_8c_a17}


Load TKR splits values. 

The tracker RC and FE registers are loaded to reflect the given split values.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n\-Low}]Number of TFEs to talk on the low side, or -1 if the configured values are to be used.\item[{\em n\-High}]Number of TFEs to talk on the high side, or -1 if the configured values are to be used.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands\end{description}
\end{Desc}
\hypertarget{latc_8c_a1}{
\index{latc.c@{latc.c}!LATC_new@{LATC\_\-new}}
\index{LATC_new@{LATC\_\-new}!latc.c@{latc.c}}
\subsubsection[LATC\_\-new]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{structLATC__controller}{LATC\_\-controller}$\ast$ LATC\_\-new (void)}}
\label{latc_8c_a1}


Allocate a new controller. 

Allocate the resources required for the \hyperlink{structLATC__controller}{LATC\_\-controller} structure and initialise it

\begin{Desc}
\item[Returns:]Pointer to an allocated and initialised \hyperlink{structLATC__controller}{LATC\_\-controller} structure\end{Desc}
\hypertarget{latc_8c_a23}{
\index{latc.c@{latc.c}!LATC_setDirty@{LATC\_\-setDirty}}
\index{LATC_setDirty@{LATC\_\-setDirty}!latc.c@{latc.c}}
\subsubsection[LATC\_\-setDirty]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-set\-Dirty (void)}}
\label{latc_8c_a23}


Set the LATC \char`\"{}dirty\char`\"{} flag. 

This routine is used to indicate that a register whose value is normally managed by LATC has had its value changed externally, e.g. by LRA.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]Always success.\end{description}
\end{Desc}
\hypertarget{latc_8c_a22}{
\index{latc.c@{latc.c}!LATC_sizeofHskInfo@{LATC\_\-sizeofHskInfo}}
\index{LATC_sizeofHskInfo@{LATC\_\-sizeofHskInfo}!latc.c@{latc.c}}
\subsubsection[LATC\_\-sizeofHskInfo]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-sizeof\-Hsk\-Info (void)}}
\label{latc_8c_a22}


Get the size of the LATC housekeeping information. 

The size of the LATC housekeeping information block is returned.

\begin{Desc}
\item[Returns:]The size (in bytes) of the LATC housekeeping information.\end{Desc}
\hypertarget{latc_8c_a4}{
\index{latc.c@{latc.c}!LATC_teardown@{LATC\_\-teardown}}
\index{LATC_teardown@{LATC\_\-teardown}!latc.c@{latc.c}}
\subsubsection[LATC\_\-teardown]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-teardown (void)}}
\label{latc_8c_a4}


Release the resources acquired by LATC\_\-initialise. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]Always\end{description}
\end{Desc}
\hypertarget{latc_8c_a7}{
\index{latc.c@{latc.c}!LATC_verify@{LATC\_\-verify}}
\index{LATC_verify@{LATC\_\-verify}!latc.c@{latc.c}}
\subsubsection[LATC\_\-verify]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-verify (\hyperlink{structs_8h_a0}{LATC\_\-source} {\em source}, unsigned {\em run\-Id})}}
\label{latc_8c_a7}


Verify the captured configuration of the LAT matches the in-memory cache. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em source}]The identity of the caller (LPA, LCI, command)\item[{\em run\-Id}]The ID of the run associated with an LPA or LCI source\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]If the current LAT state matches the cached \item[{\em LATC\_\-DIFFER}]If the current LAT state differs from the cached\end{description}
\end{Desc}
