\section{util/dll-src/rcxtty.c File Reference}
\label{rcxtty_8c}\index{util/dll-src/rcxtty.c@{util/dll-src/rcxtty.c}}
Basic RCX communication. 

{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$fcntl.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$termios.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$errno.h$>$}\par
{\tt \#include \char`\"{}rcxtty.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
FILEDESCR {\bf rcx\-FD} (void)
\begin{CompactList}\small\item\em get RCX file descriptor \item\end{CompactList}\item 
void {\bf myperror} (char $\ast$str)
\begin{CompactList}\small\item\em perror() wrapper \item\end{CompactList}\item 
int {\bf mywrite} (FILEDESCR fd, const void $\ast$buf, {\bf size\_\-t} len)
\begin{CompactList}\small\item\em write() wrapper \item\end{CompactList}\item 
int {\bf rcx\-Init} (const char $\ast$tty, int highspeed)
\begin{CompactList}\small\item\em initialize RCX communications port \item\end{CompactList}\item 
void {\bf rcx\-Shutdown} ()
\begin{CompactList}\small\item\em shutdown RCX communications port \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
int {\bf tty\_\-usb}
\item 
FILEDESCR {\bf rcx\-Fd} = BADFILE
\begin{CompactList}\small\item\em the one and only RCX file descriptor \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Basic RCX communication. 

\begin{Desc}
\item[Author:]Markus L. Noga $<${\tt markus@noga.de}$>$\end{Desc}


Definition in file {\bf rcxtty.c}.

\subsection{Function Documentation}
\index{rcxtty.c@{rcxtty.c}!myperror@{myperror}}
\index{myperror@{myperror}!rcxtty.c@{rcxtty.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void myperror (char $\ast$ {\em str})}\label{rcxtty_8c_a3}


perror() wrapper 



Definition at line 65 of file rcxtty.c.\index{rcxtty.c@{rcxtty.c}!mywrite@{mywrite}}
\index{mywrite@{mywrite}!rcxtty.c@{rcxtty.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mywrite (FILEDESCR {\em fd}, const void $\ast$ {\em buf}, {\bf size\_\-t} {\em len})}\label{rcxtty_8c_a4}


write() wrapper 



Definition at line 73 of file rcxtty.c.\index{rcxtty.c@{rcxtty.c}!rcxFD@{rcxFD}}
\index{rcxFD@{rcxFD}!rcxtty.c@{rcxtty.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}FILEDESCR rcx\-FD (void)}\label{rcxtty_8c_a2}


get RCX file descriptor 



Definition at line 61 of file rcxtty.c.

References FILEDESCR.

Referenced by io\_\-handler(), keepalive\-Handler(), keepalive\-Init(), lnp\_\-assured\_\-write(), lnp\_\-logical\_\-write(), and LNPinit().\index{rcxtty.c@{rcxtty.c}!rcxInit@{rcxInit}}
\index{rcxInit@{rcxInit}!rcxtty.c@{rcxtty.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int rcx\-Init (const char $\ast$ {\em tty}, int {\em highspeed})}\label{rcxtty_8c_a5}


initialize RCX communications port 



Definition at line 110 of file rcxtty.c.

References B2400, B4800, exit(), FILEDESCR, memset(), myperror(), NULL, rcx\-Fd, and tty\_\-usb.

Referenced by LNPinit().\index{rcxtty.c@{rcxtty.c}!rcxShutdown@{rcxShutdown}}
\index{rcxShutdown@{rcxShutdown}!rcxtty.c@{rcxtty.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rcx\-Shutdown ()}\label{rcxtty_8c_a6}


shutdown RCX communications port 



Definition at line 220 of file rcxtty.c.

References rcx\-Fd.

\subsection{Variable Documentation}
\index{rcxtty.c@{rcxtty.c}!rcxFd@{rcxFd}}
\index{rcxFd@{rcxFd}!rcxtty.c@{rcxtty.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}FILEDESCR {\bf rcx\-Fd} = BADFILE\hspace{0.3cm}{\tt  [static]}}\label{rcxtty_8c_a1}


the one and only RCX file descriptor 



Definition at line 58 of file rcxtty.c.

Referenced by rcx\-Init(), and rcx\-Shutdown().\index{rcxtty.c@{rcxtty.c}!tty_usb@{tty\_\-usb}}
\index{tty_usb@{tty\_\-usb}!rcxtty.c@{rcxtty.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf tty\_\-usb}}\label{rcxtty_8c_a0}




Definition at line 153 of file loader.c.