\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
{\tt \#include \char`\"{}drv/ppci/ppci\-Pid.h\char`\"{}}\par


Include dependency graph for switch.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=107pt]{switch_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{switch_8c_a0}{pwr\_\-switch} (char mainfeed, char pdu, char gasu)
\begin{CompactList}\small\item\em Switch on and off the power. \item\end{CompactList}\item 
\hypertarget{switch_8c_a1}{
void \hyperlink{switch_8c_a1}{pid\_\-init} (void)}
\label{switch_8c_a1}

\begin{CompactList}\small\item\em Initialise the pids so they can be flashed. \item\end{CompactList}\item 
void \hyperlink{switch_8c_a2}{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_a2}{
\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_a2}


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}!pwr_switch@{pwr\_\-switch}}
\index{pwr_switch@{pwr\_\-switch}!switch.c@{switch.c}}
\subsubsection[pwr\_\-switch]{\setlength{\rightskip}{0pt plus 5cm}void pwr\_\-switch (char {\em mainfeed}, char {\em pdu}, char {\em gasu})}}
\label{switch_8c_a0}


Switch on and off the power. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mainfeed}]0(off) (1)primary (2)redundant \item[{\em pdu}]0(off) (1)pdu\_\-0 only (2)pdu\_\-1 only (3)both \item[{\em gasu}]0(off) (1)primary (2)redundant \end{description}
\end{Desc}
