Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

rcxtty.c File Reference

Basic RCX communication. More...

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <termios.h>
#include <string.h>
#include <errno.h>
#include "rcxtty.h"

Go to the source code of this file.

Functions

FILEDESCR rcxFD (void)
 get RCX file descriptor
void myperror (char *str)
 perror() wrapper
int mywrite (FILEDESCR fd, const void *buf, size_t len)
 write() wrapper
int rcxInit (const char *tty, int highspeed)
 initialize RCX communications port
void rcxShutdown ()
 shutdown RCX communications port

Variables

int tty_usb
FILEDESCR rcxFd = BADFILE
 the one and only RCX file descriptor


Detailed Description

Basic RCX communication.

Author:
Markus L. Noga <markus@noga.de>

Definition in file rcxtty.c.


Function Documentation

void myperror char *  str  ) 
 

perror() wrapper

Definition at line 65 of file rcxtty.c.

int mywrite FILEDESCR  fd,
const void *  buf,
size_t  len
 

write() wrapper

Definition at line 73 of file rcxtty.c.

FILEDESCR rcxFD void   ) 
 

get RCX file descriptor

Definition at line 61 of file rcxtty.c.

References FILEDESCR.

Referenced by io_handler(), keepaliveHandler(), keepaliveInit(), lnp_assured_write(), lnp_logical_write(), and LNPinit().

int rcxInit const char *  tty,
int  highspeed
 

initialize RCX communications port

Definition at line 110 of file rcxtty.c.

References B2400, B4800, exit(), FILEDESCR, memset(), myperror(), NULL, rcxFd, and tty_usb.

Referenced by LNPinit().

void rcxShutdown  ) 
 

shutdown RCX communications port

Definition at line 220 of file rcxtty.c.

References rcxFd.


Variable Documentation

FILEDESCR rcxFd = BADFILE [static]
 

the one and only RCX file descriptor

Definition at line 58 of file rcxtty.c.

Referenced by rcxInit(), and rcxShutdown().

int tty_usb
 

Definition at line 153 of file loader.c.


Generated on Fri Feb 25 08:02:47 2005 for brickos by  doxygen 1.3.9.1