\hypertarget{start_8h}{
\section{start.h File Reference}
\label{start_8h}\index{start.h@{start.h}}
}
Start the LCB.  


{\tt \#include \char`\"{}DUTIL/LCB\_\-cfg.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LIOX\_\-sync\_\-handle.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LCB.h\char`\"{}}\par


Include dependency graph for start.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=194pt]{start_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=37pt]{start_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned \hyperlink{start_8h_a0}{get\-EPUaddr} (LIOXs slh)
\begin{CompactList}\small\item\em Returns address to use in the event contributions. \item\end{CompactList}\item 
unsigned \hyperlink{start_8h_a1}{create\-SLH} (LCB lcb, LIOXs $\ast$slh)
\begin{CompactList}\small\item\em Allocate memory for and initializes Synchronous LIOX handle. \item\end{CompactList}\item 
unsigned \hyperlink{start_8h_a2}{LCB\_\-startup} (LCB $\ast$p\-LCB, \hyperlink{struct__LCB__cfg}{LCB\_\-cfg} $\ast$conf)
\begin{CompactList}\small\item\em Laundry list of LCB initializations. \item\end{CompactList}\item 
unsigned \hyperlink{start_8h_a3}{LCB\_\-promote} (LIOXs slh)
\begin{CompactList}\small\item\em Assert the LCB commander wire - field promotion from SLAVE to COMMANDER. \item\end{CompactList}\item 
unsigned \hyperlink{start_8h_a4}{LCB\_\-demote} (LIOXs slh)
\begin{CompactList}\small\item\em De-assert the LCB commander wire. \item\end{CompactList}\item 
void \hyperlink{start_8h_a5}{use\-Other\-LATp} (LCB lcb, LIOXs slh)
\begin{CompactList}\small\item\em Invert the command and event path bits in the configuration registers of the LCB (change to the other LATp fabric) Note that the switching is order dependant. Change the command path first, then change the event path. \item\end{CompactList}\item 
void \hyperlink{start_8h_a6}{use\-Primary\-LATp} (LCB lcb, LIOXs slh)
\begin{CompactList}\small\item\em Clear the C/R and event path bits Note that the switching is order dependant. Change the command path first, then change the event path. \item\end{CompactList}\item 
void \hyperlink{start_8h_a7}{use\-Redundant\-LATp} (LCB lcb, LIOXs slh)
\begin{CompactList}\small\item\em Set the C/R and event path bits Note that the switching is order dependant. Change the command path first, then change the event path. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Start the LCB. 

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


\subsection{Function Documentation}
\hypertarget{start_8h_a1}{
\index{start.h@{start.h}!createSLH@{createSLH}}
\index{createSLH@{createSLH}!start.h@{start.h}}
\subsubsection[createSLH]{\setlength{\rightskip}{0pt plus 5cm}unsigned create\-SLH (LCB {\em lcb}, LIOXs $\ast$ {\em slh})}}
\label{start_8h_a1}


Allocate memory for and initializes Synchronous LIOX handle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]Initialized LCB handle \item[{\em slh}]Pointer to uninitialed Synchronous LIOX handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]LCB\_\-OK \end{Desc}
\hypertarget{start_8h_a0}{
\index{start.h@{start.h}!getEPUaddr@{getEPUaddr}}
\index{getEPUaddr@{getEPUaddr}!start.h@{start.h}}
\subsubsection[getEPUaddr]{\setlength{\rightskip}{0pt plus 5cm}unsigned get\-EPUaddr (LIOXs {\em slh})}}
\label{start_8h_a0}


Returns address to use in the event contributions. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Destination address to use when configuring the GEM \end{Desc}
Once the round-robin functionality is available in the EBM, this will return 0. Until then it returns the address of the commander node. \hypertarget{start_8h_a4}{
\index{start.h@{start.h}!LCB_demote@{LCB\_\-demote}}
\index{LCB_demote@{LCB\_\-demote}!start.h@{start.h}}
\subsubsection[LCB\_\-demote]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCB\_\-demote (LIOXs {\em slh})}}
\label{start_8h_a4}


De-assert the LCB commander wire. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Status of the CSR write \end{Desc}
\hypertarget{start_8h_a3}{
\index{start.h@{start.h}!LCB_promote@{LCB\_\-promote}}
\index{LCB_promote@{LCB\_\-promote}!start.h@{start.h}}
\subsubsection[LCB\_\-promote]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCB\_\-promote (LIOXs {\em slh})}}
\label{start_8h_a3}


Assert the LCB commander wire - field promotion from SLAVE to COMMANDER. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Status of the CSR write \end{Desc}
\hypertarget{start_8h_a2}{
\index{start.h@{start.h}!LCB_startup@{LCB\_\-startup}}
\index{LCB_startup@{LCB\_\-startup}!start.h@{start.h}}
\subsubsection[LCB\_\-startup]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCB\_\-startup (LCB $\ast$ {\em p\-LCB}, \hyperlink{struct__LCB__cfg}{LCB\_\-cfg} $\ast$ {\em cfg})}}
\label{start_8h_a2}


Laundry list of LCB initializations. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-LCB}]pointer to hold Initialized LCB handle \item[{\em cfg}]Pointer to a LCB\_\-cfg structure containing configuration information \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]LCB\_\-OK \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=125pt]{start_8h_a2_cgraph}
\end{center}
\end{figure}
\hypertarget{start_8h_a5}{
\index{start.h@{start.h}!useOtherLATp@{useOtherLATp}}
\index{useOtherLATp@{useOtherLATp}!start.h@{start.h}}
\subsubsection[useOtherLATp]{\setlength{\rightskip}{0pt plus 5cm}void use\-Other\-LATp (LCB {\em lcb}, LIOXs {\em slh})}}
\label{start_8h_a5}


Invert the command and event path bits in the configuration registers of the LCB (change to the other LATp fabric) Note that the switching is order dependant. Change the command path first, then change the event path. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]Pointer to the LCB \item[{\em slh}]Synchronous LIOX handle \end{description}
\end{Desc}
\hypertarget{start_8h_a6}{
\index{start.h@{start.h}!usePrimaryLATp@{usePrimaryLATp}}
\index{usePrimaryLATp@{usePrimaryLATp}!start.h@{start.h}}
\subsubsection[usePrimaryLATp]{\setlength{\rightskip}{0pt plus 5cm}void use\-Primary\-LATp (LCB {\em lcb}, LIOXs {\em slh})}}
\label{start_8h_a6}


Clear the C/R and event path bits Note that the switching is order dependant. Change the command path first, then change the event path. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]Pointer to the LCB \item[{\em slh}]Synchronous LIOX handle \end{description}
\end{Desc}
\hypertarget{start_8h_a7}{
\index{start.h@{start.h}!useRedundantLATp@{useRedundantLATp}}
\index{useRedundantLATp@{useRedundantLATp}!start.h@{start.h}}
\subsubsection[useRedundantLATp]{\setlength{\rightskip}{0pt plus 5cm}void use\-Redundant\-LATp (LCB {\em lcb}, LIOXs {\em slh})}}
\label{start_8h_a7}


Set the C/R and event path bits Note that the switching is order dependant. Change the command path first, then change the event path. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]Pointer to the LCB \item[{\em slh}]Synchronous LIOX handle \end{description}
\end{Desc}
