\hypertarget{tpg_8c}{
\section{tpg.c File Reference}
\label{tpg_8c}\index{tpg.c@{tpg.c}}
}
Trigger Pattern Generator command-line user interface.  


{\tt \#include \char`\"{}TPG/TPG\_\-msgs.h\char`\"{}}\par
{\tt \#include \char`\"{}tpg\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}tpgmap.h\char`\"{}}\par
{\tt \#include \char`\"{}LEM/cli.h\char`\"{}}\par
{\tt \#include \char`\"{}MSG/MSG\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}MSG/MSG\_\-msgs.h\char`\"{}}\par
{\tt \#include \char`\"{}MSG/MSG\_\-print\-Proc.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/PBS.h\char`\"{}}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$stddef.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$task\-Lib.h$>$}\par


Include dependency graph for tpg.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=124pt]{tpg_8c__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{tpg_8c_a0}{
\#define \hyperlink{tpg_8c_a0}{TPG\_\-DEBUG\_\-NONE}\ 0x00000000}
\label{tpg_8c_a0}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a1}{
\#define \hyperlink{tpg_8c_a1}{TPG\_\-DEBUG\_\-CLK\_\-SEL}\ 0x00000001}
\label{tpg_8c_a1}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a2}{
\#define \hyperlink{tpg_8c_a2}{TPG\_\-TIME\_\-IN\_\-CMD}}
\label{tpg_8c_a2}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a3}{
\#define \hyperlink{tpg_8c_a3}{INC\_\-CNT\_\-MAX}\ 8}
\label{tpg_8c_a3}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{tpg_8c_a26}{TPGupdate\-Cached\-Cnt} (unsigned count)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a27}{TPGn\-Boards} (\hyperlink{struct__TPG}{TPG} $\ast$this)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a28}{TPGgtb\-Present} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned board\-Id)
\begin{CompactList}\small\item\em Test for board presence. \item\end{CompactList}\item 
\hyperlink{struct__TPG}{TPG} $\ast$ \hyperlink{tpg_8c_a29}{TPGnew} (unsigned $\ast$brd\-Addr)
\begin{CompactList}\small\item\em Calls calloc to allocate memory for the struct and associated buffers then sets the buffer pointers to the correct offsets. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a30}{TPGclear} (\hyperlink{struct__TPG}{TPG} $\ast$this)
\begin{CompactList}\small\item\em Sets all the buffers to 0. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a31}{TPGclear\-Buf} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned buffer\-Id)
\begin{CompactList}\small\item\em Sets the buffer indicated by {\em buffer\-Id\/} to 0. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a32}{TPGset\-TEM} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned tem\_\-id, unsigned trg, unsigned start, unsigned pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em tem\_\-id\/} and {\em trg\/}. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a33}{TPGset\-VETO} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned free\_\-id, unsigned veto\_\-id, unsigned start, unsigned pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em free\_\-id\/} and {\em veto\_\-id\/}. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a34}{TPGset\-CNO} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned free\_\-id, unsigned start, unsigned pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em free\_\-id\/} and {\em veto\_\-id\/}. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a35}{TPGset\-Ext\-Trig} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned start, unsigned pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the external trigger buffer. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a36}{TPGset\-TEMv} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned tem\_\-id, unsigned trg, unsigned start, unsigned $\ast$pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em tem\_\-id\/} and {\em trg\/}. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a37}{TPGset\-VETOv} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned free\_\-id, unsigned veto\_\-id, unsigned start, unsigned $\ast$pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em free\_\-id\/} and {\em veto\_\-id\/}. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a38}{TPGset\-CNOv} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned free\_\-id, unsigned start, unsigned $\ast$pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em free\_\-id\/} and {\em veto\_\-id\/}. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a39}{TPGset\-Ext\-Trigv} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned start, unsigned $\ast$pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the external trigger buffer. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a40}{TPGdelay} (\hyperlink{struct__TPG}{TPG} $\ast$this, int gtb\-Id, int clk\-Delay)
\begin{CompactList}\small\item\em Delay the COMM I/O board start by n clocks. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a41}{TPGload} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned char $\ast$clk\-Delay)
\begin{CompactList}\small\item\em Use Programmed I/O to fill the COMM board FIFOs. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a42}{TPGarm} (\hyperlink{struct__TPG}{TPG} $\ast$this, \hyperlink{GTBtypes_8h_a2}{gtb\-Trig\_\-t} trig)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a43}{TPGgem\-Start} (\hyperlink{struct__TPG}{TPG} $\ast$this)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a44}{TPGstart\-Cmd} (\hyperlink{struct__TPG}{TPG} $\ast$this)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a45}{TPGstart\-VME} (\hyperlink{struct__TPG}{TPG} $\ast$this)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a46}{TPGstart} (\hyperlink{struct__TPG}{TPG} $\ast$this)
\begin{CompactList}\small\item\em Start the playback. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a47}{TPGdump\-TEM} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned start, unsigned len)
\begin{CompactList}\small\item\em Print out the bit patterns in the TEM buffer. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a48}{TPGdump\-FREE} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned free\_\-id, unsigned start, unsigned len)
\begin{CompactList}\small\item\em Print out the bit patterns in the free board. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a49}{TPGdump\-CNO} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned start, unsigned len)
\begin{CompactList}\small\item\em Print out the bit patterns in the CNO buffer. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a50}{TPGdump} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned board\-Id, unsigned start, unsigned len)
\begin{CompactList}\small\item\em Print out the bit patterns in the requested board. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a51}{\_\-check\-Bounds} (unsigned start, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Checks that the requested addition to the buffer does not exceed the boundaries. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a52}{\_\-set\-Bits} (unsigned $\ast$fifo, unsigned channel, unsigned start, unsigned pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into {\em channel\/} and in buffer indicated by {\em board\/}. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a53}{\_\-set\-Sticky} (unsigned $\ast$fifo, unsigned channel)
\begin{CompactList}\small\item\em Sets the last bit of {\em channel\/} in {\em fifo\/}. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a54}{\_\-clr\-Sticky} (unsigned $\ast$fifo, unsigned channel)
\begin{CompactList}\small\item\em Clears the last bit of {\em channel\/} in {\em fifo\/}. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a55}{\_\-set\-Bitsv} (unsigned $\ast$fifo, unsigned channel, unsigned start, unsigned $\ast$pattern, unsigned pat\_\-len, unsigned repetitions)
\begin{CompactList}\small\item\em Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into {\em channel\/} and in buffer indicated by {\em board\/}. \item\end{CompactList}\item 
int \hyperlink{tpg_8c_a56}{TPGmsg\-Init} (void)
\begin{CompactList}\small\item\em Starts a simple printf MSG processor. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a57}{TPGset\-TEMsticky} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned tem\_\-id, unsigned trg)
\begin{CompactList}\small\item\em Sets the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a58}{TPGclr\-TEMsticky} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned tem\_\-id, unsigned trg)
\begin{CompactList}\small\item\em Clears the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a59}{TPGset\-VETOsticky} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned free\_\-id, unsigned veto\_\-id)
\begin{CompactList}\small\item\em Sets the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a60}{TPGclr\-VETOsticky} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned free\_\-id, unsigned veto\_\-id)
\begin{CompactList}\small\item\em Clears the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a61}{TPGset\-CNOsticky} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned free\_\-id)
\begin{CompactList}\small\item\em Clears the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a62}{TPGclr\-CNOsticky} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned free\_\-id)
\begin{CompactList}\small\item\em Clears the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a63}{TPGfifo\-Stat\-Show} (\hyperlink{struct__TPG}{TPG} $\ast$this)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a64}{TPGgtb\-Trig\-Clk} (\hyperlink{struct__TPG}{TPG} $\ast$this, int rising)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a65}{TPGgtb\-Setup\-Show} (\hyperlink{struct__TPG}{TPG} $\ast$this)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a66}{TPGset\-Time\-In\-Parms} (\hyperlink{struct__TPG}{TPG} $\ast$this, int tem\-Start, int tem\-Pat, int tem\-Len, int tem\-Reps, int tem\-Inc, int free\-Start, int free\-Pat, int free\-Len, int free\-Reps, int free\-Inc)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a67}{TPGgtb\-Time\-In\-Delay\-Chan} (\hyperlink{struct__TPG}{TPG} $\ast$this, int tem, int chan, int delay)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a68}{TPGgtb\-Time\-In\-Cmd} (\hyperlink{struct__TPG}{TPG} $\ast$this)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a69}{TPGgtb\-Hw\-Cmd\-Check} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned int pattern, int readback)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
void \hyperlink{tpg_8c_a70}{TPGshow} (\hyperlink{struct__TPG}{TPG} $\ast$this, unsigned detail)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
unsigned \hyperlink{tpg_8c_a4}{TPG\_\-BUSY} = 0
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a5}{TPG\_\-TIAR} = 1
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a6}{TPG\_\-CALHI} = 2
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a7}{TPG\_\-CALLO} = 3
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a8}{TPG\_\-N\_\-TRG} = 4
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a9}{
unsigned \hyperlink{tpg_8c_a9}{TPG\_\-TEM\_\-BOARD} = -1}
\label{tpg_8c_a9}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
unsigned \hyperlink{tpg_8c_a10}{TPG\_\-LASTWORD} = TPG\_\-BUFFER\_\-DEPTH - sizeof(unsigned)
\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a11}{
unsigned \hyperlink{tpg_8c_a11}{tpg\-Debug} = TPG\_\-DEBUG\_\-NONE}
\label{tpg_8c_a11}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a12}{
unsigned \hyperlink{tpg_8c_a12}{tpg\-Cached\-Cnt} = 0}
\label{tpg_8c_a12}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a13}{
unsigned \hyperlink{tpg_8c_a13}{tpg\-Fifo\-Bug\-Offset} = 2}
\label{tpg_8c_a13}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a14}{
int \hyperlink{tpg_8c_a14}{tpg\-Tem\-Pat} = 0x80000003}
\label{tpg_8c_a14}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a15}{
int \hyperlink{tpg_8c_a15}{tpg\-Free\-Pat} = 0xa0000003}
\label{tpg_8c_a15}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a16}{
int \hyperlink{tpg_8c_a16}{tpg\-Tem\-Start} = 0}
\label{tpg_8c_a16}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a17}{
int \hyperlink{tpg_8c_a17}{tpg\-Free\-Start} = 0}
\label{tpg_8c_a17}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a18}{
int \hyperlink{tpg_8c_a18}{tpg\-Tem\-Len} = 32}
\label{tpg_8c_a18}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a19}{
int \hyperlink{tpg_8c_a19}{tpg\-Free\-Len} = 32}
\label{tpg_8c_a19}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a20}{
int \hyperlink{tpg_8c_a20}{tpg\-Tem\-Reps} = 0}
\label{tpg_8c_a20}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a21}{
int \hyperlink{tpg_8c_a21}{tpg\-Free\-Reps} = 0}
\label{tpg_8c_a21}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a22}{
int \hyperlink{tpg_8c_a22}{tpg\-Tem\-Inc} = 0}
\label{tpg_8c_a22}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a23}{
int \hyperlink{tpg_8c_a23}{tpg\-Free\-Inc} = 0}
\label{tpg_8c_a23}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a24}{
int \hyperlink{tpg_8c_a24}{tpg\-Tem\-Chan\-Delay} \mbox{[}18\mbox{]} = \{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\}}
\label{tpg_8c_a24}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\item 
\hypertarget{tpg_8c_a25}{
int \hyperlink{tpg_8c_a25}{tpg\-Free\-Chan\-Delay} \mbox{[}18\mbox{]} = \{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\}}
\label{tpg_8c_a25}

\begin{CompactList}\small\item\em Use unknown. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Trigger Pattern Generator command-line user interface. 

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


\subsection{Function Documentation}
\hypertarget{tpg_8c_a51}{
\index{tpg.c@{tpg.c}!_checkBounds@{\_\-checkBounds}}
\index{_checkBounds@{\_\-checkBounds}!tpg.c@{tpg.c}}
\subsubsection[\_\-checkBounds]{\setlength{\rightskip}{0pt plus 5cm}unsigned \_\-check\-Bounds (unsigned {\em start}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a51}


Checks that the requested addition to the buffer does not exceed the boundaries. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start}]Bit that this pattern begins at \item[{\em pat\_\-len}]length of pattern \item[{\em repetitions}]Number of times to repeat the pattern in the buffer \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS when all is well \end{Desc}
\hypertarget{tpg_8c_a54}{
\index{tpg.c@{tpg.c}!_clrSticky@{\_\-clrSticky}}
\index{_clrSticky@{\_\-clrSticky}!tpg.c@{tpg.c}}
\subsubsection[\_\-clrSticky]{\setlength{\rightskip}{0pt plus 5cm}void \_\-clr\-Sticky (unsigned $\ast$ {\em fifo}, unsigned {\em channel})}}
\label{tpg_8c_a54}


Clears the last bit of {\em channel\/} in {\em fifo\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fifo}]Array of unsigned representing the Playback FIFO of one COMM I/O board \item[{\em channel}]Channel this pattern is destined for \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=135pt]{tpg_8c_a54_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a52}{
\index{tpg.c@{tpg.c}!_setBits@{\_\-setBits}}
\index{_setBits@{\_\-setBits}!tpg.c@{tpg.c}}
\subsubsection[\_\-setBits]{\setlength{\rightskip}{0pt plus 5cm}void \_\-set\-Bits (unsigned $\ast$ {\em fifo}, unsigned {\em channel}, unsigned {\em start}, unsigned {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a52}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into {\em channel\/} and in buffer indicated by {\em board\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fifo}]Array of unsigned representing the Playback FIFO of one COMM I/O board \item[{\em channel}]Channel this pattern is destined for \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... 32 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=129pt]{tpg_8c_a52_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a55}{
\index{tpg.c@{tpg.c}!_setBitsv@{\_\-setBitsv}}
\index{_setBitsv@{\_\-setBitsv}!tpg.c@{tpg.c}}
\subsubsection[\_\-setBitsv]{\setlength{\rightskip}{0pt plus 5cm}void \_\-set\-Bitsv (unsigned $\ast$ {\em fifo}, unsigned {\em channel}, unsigned {\em start}, unsigned $\ast$ {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a55}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into {\em channel\/} and in buffer indicated by {\em board\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fifo}]Array of unsigned representing the Playback FIFO of one COMM I/O board \item[{\em channel}]Channel this pattern is destined for \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... (32$\ast$1024)-1 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=133pt]{tpg_8c_a55_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a53}{
\index{tpg.c@{tpg.c}!_setSticky@{\_\-setSticky}}
\index{_setSticky@{\_\-setSticky}!tpg.c@{tpg.c}}
\subsubsection[\_\-setSticky]{\setlength{\rightskip}{0pt plus 5cm}void \_\-set\-Sticky (unsigned $\ast$ {\em fifo}, unsigned {\em channel})}}
\label{tpg_8c_a53}


Sets the last bit of {\em channel\/} in {\em fifo\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fifo}]Array of unsigned representing the Playback FIFO of one COMM I/O board \item[{\em channel}]Channel this pattern is destined for \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=135pt]{tpg_8c_a53_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a42}{
\index{tpg.c@{tpg.c}!TPGarm@{TPGarm}}
\index{TPGarm@{TPGarm}!tpg.c@{tpg.c}}
\subsubsection[TPGarm]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGarm (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, \hyperlink{GTBtypes_8h_a2}{gtb\-Trig\_\-t} {\em trig})}}
\label{tpg_8c_a42}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \item[{\em trig}]Use unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=169pt]{tpg_8c_a42_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a30}{
\index{tpg.c@{tpg.c}!TPGclear@{TPGclear}}
\index{TPGclear@{TPGclear}!tpg.c@{tpg.c}}
\subsubsection[TPGclear]{\setlength{\rightskip}{0pt plus 5cm}void TPGclear (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this})}}
\label{tpg_8c_a30}


Sets all the buffers to 0. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure to clear \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=170pt]{tpg_8c_a30_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a31}{
\index{tpg.c@{tpg.c}!TPGclearBuf@{TPGclearBuf}}
\index{TPGclearBuf@{TPGclearBuf}!tpg.c@{tpg.c}}
\subsubsection[TPGclearBuf]{\setlength{\rightskip}{0pt plus 5cm}void TPGclear\-Buf (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em buffer\-Id})}}
\label{tpg_8c_a31}


Sets the buffer indicated by {\em buffer\-Id\/} to 0. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure containing buffer to clear \item[{\em buffer\-Id}]ID of the buffer to clear \end{description}
\end{Desc}
\hypertarget{tpg_8c_a62}{
\index{tpg.c@{tpg.c}!TPGclrCNOsticky@{TPGclrCNOsticky}}
\index{TPGclrCNOsticky@{TPGclrCNOsticky}!tpg.c@{tpg.c}}
\subsubsection[TPGclrCNOsticky]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGclr\-CNOsticky (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em free\_\-id})}}
\label{tpg_8c_a62}


Clears the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em free\_\-id}]FREE being targeted (gives tgt board), 0 ... 3 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=204pt]{tpg_8c_a62_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a58}{
\index{tpg.c@{tpg.c}!TPGclrTEMsticky@{TPGclrTEMsticky}}
\index{TPGclrTEMsticky@{TPGclrTEMsticky}!tpg.c@{tpg.c}}
\subsubsection[TPGclrTEMsticky]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGclr\-TEMsticky (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em tem\_\-id}, unsigned {\em trg})}}
\label{tpg_8c_a58}


Clears the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em tem\_\-id}]TEM being targeted (gives channel range), 0 ... 3 \item[{\em trg}]TEM trg being targeted, (gives channel number), 0 ... 3 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=203pt]{tpg_8c_a58_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a60}{
\index{tpg.c@{tpg.c}!TPGclrVETOsticky@{TPGclrVETOsticky}}
\index{TPGclrVETOsticky@{TPGclrVETOsticky}!tpg.c@{tpg.c}}
\subsubsection[TPGclrVETOsticky]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGclr\-VETOsticky (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em free\_\-id}, unsigned {\em veto\_\-id})}}
\label{tpg_8c_a60}


Clears the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em free\_\-id}]FREE being targeted (gives tgt board), 0 ... 3 \item[{\em veto\_\-id}]VETO bit being targeted, (gives channel number), 0 ... 17 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=207pt]{tpg_8c_a60_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a40}{
\index{tpg.c@{tpg.c}!TPGdelay@{TPGdelay}}
\index{TPGdelay@{TPGdelay}!tpg.c@{tpg.c}}
\subsubsection[TPGdelay]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGdelay (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, int {\em gtb\-Id}, int {\em clk\-Delay})}}
\label{tpg_8c_a40}


Delay the COMM I/O board start by n clocks. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \item[{\em gtb\-Id}]Use unknown \item[{\em clk\-Delay}]6 bits of clock delay for the COMM I/O boards. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}
\hypertarget{tpg_8c_a50}{
\index{tpg.c@{tpg.c}!TPGdump@{TPGdump}}
\index{TPGdump@{TPGdump}!tpg.c@{tpg.c}}
\subsubsection[TPGdump]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGdump (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em board\-Id}, unsigned {\em start}, unsigned {\em len})}}
\label{tpg_8c_a50}


Print out the bit patterns in the requested board. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \item[{\em board\-Id}]0 ... N\_\-TPG\_\-BOARDS \item[{\em start}]Line of the buffer to start dump \item[{\em len}]Number of lines to dump \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}
\hypertarget{tpg_8c_a49}{
\index{tpg.c@{tpg.c}!TPGdumpCNO@{TPGdumpCNO}}
\index{TPGdumpCNO@{TPGdumpCNO}!tpg.c@{tpg.c}}
\subsubsection[TPGdumpCNO]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGdump\-CNO (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em start}, unsigned {\em len})}}
\label{tpg_8c_a49}


Print out the bit patterns in the CNO buffer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \item[{\em start}]Line of the buffer to start dump \item[{\em len}]Number of lines to dump \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=120pt]{tpg_8c_a49_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a48}{
\index{tpg.c@{tpg.c}!TPGdumpFREE@{TPGdumpFREE}}
\index{TPGdumpFREE@{TPGdumpFREE}!tpg.c@{tpg.c}}
\subsubsection[TPGdumpFREE]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGdump\-FREE (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em free\_\-id}, unsigned {\em start}, unsigned {\em len})}}
\label{tpg_8c_a48}


Print out the bit patterns in the free board. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \item[{\em free\_\-id}]FREE ID \item[{\em start}]Line of the buffer to start dump \item[{\em len}]Number of lines to dump \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=122pt]{tpg_8c_a48_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a47}{
\index{tpg.c@{tpg.c}!TPGdumpTEM@{TPGdumpTEM}}
\index{TPGdumpTEM@{TPGdumpTEM}!tpg.c@{tpg.c}}
\subsubsection[TPGdumpTEM]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGdump\-TEM (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em start}, unsigned {\em len})}}
\label{tpg_8c_a47}


Print out the bit patterns in the TEM buffer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \item[{\em start}]Line of the buffer to start dump \item[{\em len}]Number of lines to dump \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=120pt]{tpg_8c_a47_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a63}{
\index{tpg.c@{tpg.c}!TPGfifoStatShow@{TPGfifoStatShow}}
\index{TPGfifoStatShow@{TPGfifoStatShow}!tpg.c@{tpg.c}}
\subsubsection[TPGfifoStatShow]{\setlength{\rightskip}{0pt plus 5cm}void TPGfifo\-Stat\-Show (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this})}}
\label{tpg_8c_a63}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=191pt]{tpg_8c_a63_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a43}{
\index{tpg.c@{tpg.c}!TPGgemStart@{TPGgemStart}}
\index{TPGgemStart@{TPGgemStart}!tpg.c@{tpg.c}}
\subsubsection[TPGgemStart]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGgem\-Start (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this})}}
\label{tpg_8c_a43}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}
\hypertarget{tpg_8c_a69}{
\index{tpg.c@{tpg.c}!TPGgtbHwCmdCheck@{TPGgtbHwCmdCheck}}
\index{TPGgtbHwCmdCheck@{TPGgtbHwCmdCheck}!tpg.c@{tpg.c}}
\subsubsection[TPGgtbHwCmdCheck]{\setlength{\rightskip}{0pt plus 5cm}void TPGgtb\-Hw\-Cmd\-Check (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned int {\em pattern}, int {\em readback})}}
\label{tpg_8c_a69}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]Unknown \item[{\em pattern}]Unknown \item[{\em readback}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=250pt]{tpg_8c_a69_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a28}{
\index{tpg.c@{tpg.c}!TPGgtbPresent@{TPGgtbPresent}}
\index{TPGgtbPresent@{TPGgtbPresent}!tpg.c@{tpg.c}}
\subsubsection[TPGgtbPresent]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGgtb\-Present (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em board\-Id})}}
\label{tpg_8c_a28}


Test for board presence. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \item[{\em board\-Id}]0 ... N\_\-TPG\_\-BOARDS \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]O if board is not present, 1 if board is present. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=124pt]{tpg_8c_a28_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a65}{
\index{tpg.c@{tpg.c}!TPGgtbSetupShow@{TPGgtbSetupShow}}
\index{TPGgtbSetupShow@{TPGgtbSetupShow}!tpg.c@{tpg.c}}
\subsubsection[TPGgtbSetupShow]{\setlength{\rightskip}{0pt plus 5cm}void TPGgtb\-Setup\-Show (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this})}}
\label{tpg_8c_a65}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=194pt]{tpg_8c_a65_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a68}{
\index{tpg.c@{tpg.c}!TPGgtbTimeInCmd@{TPGgtbTimeInCmd}}
\index{TPGgtbTimeInCmd@{TPGgtbTimeInCmd}!tpg.c@{tpg.c}}
\subsubsection[TPGgtbTimeInCmd]{\setlength{\rightskip}{0pt plus 5cm}void TPGgtb\-Time\-In\-Cmd (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this})}}
\label{tpg_8c_a68}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=279pt]{tpg_8c_a68_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a67}{
\index{tpg.c@{tpg.c}!TPGgtbTimeInDelayChan@{TPGgtbTimeInDelayChan}}
\index{TPGgtbTimeInDelayChan@{TPGgtbTimeInDelayChan}!tpg.c@{tpg.c}}
\subsubsection[TPGgtbTimeInDelayChan]{\setlength{\rightskip}{0pt plus 5cm}void TPGgtb\-Time\-In\-Delay\-Chan (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, int {\em tem}, int {\em chan}, int {\em delay})}}
\label{tpg_8c_a67}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]Unknown \item[{\em tem}]Unknown \item[{\em chan}]Unknown \item[{\em delay}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}
\hypertarget{tpg_8c_a64}{
\index{tpg.c@{tpg.c}!TPGgtbTrigClk@{TPGgtbTrigClk}}
\index{TPGgtbTrigClk@{TPGgtbTrigClk}!tpg.c@{tpg.c}}
\subsubsection[TPGgtbTrigClk]{\setlength{\rightskip}{0pt plus 5cm}void TPGgtb\-Trig\-Clk (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, int {\em rising})}}
\label{tpg_8c_a64}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]Unknown \item[{\em rising}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=186pt]{tpg_8c_a64_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a41}{
\index{tpg.c@{tpg.c}!TPGload@{TPGload}}
\index{TPGload@{TPGload}!tpg.c@{tpg.c}}
\subsubsection[TPGload]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGload (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned char $\ast$ {\em clk\-Delay})}}
\label{tpg_8c_a41}


Use Programmed I/O to fill the COMM board FIFOs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \item[{\em clk\-Delay}]Argument no longer used, left for backward compatibility. Use TPGDelay(). \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=169pt]{tpg_8c_a41_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a56}{
\index{tpg.c@{tpg.c}!TPGmsgInit@{TPGmsgInit}}
\index{TPGmsgInit@{TPGmsgInit}!tpg.c@{tpg.c}}
\subsubsection[TPGmsgInit]{\setlength{\rightskip}{0pt plus 5cm}int TPGmsg\-Init (void)}}
\label{tpg_8c_a56}


Starts a simple printf MSG processor. 

\begin{Desc}
\item[Returns:]0 on success, -1 on failure \end{Desc}
\hypertarget{tpg_8c_a27}{
\index{tpg.c@{tpg.c}!TPGnBoards@{TPGnBoards}}
\index{TPGnBoards@{TPGnBoards}!tpg.c@{tpg.c}}
\subsubsection[TPGnBoards]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGn\-Boards (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this})}}
\label{tpg_8c_a27}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}
\hypertarget{tpg_8c_a29}{
\index{tpg.c@{tpg.c}!TPGnew@{TPGnew}}
\index{TPGnew@{TPGnew}!tpg.c@{tpg.c}}
\subsubsection[TPGnew]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__TPG}{TPG} $\ast$ TPGnew (unsigned $\ast$ {\em brd\-Addr})}}
\label{tpg_8c_a29}


Calls calloc to allocate memory for the struct and associated buffers then sets the buffer pointers to the correct offsets. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em brd\-Addr}]Null terminated array of GTB (GEM Test Board) addresses \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Ptr to a new TPG structure containing ptrs to buffers and gnat\-Handles \end{Desc}
\hypertarget{tpg_8c_a34}{
\index{tpg.c@{tpg.c}!TPGsetCNO@{TPGsetCNO}}
\index{TPGsetCNO@{TPGsetCNO}!tpg.c@{tpg.c}}
\subsubsection[TPGsetCNO]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-CNO (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em free\_\-id}, unsigned {\em start}, unsigned {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a34}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em free\_\-id\/} and {\em veto\_\-id\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em free\_\-id}]FREE being targeted (gives tgt board), 0 ... 3 \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... 32 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=201pt]{tpg_8c_a34_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a61}{
\index{tpg.c@{tpg.c}!TPGsetCNOsticky@{TPGsetCNOsticky}}
\index{TPGsetCNOsticky@{TPGsetCNOsticky}!tpg.c@{tpg.c}}
\subsubsection[TPGsetCNOsticky]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-CNOsticky (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em free\_\-id})}}
\label{tpg_8c_a61}


Clears the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em free\_\-id}]FREE being targeted (gives tgt board), 0 ... 3 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=204pt]{tpg_8c_a61_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a38}{
\index{tpg.c@{tpg.c}!TPGsetCNOv@{TPGsetCNOv}}
\index{TPGsetCNOv@{TPGsetCNOv}!tpg.c@{tpg.c}}
\subsubsection[TPGsetCNOv]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-CNOv (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em free\_\-id}, unsigned {\em start}, unsigned $\ast$ {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a38}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em free\_\-id\/} and {\em veto\_\-id\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em free\_\-id}]FREE being targeted (gives tgt board), 0 ... 3 \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... (32$\ast$1024) - 1 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=204pt]{tpg_8c_a38_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a35}{
\index{tpg.c@{tpg.c}!TPGsetExtTrig@{TPGsetExtTrig}}
\index{TPGsetExtTrig@{TPGsetExtTrig}!tpg.c@{tpg.c}}
\subsubsection[TPGsetExtTrig]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-Ext\-Trig (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em start}, unsigned {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a35}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the external trigger buffer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... 32 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=207pt]{tpg_8c_a35_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a39}{
\index{tpg.c@{tpg.c}!TPGsetExtTrigv@{TPGsetExtTrigv}}
\index{TPGsetExtTrigv@{TPGsetExtTrigv}!tpg.c@{tpg.c}}
\subsubsection[TPGsetExtTrigv]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-Ext\-Trigv (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em start}, unsigned $\ast$ {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a39}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the external trigger buffer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... (32$\ast$1024) - 1 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{tpg_8c_a39_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a32}{
\index{tpg.c@{tpg.c}!TPGsetTEM@{TPGsetTEM}}
\index{TPGsetTEM@{TPGsetTEM}!tpg.c@{tpg.c}}
\subsubsection[TPGsetTEM]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-TEM (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em tem\_\-id}, unsigned {\em trg}, unsigned {\em start}, unsigned {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a32}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em tem\_\-id\/} and {\em trg\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em tem\_\-id}]TEM being targeted (gives channel range), 0 ... 3 \item[{\em trg}]TEM trg being targeted, (gives channel number), 0 ... 3 \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... 32 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=201pt]{tpg_8c_a32_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a57}{
\index{tpg.c@{tpg.c}!TPGsetTEMsticky@{TPGsetTEMsticky}}
\index{TPGsetTEMsticky@{TPGsetTEMsticky}!tpg.c@{tpg.c}}
\subsubsection[TPGsetTEMsticky]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-TEMsticky (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em tem\_\-id}, unsigned {\em trg})}}
\label{tpg_8c_a57}


Sets the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em tem\_\-id}]TEM being targeted (gives channel range), 0 ... 3 \item[{\em trg}]TEM trg being targeted, (gives channel number), 0 ... 3 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=204pt]{tpg_8c_a57_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a36}{
\index{tpg.c@{tpg.c}!TPGsetTEMv@{TPGsetTEMv}}
\index{TPGsetTEMv@{TPGsetTEMv}!tpg.c@{tpg.c}}
\subsubsection[TPGsetTEMv]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-TEMv (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em tem\_\-id}, unsigned {\em trg}, unsigned {\em start}, unsigned $\ast$ {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a36}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em tem\_\-id\/} and {\em trg\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em tem\_\-id}]TEM being targeted (gives channel range), 0 ... 3 \item[{\em trg}]TEM trg being targeted, (gives channel number), 0 ... 3 \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... (32$\ast$1024) - 1 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=204pt]{tpg_8c_a36_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a66}{
\index{tpg.c@{tpg.c}!TPGsetTimeInParms@{TPGsetTimeInParms}}
\index{TPGsetTimeInParms@{TPGsetTimeInParms}!tpg.c@{tpg.c}}
\subsubsection[TPGsetTimeInParms]{\setlength{\rightskip}{0pt plus 5cm}void TPGset\-Time\-In\-Parms (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, int {\em tem\-Start}, int {\em tem\-Pat}, int {\em tem\-Len}, int {\em tem\-Reps}, int {\em tem\-Inc}, int {\em free\-Start}, int {\em free\-Pat}, int {\em free\-Len}, int {\em free\-Reps}, int {\em free\-Inc})}}
\label{tpg_8c_a66}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]Unknown \item[{\em tem\-Start}]Unknown \item[{\em tem\-Pat}]Unknown \item[{\em tem\-Len}]Unknown \item[{\em tem\-Reps}]Unknown \item[{\em tem\-Inc}]Unknown \item[{\em free\-Start}]Unknown \item[{\em free\-Pat}]Unknown \item[{\em free\-Len}]Unknown \item[{\em free\-Reps}]Unknown \item[{\em free\-Inc}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}
\hypertarget{tpg_8c_a33}{
\index{tpg.c@{tpg.c}!TPGsetVETO@{TPGsetVETO}}
\index{TPGsetVETO@{TPGsetVETO}!tpg.c@{tpg.c}}
\subsubsection[TPGsetVETO]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-VETO (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em free\_\-id}, unsigned {\em veto\_\-id}, unsigned {\em start}, unsigned {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a33}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em free\_\-id\/} and {\em veto\_\-id\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em free\_\-id}]FREE being targeted (gives tgt board), 0 ... 3 \item[{\em veto\_\-id}]VETO bit being targeted, (gives channel number), 0 ... 17 \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... 32 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=205pt]{tpg_8c_a33_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a59}{
\index{tpg.c@{tpg.c}!TPGsetVETOsticky@{TPGsetVETOsticky}}
\index{TPGsetVETOsticky@{TPGsetVETOsticky}!tpg.c@{tpg.c}}
\subsubsection[TPGsetVETOsticky]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-VETOsticky (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em free\_\-id}, unsigned {\em veto\_\-id})}}
\label{tpg_8c_a59}


Sets the last bit of the buffer, which will \char`\"{}stick\char`\"{} on the COMM I/O outputs. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em free\_\-id}]FREE being targeted (gives tgt board), 0 ... 3 \item[{\em veto\_\-id}]VETO bit being targeted, (gives channel number), 0 ... 17 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=207pt]{tpg_8c_a59_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a37}{
\index{tpg.c@{tpg.c}!TPGsetVETOv@{TPGsetVETOv}}
\index{TPGsetVETOv@{TPGsetVETOv}!tpg.c@{tpg.c}}
\subsubsection[TPGsetVETOv]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGset\-VETOv (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em free\_\-id}, unsigned {\em veto\_\-id}, unsigned {\em start}, unsigned $\ast$ {\em pattern}, unsigned {\em pat\_\-len}, unsigned {\em repetitions})}}
\label{tpg_8c_a37}


Places the {\em pat\_\-len\/} LSBs of {\em pattern\/} into the channel and buffer indicated by {\em free\_\-id\/} and {\em veto\_\-id\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG structure being modified \item[{\em free\_\-id}]FREE being targeted (gives tgt board), 0 ... 3 \item[{\em veto\_\-id}]VETO bit being targeted, (gives channel number), 0 ... 17 \item[{\em start}]Start bit for the pattern, 0 ... (32$\ast$1024)-1 \item[{\em pattern}]Up to 32 bit pattern to use (LSB first) \item[{\em pat\_\-len}]Pattern length 1 ... (32$\ast$1024) - 1 \item[{\em repetitions}]Number of times to repeat the same pattern on this channel, use 0 to request as many reps as will fit in remaining FIFO depth \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=208pt]{tpg_8c_a37_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a70}{
\index{tpg.c@{tpg.c}!TPGshow@{TPGshow}}
\index{TPGshow@{TPGshow}!tpg.c@{tpg.c}}
\subsubsection[TPGshow]{\setlength{\rightskip}{0pt plus 5cm}void TPGshow (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this}, unsigned {\em detail})}}
\label{tpg_8c_a70}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]Unknown \item[{\em detail}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}
\hypertarget{tpg_8c_a46}{
\index{tpg.c@{tpg.c}!TPGstart@{TPGstart}}
\index{TPGstart@{TPGstart}!tpg.c@{tpg.c}}
\subsubsection[TPGstart]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGstart (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this})}}
\label{tpg_8c_a46}


Start the playback. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=228pt]{tpg_8c_a46_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a44}{
\index{tpg.c@{tpg.c}!TPGstartCmd@{TPGstartCmd}}
\index{TPGstartCmd@{TPGstartCmd}!tpg.c@{tpg.c}}
\subsubsection[TPGstartCmd]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGstart\-Cmd (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this})}}
\label{tpg_8c_a44}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=181pt]{tpg_8c_a44_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a45}{
\index{tpg.c@{tpg.c}!TPGstartVME@{TPGstartVME}}
\index{TPGstartVME@{TPGstartVME}!tpg.c@{tpg.c}}
\subsubsection[TPGstartVME]{\setlength{\rightskip}{0pt plus 5cm}unsigned TPGstart\-VME (\hyperlink{struct__TPG}{TPG} $\ast$ {\em this})}}
\label{tpg_8c_a45}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em this}]TPG struct to use to configure COMM I/O boards \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of TPG\_\-msgs, TPG\_\-SUCCESS if all goes well. \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=183pt]{tpg_8c_a45_cgraph}
\end{center}
\end{figure}
\hypertarget{tpg_8c_a26}{
\index{tpg.c@{tpg.c}!TPGupdateCachedCnt@{TPGupdateCachedCnt}}
\index{TPGupdateCachedCnt@{TPGupdateCachedCnt}!tpg.c@{tpg.c}}
\subsubsection[TPGupdateCachedCnt]{\setlength{\rightskip}{0pt plus 5cm}void TPGupdate\-Cached\-Cnt (unsigned {\em count})}}
\label{tpg_8c_a26}


Use unknown. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em count}]Unknown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Unknown \end{Desc}


\subsection{Variable Documentation}
\hypertarget{tpg_8c_a4}{
\index{tpg.c@{tpg.c}!TPG_BUSY@{TPG\_\-BUSY}}
\index{TPG_BUSY@{TPG\_\-BUSY}!tpg.c@{tpg.c}}
\subsubsection[TPG\_\-BUSY]{\setlength{\rightskip}{0pt plus 5cm}unsigned \hyperlink{tpg_8h_a1}{TPG\_\-BUSY} = 0}}
\label{tpg_8c_a4}


Use unknown. 

Channel number for the TEM BUSY signal \hypertarget{tpg_8c_a6}{
\index{tpg.c@{tpg.c}!TPG_CALHI@{TPG\_\-CALHI}}
\index{TPG_CALHI@{TPG\_\-CALHI}!tpg.c@{tpg.c}}
\subsubsection[TPG\_\-CALHI]{\setlength{\rightskip}{0pt plus 5cm}unsigned \hyperlink{tpg_8h_a3}{TPG\_\-CALHI} = 2}}
\label{tpg_8c_a6}


Use unknown. 

Channel number for the TEM CAL HE signal \hypertarget{tpg_8c_a7}{
\index{tpg.c@{tpg.c}!TPG_CALLO@{TPG\_\-CALLO}}
\index{TPG_CALLO@{TPG\_\-CALLO}!tpg.c@{tpg.c}}
\subsubsection[TPG\_\-CALLO]{\setlength{\rightskip}{0pt plus 5cm}unsigned \hyperlink{tpg_8h_a4}{TPG\_\-CALLO} = 3}}
\label{tpg_8c_a7}


Use unknown. 

Channel number for the TEM CAL LE signal \hypertarget{tpg_8c_a10}{
\index{tpg.c@{tpg.c}!TPG_LASTWORD@{TPG\_\-LASTWORD}}
\index{TPG_LASTWORD@{TPG\_\-LASTWORD}!tpg.c@{tpg.c}}
\subsubsection[TPG\_\-LASTWORD]{\setlength{\rightskip}{0pt plus 5cm}unsigned \hyperlink{tpg_8h_a6}{TPG\_\-LASTWORD} = TPG\_\-BUFFER\_\-DEPTH - sizeof(unsigned)}}
\label{tpg_8c_a10}


Use unknown. 

first bit of last word of a pattern \hypertarget{tpg_8c_a8}{
\index{tpg.c@{tpg.c}!TPG_N_TRG@{TPG\_\-N\_\-TRG}}
\index{TPG_N_TRG@{TPG\_\-N\_\-TRG}!tpg.c@{tpg.c}}
\subsubsection[TPG\_\-N\_\-TRG]{\setlength{\rightskip}{0pt plus 5cm}unsigned \hyperlink{tpg_8h_a5}{TPG\_\-N\_\-TRG} = 4}}
\label{tpg_8c_a8}


Use unknown. 

Total number of TEM triggers \hypertarget{tpg_8c_a5}{
\index{tpg.c@{tpg.c}!TPG_TIAR@{TPG\_\-TIAR}}
\index{TPG_TIAR@{TPG\_\-TIAR}!tpg.c@{tpg.c}}
\subsubsection[TPG\_\-TIAR]{\setlength{\rightskip}{0pt plus 5cm}unsigned \hyperlink{tpg_8h_a2}{TPG\_\-TIAR} = 1}}
\label{tpg_8c_a5}


Use unknown. 

Channel number for the TEM Three-in-a-row signal 