\hypertarget{rs232_8c}{
\section{rs232.c File Reference}
\label{rs232_8c}\index{rs232.c@{rs232.c}}
}
File that contains the \char`\"{}child\char`\"{} code.  


{\tt \#include \char`\"{}h1.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{rs232_8c_cc89bc6999f884d1a6c933dcdd994a1f}{signal\_\-1} (int)
\begin{CompactList}\small\item\em Function called when the program receives a SIGUSR1 signal. \item\end{CompactList}\item 
void \hyperlink{rs232_8c_d741f364c84f47dae950e2b84f38f54a}{rs232\_\-clear\_\-exit} (int)
\begin{CompactList}\small\item\em Function called when the program receaves a SIGINT signal. Make sure the shared memory \char`\"{}dies\char`\"{} with the program. \item\end{CompactList}\item 
int \hyperlink{rs232_8c_e57d9ee815060879b1d17169b18ee8f1}{rs232} (void)
\begin{CompactList}\small\item\em Program responsable for the serial port communication. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hypertarget{rs232_8c_9c6091cf4a652d085945963b17ad2586}{
int \textbf{shm\_\-id1}}
\label{rs232_8c_9c6091cf4a652d085945963b17ad2586}

\item 
\hypertarget{rs232_8c_c4d3681af61140a9db1bf80a991a138c}{
int \textbf{shm\_\-id2}}
\label{rs232_8c_c4d3681af61140a9db1bf80a991a138c}

\item 
\hypertarget{rs232_8c_3f1257c24ab445cca45ff7b247742397}{
unsigned char $\ast$ \textbf{SHM\_\-config}}
\label{rs232_8c_3f1257c24ab445cca45ff7b247742397}

\item 
\hypertarget{rs232_8c_721e7ab26e00645414769aff91f66531}{
unsigned char $\ast$ \textbf{SHM\_\-data}}
\label{rs232_8c_721e7ab26e00645414769aff91f66531}

\item 
\hypertarget{rs232_8c_e9ccea7285b227aaaa85d814d9e42bb2}{
char \textbf{RS232\_\-DEVICE} \mbox{[}20\mbox{]} = \char`\"{}/dev/ttyUSB0\char`\"{}}
\label{rs232_8c_e9ccea7285b227aaaa85d814d9e42bb2}

\end{CompactItemize}


\subsection{Detailed Description}
File that contains the \char`\"{}child\char`\"{} code. 

Programa responsável pela comunicação com o pic, através da porta serie. Comunica ainda com o programa gtk atravez de duas memorias partilhadas. \begin{Desc}
\item[Author:]Bruno Andrade nº35606 \end{Desc}


Definition in file \hyperlink{rs232_8c-source}{rs232.c}.

\subsection{Function Documentation}
\hypertarget{rs232_8c_e57d9ee815060879b1d17169b18ee8f1}{
\index{rs232.c@{rs232.c}!rs232@{rs232}}
\index{rs232@{rs232}!rs232.c@{rs232.c}}
\subsubsection[{rs232}]{\setlength{\rightskip}{0pt plus 5cm}int rs232 (void)}}
\label{rs232_8c_e57d9ee815060879b1d17169b18ee8f1}


Program responsable for the serial port communication. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em void}]\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]int \end{Desc}


Definition at line 26 of file rs232.c.\hypertarget{rs232_8c_d741f364c84f47dae950e2b84f38f54a}{
\index{rs232.c@{rs232.c}!rs232\_\-clear\_\-exit@{rs232\_\-clear\_\-exit}}
\index{rs232\_\-clear\_\-exit@{rs232\_\-clear\_\-exit}!rs232.c@{rs232.c}}
\subsubsection[{rs232\_\-clear\_\-exit}]{\setlength{\rightskip}{0pt plus 5cm}void rs232\_\-clear\_\-exit (int {\em xx})}}
\label{rs232_8c_d741f364c84f47dae950e2b84f38f54a}


Function called when the program receaves a SIGINT signal. Make sure the shared memory \char`\"{}dies\char`\"{} with the program. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em xx}]\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}


Definition at line 224 of file rs232.c.\hypertarget{rs232_8c_cc89bc6999f884d1a6c933dcdd994a1f}{
\index{rs232.c@{rs232.c}!signal\_\-1@{signal\_\-1}}
\index{signal\_\-1@{signal\_\-1}!rs232.c@{rs232.c}}
\subsubsection[{signal\_\-1}]{\setlength{\rightskip}{0pt plus 5cm}void signal\_\-1 (int {\em x})}}
\label{rs232_8c_cc89bc6999f884d1a6c933dcdd994a1f}


Function called when the program receives a SIGUSR1 signal. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em x}]\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}


Definition at line 207 of file rs232.c.