\hypertarget{start_8c}{
\section{start.c File Reference}
\label{start_8c}\index{start.c@{start.c}}
}
Provides functions to power on and configure the LAT.  


{\tt \#include \char`\"{}DUTIL/start.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB\_\-cfg\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/MBA.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/FORK.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/TASK.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/FPA.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LCB.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LCB\_\-log.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LCB\_\-init.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LCB\_\-io.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LCB\_\-dispatch.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LCB\_\-err.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LCB\_\-bulk.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LCB\_\-reg.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LIOX.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LIOX\_\-init.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LIOX\_\-sys.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LIOX\_\-sync.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LIOX\_\-cmd.h\char`\"{}}\par
{\tt \#include \char`\"{}LCB/LIOX\_\-addr.h\char`\"{}}\par
{\tt \#include \char`\"{}DAB/reg.h\char`\"{}}\par
{\tt \#include \char`\"{}DAB/scru.h\char`\"{}}\par
{\tt \#include \char`\"{}DAB/spdu.h\char`\"{}}\par
{\tt \#include \char`\"{}DAB/sgem.h\char`\"{}}\par
{\tt \#include \char`\"{}DAB/sebm.h\char`\"{}}\par
{\tt \#include \char`\"{}DEM/TEM\_\-reg.h\char`\"{}}\par
{\tt \#include \char`\"{}DEM/TEM\_\-CC\_\-sync.h\char`\"{}}\par
{\tt \#include \char`\"{}DEM/TEM\_\-GCCC\_\-sync.h\char`\"{}}\par
{\tt \#include \char`\"{}DEM/TEM\_\-GTIC\_\-sync.h\char`\"{}}\par
{\tt \#include \char`\"{}DEM/AEM\_\-reg.h\char`\"{}}\par
{\tt \#include \char`\"{}DEM/AEM\_\-CC\_\-sync.h\char`\"{}}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$string.h$>$}\par


Include dependency graph for start.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=196pt]{start_8c__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{start_8c_a0}{
\#define \hyperlink{start_8c_a0}{DEFAULT\_\-DELAY}\ 60}
\label{start_8c_a0}

\begin{CompactList}\small\item\em Time (in 60ths of a second) to wait after powering on a cpt before trying to configure it (used in add\-TEM). \item\end{CompactList}\item 
\hypertarget{start_8c_a1}{
\#define \hyperlink{start_8c_a1}{N\_\-CRU\_\-REGS}\ 3}
\label{start_8c_a1}

\begin{CompactList}\small\item\em Number of CRU registers to save and restore in use\-Other\-DAB. \item\end{CompactList}\item 
\hypertarget{start_8c_a2}{
\#define \hyperlink{start_8c_a2}{N\_\-EBM\_\-REGS}\ 8}
\label{start_8c_a2}

\begin{CompactList}\small\item\em Number of EBM registers to save and restore in use\-Other\-DAB. \item\end{CompactList}\item 
\#define \hyperlink{start_8c_a3}{\_\-printf}(format, args...)
\begin{CompactList}\small\item\em Provide printf-like functionality. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{start_8c_a4}{power\-On} (LIOXs slh, unsigned pri\-Mask, unsigned red\-Mask, unsigned delay)
\begin{CompactList}\small\item\em Configures the PDUs to power the required components of the LAT. \item\end{CompactList}\item 
int \hyperlink{start_8c_a5}{config\-CRU} (LIOXs slh, unsigned cpt\-Mask)
\begin{CompactList}\small\item\em Configures the CRU to allow LATp C/R with the specified components and sets the LATp addresses of those cpts. \item\end{CompactList}\item 
int \hyperlink{start_8c_a6}{config\-EBM} (LIOXs slh, unsigned cpt\-Mask)
\begin{CompactList}\small\item\em Configures the source and destination enables of the EBM. \item\end{CompactList}\item 
int \hyperlink{start_8c_a7}{config\-GEM} (LIOXs slh, unsigned cpt\-Mask)
\begin{CompactList}\small\item\em Configure the GEM. \item\end{CompactList}\item 
void \hyperlink{start_8c_a8}{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). \item\end{CompactList}\item 
unsigned \hyperlink{start_8c_a9}{use\-Other\-DAB} (LCB lcb, LIOXs slh)
\begin{CompactList}\small\item\em Stop using the current (prim/red) LATp fabric and switch to the other, transferring over the CRU and EBM configurations in the process. \item\end{CompactList}\item 
unsigned \hyperlink{start_8c_a10}{get\-EPUaddr} (LIOXs slh)
\begin{CompactList}\small\item\em Returns address to use in the event contributions. \item\end{CompactList}\item 
int \hyperlink{start_8c_a11}{add\-TEM} (LIOXs slh, unsigned tem\-ID, unsigned red\-PDU)
\begin{CompactList}\small\item\em Power on a TEM and configure it along with the CRU and EBM. \item\end{CompactList}\item 
int \hyperlink{start_8c_a12}{remove\-TEM} (LIOXs slh, unsigned tem\-ID)
\begin{CompactList}\small\item\em Power off a TEM and remove it from the CRU and EBM configurations. \item\end{CompactList}\item 
int \hyperlink{start_8c_a13}{add\-EPU} (LIOXs slh, unsigned epu\-ID, unsigned red\-PDU)
\begin{CompactList}\small\item\em Power on an EPU and configure it along with the CRU and EBM. \item\end{CompactList}\item 
int \hyperlink{start_8c_a14}{remove\-EPU} (LIOXs slh, unsigned epu\-ID)
\begin{CompactList}\small\item\em Power off an EPU and remove it from the CRU and EBM configurations. \item\end{CompactList}\item 
void \hyperlink{start_8c_a15}{cfg\-TEM} (LIOXs slh, unsigned tem\_\-addr)
\begin{CompactList}\small\item\em Configure a TEM to take an \char`\"{}empty\char`\"{} event. \item\end{CompactList}\item 
int \hyperlink{start_8c_a16}{power\-On\_\-load} (LIOXs slh, unsigned tem\-Mask, unsigned delay)
\begin{CompactList}\small\item\em Power on the CAL and TRK. \item\end{CompactList}\item 
unsigned int \hyperlink{start_8c_a17}{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 int \hyperlink{start_8c_a18}{t\_\-LCB\_\-drain\-Q} (LCB lcb)
\begin{CompactList}\small\item\em Drains the result and event hardware FIFOs. \item\end{CompactList}\item 
unsigned \hyperlink{start_8c_a19}{LCB\_\-startup} (LCB $\ast$p\-LCB, \hyperlink{struct__LCB__cfg}{LCB\_\-cfg} $\ast$cfg)
\begin{CompactList}\small\item\em Laundry list of LCB initializations. \item\end{CompactList}\item 
unsigned \hyperlink{start_8c_a20}{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_8c_a21}{LCB\_\-demote} (LIOXs slh)
\begin{CompactList}\small\item\em De-assert the LCB commander wire. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Provides functions to power on and configure the LAT. 

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


\subsection{Define Documentation}
\hypertarget{start_8c_a3}{
\index{start.c@{start.c}!_printf@{\_\-printf}}
\index{_printf@{\_\-printf}!start.c@{start.c}}
\subsubsection[\_\-printf]{\setlength{\rightskip}{0pt plus 5cm}\#define \_\-printf(format, args...)}}
\label{start_8c_a3}


{\bf Value:}

\footnotesize\begin{verbatim}printf ( __FUNCTION__"():%05d "format".\n" , __LINE__ , ## args); \
          fflush ( stdout);
\end{verbatim}\normalsize 
Provide printf-like functionality. 



\subsection{Function Documentation}
\hypertarget{start_8c_a13}{
\index{start.c@{start.c}!addEPU@{addEPU}}
\index{addEPU@{addEPU}!start.c@{start.c}}
\subsubsection[addEPU]{\setlength{\rightskip}{0pt plus 5cm}int add\-EPU (LIOXs {\em slh}, unsigned {\em epu\-ID}, unsigned {\em red\-PDU})}}
\label{start_8c_a13}


Power on an EPU and configure it along with the CRU and EBM. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em epu\-ID}]0 ... 2 \item[{\em red\-PDU}]0 -$>$ use Primary PDU, 1 -$>$ use Redundant PDU \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if successful, -1 if failed \end{Desc}
\hypertarget{start_8c_a11}{
\index{start.c@{start.c}!addTEM@{addTEM}}
\index{addTEM@{addTEM}!start.c@{start.c}}
\subsubsection[addTEM]{\setlength{\rightskip}{0pt plus 5cm}int add\-TEM (LIOXs {\em slh}, unsigned {\em tem\-ID}, unsigned {\em red\-PDU})}}
\label{start_8c_a11}


Power on a TEM and configure it along with the CRU and EBM. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em tem\-ID}]0 ... 15 \item[{\em red\-PDU}]0 -$>$ use Primary PDU, 1 -$>$ use Redundant PDU \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if successful, -1 if failed \end{Desc}
\hypertarget{start_8c_a15}{
\index{start.c@{start.c}!cfgTEM@{cfgTEM}}
\index{cfgTEM@{cfgTEM}!start.c@{start.c}}
\subsubsection[cfgTEM]{\setlength{\rightskip}{0pt plus 5cm}void cfg\-TEM (LIOXs {\em slh}, unsigned {\em tem\_\-addr})}}
\label{start_8c_a15}


Configure a TEM to take an \char`\"{}empty\char`\"{} event. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em tem\_\-addr}]Address of the TEM to configure \end{description}
\end{Desc}
\hypertarget{start_8c_a5}{
\index{start.c@{start.c}!configCRU@{configCRU}}
\index{configCRU@{configCRU}!start.c@{start.c}}
\subsubsection[configCRU]{\setlength{\rightskip}{0pt plus 5cm}int config\-CRU (LIOXs {\em slh}, unsigned {\em cpt\-Mask})}}
\label{start_8c_a5}


Configures the CRU to allow LATp C/R with the specified components and sets the LATp addresses of those cpts. 

int \hyperlink{start_8c_a5}{config\-CRU(LIOXs slh, unsigned cpt\-Mask)} \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em cpt\-Mask}]Bit mask indicating which components should be configured \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on success, -1 on failure \end{Desc}
1) Any component that is not specified in {\em cpt\-Mask\/} will be inaccessible following the execution of this function

2) Only the TEMs, DAB and PDUs are configured by this function.

3) {\em cpt\-Mask\/} is laid out in the manner of the CRU command and response enable bit masks (LAT-TD-01547, figs 12 \& 13).

TEM0 = 0x00000001 TEM1 = 0x00000002 TEM2 = 0x00000004 : TEMe = 0x00004000 TEMf = 0x00008000 PDU0 = 0x00010000 PDU1 = 0x00020000 GEM = 0x00040000 AEM = 0x00080000 EBM = 0x00100000 SIU0 = 0x01000000 SIU1 = 0x02000000 SIUx = 0x04000000 EPU0 = 0x08000000 EPU1 = 0x10000000 EPU2 = 0x20000000 \hypertarget{start_8c_a6}{
\index{start.c@{start.c}!configEBM@{configEBM}}
\index{configEBM@{configEBM}!start.c@{start.c}}
\subsubsection[configEBM]{\setlength{\rightskip}{0pt plus 5cm}int config\-EBM (LIOXs {\em slh}, unsigned {\em cpt\-Mask})}}
\label{start_8c_a6}


Configures the source and destination enables of the EBM. 

int \hyperlink{start_8c_a6}{config\-EBM(LIOXs slh, unsigned cpt\-Mask)} \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em cpt\-Mask}]Bit mask indicating which components should be configured \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on success, -1 on failure \end{Desc}
1) {\em cpt\-Mask\/} is the concatenation of registers 4-6 of the EBM controller block (LAT-TD-01546, the source enable registers) with an additional bit in the most- significant-byte representing the SSR

GEM = 0x00000001 TEM0 = 0x00000002 TEM1 = 0x00000004 TEM2 = 0x00000008 : TEMe = 0x00008000 TEMf = 0x00010000 AEM = 0x00020000 SIUX = 0x00040000 SIU0 = 0x00080000 SIU1 = 0x00100000 EPU0 = 0x00200000 EPU1 = 0x00400000 EPU2 = 0x00800000 \hypertarget{start_8c_a7}{
\index{start.c@{start.c}!configGEM@{configGEM}}
\index{configGEM@{configGEM}!start.c@{start.c}}
\subsubsection[configGEM]{\setlength{\rightskip}{0pt plus 5cm}int config\-GEM (LIOXs {\em slh}, unsigned {\em cpt\-Mask})}}
\label{start_8c_a7}


Configure the GEM. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em cpt\-Mask}]Indicates how the GEM should be configured \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on success, -1 on failure \end{Desc}
\hypertarget{start_8c_a17}{
\index{start.c@{start.c}!createSLH@{createSLH}}
\index{createSLH@{createSLH}!start.c@{start.c}}
\subsubsection[createSLH]{\setlength{\rightskip}{0pt plus 5cm}unsigned int create\-SLH (LCB {\em lcb}, LIOXs $\ast$ {\em slh})}}
\label{start_8c_a17}


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_8c_a10}{
\index{start.c@{start.c}!getEPUaddr@{getEPUaddr}}
\index{getEPUaddr@{getEPUaddr}!start.c@{start.c}}
\subsubsection[getEPUaddr]{\setlength{\rightskip}{0pt plus 5cm}unsigned get\-EPUaddr (LIOXs {\em slh})}}
\label{start_8c_a10}


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_8c_a21}{
\index{start.c@{start.c}!LCB_demote@{LCB\_\-demote}}
\index{LCB_demote@{LCB\_\-demote}!start.c@{start.c}}
\subsubsection[LCB\_\-demote]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCB\_\-demote (LIOXs {\em slh})}}
\label{start_8c_a21}


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_8c_a20}{
\index{start.c@{start.c}!LCB_promote@{LCB\_\-promote}}
\index{LCB_promote@{LCB\_\-promote}!start.c@{start.c}}
\subsubsection[LCB\_\-promote]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCB\_\-promote (LIOXs {\em slh})}}
\label{start_8c_a20}


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_8c_a19}{
\index{start.c@{start.c}!LCB_startup@{LCB\_\-startup}}
\index{LCB_startup@{LCB\_\-startup}!start.c@{start.c}}
\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_8c_a19}


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_8c_a19_cgraph}
\end{center}
\end{figure}
\hypertarget{start_8c_a4}{
\index{start.c@{start.c}!powerOn@{powerOn}}
\index{powerOn@{powerOn}!start.c@{start.c}}
\subsubsection[powerOn]{\setlength{\rightskip}{0pt plus 5cm}void power\-On (LIOXs {\em slh}, unsigned {\em pri\-Mask}, unsigned {\em red\-Mask}, unsigned {\em delay})}}
\label{start_8c_a4}


Configures the PDUs to power the required components of the LAT. 

void power\-On (LIOXs slh, unsigned pri\-Mask, unsigned red\-Mask, unsigned delay) \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em pri\-Mask}]Bit mask indicating which components should be powered on by the PRIMARY PDU \item[{\em red\-Mask}]Bit mask indicating which components should be powered on by the REDUNDANT PDU \item[{\em delay}]Time (in 60ths of a second) to wait after powering a cpt before powering the next \end{description}
\end{Desc}
1) Function assumes that the CRU is unconfigured so begins by configuring the CRU to access the requested PDUs and sets the LATp addresses of the aforementioned PDUs.

2) Currently only the Primary EPU DC-DC converters are available.

3) Currently only the Primary ACD supply and converters are available.

4) {\em pri\-Mask\/} and {\em red\-Mask\/} are laid out in the manner of the CRU command and response enable bit masks (LAT-TD-01547, figs 12 \& 13).

TEM0 = 0x00000001 TEM1 = 0x00000002 TEM2 = 0x00000004 : TEMe = 0x00004000 TEMf = 0x00008000 PDU0 = 0x00010000 PDU1 = 0x00020000 GEM = 0x00040000 AEM = 0x00080000 EBM = 0x00100000 SIU0 = 0x01000000 SIU1 = 0x02000000 SIUx = 0x04000000 EPU0 = 0x08000000 EPU1 = 0x10000000 EPU2 = 0x20000000 \hypertarget{start_8c_a16}{
\index{start.c@{start.c}!powerOn_load@{powerOn\_\-load}}
\index{powerOn_load@{powerOn\_\-load}!start.c@{start.c}}
\subsubsection[powerOn\_\-load]{\setlength{\rightskip}{0pt plus 5cm}int power\-On\_\-load (LIOXs {\em slh}, unsigned {\em tem\-Mask}, unsigned {\em delay})}}
\label{start_8c_a16}


Power on the CAL and TRK. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em tem\-Mask}]Bitmask indicating the load boards to power \item[{\em delay}]Time (in 60ths of a second) between each power-on command \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on success, -1 on failure \end{Desc}
\hypertarget{start_8c_a14}{
\index{start.c@{start.c}!removeEPU@{removeEPU}}
\index{removeEPU@{removeEPU}!start.c@{start.c}}
\subsubsection[removeEPU]{\setlength{\rightskip}{0pt plus 5cm}int remove\-EPU (LIOXs {\em slh}, unsigned {\em epu\-ID})}}
\label{start_8c_a14}


Power off an EPU and remove it from the CRU and EBM configurations. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em epu\-ID}]0 ... 3 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if successful, -1 if failed \end{Desc}
\hypertarget{start_8c_a12}{
\index{start.c@{start.c}!removeTEM@{removeTEM}}
\index{removeTEM@{removeTEM}!start.c@{start.c}}
\subsubsection[removeTEM]{\setlength{\rightskip}{0pt plus 5cm}int remove\-TEM (LIOXs {\em slh}, unsigned {\em tem\-ID})}}
\label{start_8c_a12}


Power off a TEM and remove it from the CRU and EBM configurations. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em slh}]Synchronous LIOX handle \item[{\em tem\-ID}]0 ... 15 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if successful, -1 if failed \end{Desc}
\hypertarget{start_8c_a18}{
\index{start.c@{start.c}!t_LCB_drainQ@{t\_\-LCB\_\-drainQ}}
\index{t_LCB_drainQ@{t\_\-LCB\_\-drainQ}!start.c@{start.c}}
\subsubsection[t\_\-LCB\_\-drainQ]{\setlength{\rightskip}{0pt plus 5cm}unsigned int t\_\-LCB\_\-drain\-Q (LCB {\em lcb})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{start_8c_a18}


Drains the result and event hardware FIFOs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]Initialized LCB handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]LCB\_\-OK \end{Desc}
\hypertarget{start_8c_a9}{
\index{start.c@{start.c}!useOtherDAB@{useOtherDAB}}
\index{useOtherDAB@{useOtherDAB}!start.c@{start.c}}
\subsubsection[useOtherDAB]{\setlength{\rightskip}{0pt plus 5cm}unsigned use\-Other\-DAB (LCB {\em lcb}, LIOXs {\em slh})}}
\label{start_8c_a9}


Stop using the current (prim/red) LATp fabric and switch to the other, transferring over the CRU and EBM configurations in the process. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]Pointer to the LCB \item[{\em slh}]Synchronous LIOX handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]DAB status code (DAB\_\-SUCCESS if all goes well) \end{Desc}


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


Invert the command and event path bits in the configuration registers of the LCB (change to the other LATp fabric). 

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