\hypertarget{LCBT_8c}{
\section{LCBT.c File Reference}
\label{LCBT_8c}\index{LCBT.c@{LCBT.c}}
}
Basic init and misc public funcs for LCBT module.  


{\tt \#include \char`\"{}PBS/PBS.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/MBA.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/CACHE.h\char`\"{}}\par
{\tt \#include \char`\"{}LCBT/LCBT\_\-init\-Board.h\char`\"{}}\par
{\tt \#include \char`\"{}LCBT/LCBT.h\char`\"{}}\par
{\tt \#include \char`\"{}trace.h\char`\"{}}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par


Include dependency graph for LCBT.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=307pt]{LCBT_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{LCBT_8c_a0}{LCBT\_\-init} (int latp\-Addr, int use\-Redundant\-Path)
\begin{CompactList}\small\item\em inits LCB driver and start 2 tasks associated with driver \item\end{CompactList}\item 
void \hyperlink{LCBT_8c_a1}{LCBT\_\-set\-Option} (unsigned int mask)
\begin{CompactList}\small\item\em set test option mask, see \hyperlink{LCBT_8h}{LCBT.h} for values \item\end{CompactList}\item 
void \hyperlink{LCBT_8c_a2}{LCBT\_\-set\-Event\-Watermarks} (int event\-QWatermark, int event\-Buff\-Watermark)
\begin{CompactList}\small\item\em Set watermarks to cause interrupts from Event\-Queue and Event\-Buff fifos. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Basic init and misc public funcs for LCBT module. 

\begin{Desc}
\item[Author:]Ed Bacho -- \href{mailto:ebacho@slac.stanford.edu}{\tt ebacho@slac.stanford.edu} \end{Desc}


\subsection{Function Documentation}
\hypertarget{LCBT_8c_a0}{
\index{LCBT.c@{LCBT.c}!LCBT_init@{LCBT\_\-init}}
\index{LCBT_init@{LCBT\_\-init}!LCBT.c@{LCBT.c}}
\subsubsection[LCBT\_\-init]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-init (int {\em latp\-Addr}, int {\em use\-Redundant\-Path})}}
\label{LCBT_8c_a0}


inits LCB driver and start 2 tasks associated with driver 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em latp\-Addr}]LATp addr to assign to this board \item[{\em use\-Redundant\-Path}]0=normal path, 1=redundant path \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0=sucess else indicates errors in init \end{Desc}
This routine inits the LCBT module. It must be called once after boot to setup the LCB driver for tests. (currently there is no way to shut down the driver, therefore to change the above parms, like latp\-Addr, one needs to reboot and call with new parameters. If this is called multiple times, the current LCB driver will create multiple tasks trying to listen to the ISR) 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=123pt]{LCBT_8c_a0_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8c_a2}{
\index{LCBT.c@{LCBT.c}!LCBT_setEventWatermarks@{LCBT\_\-setEventWatermarks}}
\index{LCBT_setEventWatermarks@{LCBT\_\-setEventWatermarks}!LCBT.c@{LCBT.c}}
\subsubsection[LCBT\_\-setEventWatermarks]{\setlength{\rightskip}{0pt plus 5cm}void LCBT\_\-set\-Event\-Watermarks (int {\em event\-QWatermark}, int {\em event\-Buff\-Watermark})}}
\label{LCBT_8c_a2}


Set watermarks to cause interrupts from Event\-Queue and Event\-Buff fifos. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em event\-QWatermark}]0=75\% full, 1=50\% full, 2=25\% full, 3=Not\-Empty \item[{\em event\-Buff\-Watermark}]0=75\% full, 1=50\% full, 2=25\% full, 3=Not\-Empty \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
Sets up watermarks that cause interrupts from Event\-Queue or Event\-Buff. The Event\-Queue can hold 1024 event descriptors and interrupts on the number of events currently in buffer. The Event\-Buff holds up 516K of data and interrupts on the amount of event data availible (as oppsed to the number of events) \hypertarget{LCBT_8c_a1}{
\index{LCBT.c@{LCBT.c}!LCBT_setOption@{LCBT\_\-setOption}}
\index{LCBT_setOption@{LCBT\_\-setOption}!LCBT.c@{LCBT.c}}
\subsubsection[LCBT\_\-setOption]{\setlength{\rightskip}{0pt plus 5cm}void LCBT\_\-set\-Option (unsigned int {\em mask})}}
\label{LCBT_8c_a1}


set test option mask, see \hyperlink{LCBT_8h}{LCBT.h} for values 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mask}]mask of tests options \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
