00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __rcxtty_h__
00028 #define __rcxtty_h__
00029
00030 #if defined(_WIN32)
00031 #define FILEDESCR HANDLE
00032 #define BADFILE NULL
00033 #else
00034 #define FILEDESCR int
00035 #define BADFILE -1
00036 #endif
00037
00038
00039
00040 #define TTY_VARIABLE "RCXTTY"
00041
00042 #if defined(linux) || defined(LINUX)
00043 #define DEFAULTTTY "/dev/ttyS0"
00044 #elif defined(_WIN32)
00045 #define DEFAULTTTY "com1"
00046 #elif defined(sparc)
00047 #define DEFAULTTTY "/dev/ttyb"
00048 #else
00049 #define DEFAULTTTY "/dev/ttyd2"
00050 #endif
00051
00053 int rcxInit(const char *tty, int highspeed);
00054
00056 void rcxShutdown();
00057
00059 FILEDESCR rcxFD(void);
00060
00062 void myperror(char *str);
00063
00065 int mywrite(FILEDESCR fd, const void *buf, size_t len);
00066
00067 #endif