\hypertarget{switch_8c}{
\section{switch.c File Reference}
\label{switch_8c}\index{switch.c@{switch.c}}
}
Switches on the PDU and GASU.  


{\tt \#include \char`\"{}PBS/PBS.h\char`\"{}}\par


Include dependency graph for switch.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=49pt]{switch_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{switch_8c_a0}{switch\-On} (unsigned red\-PWR, unsigned red\-PDU, unsigned red\-GASU)
\begin{CompactList}\small\item\em Select primary or redundant SC power, and poweron the PDU and GASU. \item\end{CompactList}\item 
\hypertarget{switch_8c_a1}{
void \hyperlink{switch_8c_a1}{switch\-Off} (void)}
\label{switch_8c_a1}

\begin{CompactList}\small\item\em Switch off all power. \item\end{CompactList}\item 
\hypertarget{switch_8c_a2}{
void \hyperlink{switch_8c_a2}{pid\_\-init} (void)}
\label{switch_8c_a2}

\begin{CompactList}\small\item\em Initialise the pids so they can be flashed. \item\end{CompactList}\item 
void \hyperlink{switch_8c_a3}{pid\_\-flash} (unsigned period)
\begin{CompactList}\small\item\em Turn on/off pid 0 if it is off/on. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Switches on the PDU and GASU. 

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


\subsection{Function Documentation}
\hypertarget{switch_8c_a3}{
\index{switch.c@{switch.c}!pid_flash@{pid\_\-flash}}
\index{pid_flash@{pid\_\-flash}!switch.c@{switch.c}}
\subsubsection[pid\_\-flash]{\setlength{\rightskip}{0pt plus 5cm}void pid\_\-flash (unsigned {\em period})}}
\label{switch_8c_a3}


Turn on/off pid 0 if it is off/on. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em period}]Period of the pulse \end{description}
\end{Desc}
\hypertarget{switch_8c_a0}{
\index{switch.c@{switch.c}!switchOn@{switchOn}}
\index{switchOn@{switchOn}!switch.c@{switch.c}}
\subsubsection[switchOn]{\setlength{\rightskip}{0pt plus 5cm}void switch\-On (unsigned {\em red\-PWR}, unsigned {\em red\-PDU}, unsigned {\em red\-GASU})}}
\label{switch_8c_a0}


Select primary or redundant SC power, and poweron the PDU and GASU. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em red\-PWR}]0 -$>$ use primary SC power, 1 -$>$ use redundant \item[{\em red\-PDU}]0 -$>$ use primary (PDU\_\-0), 1 -$>$ use redundant (PDU\_\-1) \item[{\em red\-GASU}]0 -$>$ use primary GASU, 1 -$>$ use redundant GASU \end{description}
\end{Desc}
