#ifdef __cplusplus extern "C" { #endif void setcombase(int cport, int cbase, int cintr); void sethandshakemode(int cport, int hsmode); void sethardhandshake(int cport, int hs); void setxchars(int cport, char xon, char xoff); void setbuffervars(int cport,int maxbuf,int nfull, int nempty); void resetbuffer(int cport); void setserial(int cport,int baudrate); int checkhandshake(int cport); void sendcom(int cport, char c, /*character to send out com port*/ int *errcode); /*error code for sendcom */ void opencom(int comport, /*com port # - 0 or 1 */ int baud, /*baud rate - 110,150,300..9600*/ int parity, /*parity 0 = no parity */ /* 1 = even parity */ /* 3 = odd parity */ int stopbits, /*stop bits - 1 or 2 */ int numbits, /*word length - 7 or 8 */ int *errcode); /* error code for opencom */ /* 0 = no errors */ /* 1 = com port error */ /* 2 = bauderror */ /* 3 = parity error */ /* 4 = stop bits error */ /* 5 = word length error */ void closecom(int cport); void checkcom(int cport, char *c, /*returns character from combuffer*/ int *errcode); /*error code for checkcom */ /* 0 = no error */ /* 6 = no character available */ /* 7 = buffer overflow */ void writecom(int cport, char *s, /*string to send out com port*/ int *errcode); /*error code for writelncom*/ void writelncom(int cport, char *s, /*string to send out com port*/ int *errcode); /*error code for writelncom*/ /* 0 = no error */ /* 8 = time out error */ /* 10 = com port not initialized*/ void readlncom(int cport, char *s, /*returns string from combuffer */ int *errcode); /*readlncom error code */ /* 0 = no error */ /* 6 = no character available */ /* 7 = buffer overflow */ /* 9 = string variable overrun */ #ifdef __cplusplus } #endif