/home/fwph/code/wurde/modules/requiredPTUCode/linuxser.h

Go to the documentation of this file.
00001 /*************************************************************************
00002 *****     MACHINE-DEPENDENT SERIAL SUPPORT INCLUDE FILE LINUXser.H   ****/
00003 #define SERIAL_CODE_VERSION   "LINUX v1.0d"
00004 /****                                                                *****
00005 *****              (C)1999, Directed Perception, Inc.                *****
00006 *****                     All Rights Reserved.                       *****
00007 *****                                                                *****
00008 *****   Licensed users may freely distribute compiled code including *****
00009 *****   this code and data. Source data and code may NOT be          *****
00010 *****   distributed without the prior written consent from           *****
00011 *****   Directed Perception, Inc.                                    *****
00012 *****         Directed Perception, Inc. reserves the right to make   *****
00013 *****   changes without further notice to any content herein to      *****
00014 *****   improve reliability, function or design. Directed Perception *****
00015 *****   shall not assume any liability arising from the application  *****
00016 *****   or use of this code, data or function.                       *****
00017 *****                                                                *****
00018 **************************************************************************
00019 
00020 CHANGE HISTORY:
00021    1/21/98: v1.0d.  First release of Linux serial port drivers developed
00022                     and tested under RedHat Linux v5.1.
00023 
00024 **************************************************************************/
00025 
00026 typedef int portstream_fd;
00027 #define PORT_NOT_OPENED -1
00028 
00029 #undef TRUE
00030 #undef FALSE
00031 #define TRUE    1
00032 #define FALSE   0
00033 
00034 // function definitions that need are machine dependent
00035 extern portstream_fd openserial(char *portname);
00036 extern char   closeserial(portstream_fd);
00037 
00038 extern char   SerialBytesOut(portstream_fd, unsigned char *, int);
00039 
00040 #define AWAIT_CHARSTREAM                -1
00041 #define TIMEOUT_CHAR_READ               -1
00042 extern char   SerialBytesIn (portstream_fd, unsigned char *, unsigned int, long);
00043 
00044 extern char   PeekByte(portstream_fd, unsigned char *);
00045 extern char   FlushInputBuffer(portstream_fd);
00046 extern void   do_delay(long); /* in milliseconds */
00047 
00048 extern char   SerialStringOut(portstream_fd, unsigned char*); /* Output a string to the serial port */
00049 extern char   ReadSerialLine(portstream_fd, unsigned char*, long, int*);
00050 
00051 extern char   GetSignedShort(portstream_fd, signed short*, long);     // 2 byte signed short int
00052 extern char   PutSignedShort(portstream_fd, signed short*);
00053 extern char   GetUnsignedShort(portstream_fd, unsigned short*, long); // 2 byte unsigned short int
00054 extern char   PutUnsignedShort(portstream_fd, unsigned short*);
00055 extern char   GetSignedLong(portstream_fd, signed long*, long);       // 4 byte signed long
00056 extern char   PutSignedLong(portstream_fd, signed long*);

Generated on Thu Feb 1 15:31:52 2007 for WURDE by  doxygen 1.5.1