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

rcxtty.h File Reference

Basic RCX communication. More...

Go to the source code of this file.

Defines

#define FILEDESCR   int
#define BADFILE   -1
#define TTY_VARIABLE   "RCXTTY"
 environment variable to override defaults
#define DEFAULTTTY   "/dev/ttyd2"
 IRIX - second serial port.

Functions

int rcxInit (const char *tty, int highspeed)
 initialize RCX communications port
void rcxShutdown ()
 shutdown RCX communications port
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


Detailed Description

Basic RCX communication.

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

Definition in file rcxtty.h.


Define Documentation

#define BADFILE   -1
 

Definition at line 35 of file rcxtty.h.

#define DEFAULTTTY   "/dev/ttyd2"
 

IRIX - second serial port.

Definition at line 49 of file rcxtty.h.

#define FILEDESCR   int
 

Definition at line 34 of file rcxtty.h.

Referenced by main(), rcx_init(), rcxFD(), and rcxInit().

#define TTY_VARIABLE   "RCXTTY"
 

environment variable to override defaults

Definition at line 40 of file rcxtty.h.

Referenced by main().


Function Documentation

void myperror char *  str  ) 
 

perror() wrapper

Definition at line 65 of file rcxtty.c.

Referenced by keepaliveSend(), LNPinit(), nbread(), rcx_init(), rcx_send(), rcx_wakeup_tower(), and rcxInit().

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

write() wrapper

Definition at line 73 of file rcxtty.c.

References NULL.

Referenced by keepaliveSend(), lnp_logical_write(), rcx_send(), and rcx_wakeup_tower().

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.


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