TarzaNN
TarzaNN neural network simulator
C:/Users/albertlr/projects/TarzaNN/TarzaNN/w32seria.h
Go to the documentation of this file.
00001 #define SERIAL_CODE_VERSION   "v1.09.14"
00002 /*************************************************************************
00003 *****     MACHINE-DEPENDENT SERIAL SUPPORT INCLUDE FILE SERIAL.H     *****
00004 *****     (C)1995,2010 FLIR Commercial Systems, Inc.                 *****
00005 *****                     All Rights Reserved.                       *****
00006 *****                                                                *****
00007 *****   Licensed users may freely distribute compiled code including *****
00008 *****   this code and data. Source data and code may NOT be          *****
00009 *****   distributed without the prior written consent from FLIR      *****
00010 *****   Commercial Systems, Inc.                                     *****
00011 *****                                                                *****
00012 *****   FLIR Commercial Systems, Inc. reserves the right to make     *****
00013 *****   changes without further notice to any content herein to      *****
00014 *****   improve reliability, function or design. FLIR Commercial     *****
00015 *****   Systems, Inc. shall not assume any liability arising from    *****
00016 *****   the application or use of this code, data or function.       *****
00017 *****                                                                *****
00018 *****   FLIR Commercial Systems, Inc.                                *****
00019 *****   Motion Control Systems                                       *****
00020 *****   890C Cowan Rd, Burlingame, CA 94010                          *****
00021 *****   www.flir.com/mcs                                             *****
00022 *****   mcs-support@flir.com                                         *****
00023 **************************************************************************
00024 
00025 CHANGE HISTORY:
00026    7/28/99: v1.08.11.  SerialBytesIn timeout now in elapsed seconds.
00027    8/10/98: v1.08.10.  ReadSerialLine initialized charsRead to 0 for 
00028                                            compilers that do not do this automatically.
00029    1/ 7/98: v1.08.09.  Additional error processing added to SerialBytesIn
00030                                            and ReadSerialLine.
00031    9/27/97: v1.08.08.  Win32. Removed writestring in openserial.
00032                                Set 0 read timeout in setserial. Peek works
00033                                            better.
00034   11/17/96: v1.08.05d. Updated for 32-bit architecture
00035   1/25/96:  v1.07.08d. Fixed strmp in openserial routine
00036   1/7/95:   v1.07.05d. Changed for Windows Borland C/C++.
00037   10/12/94: v1.07.03d. Pre-release working DOS Borland C/C++ version.
00038                        XON/XOFF removed from PTU firmware to allow for
00039                        binary mode.
00040 
00041 
00042 **************************************************************************/
00043 
00044 #include <windows.h>
00045 
00046 typedef HANDLE portstream_fd;  
00047 #define PORT_NOT_OPENED   NULL
00048 
00049 /* function definition that need are machine/compiler dependent */
00050 extern portstream_fd openserial(char *portname);
00051 extern char   setbaudrate(int baudrate);
00052 extern char   closeserial(portstream_fd);
00053 
00054 extern char   SerialBytesOut(portstream_fd, unsigned char *, int);
00055 
00056 #define AWAIT_CHARSTREAM                -1
00057 #define TIMEOUT_CHAR_READ               -1
00058 extern char   SerialBytesIn (portstream_fd, unsigned char *, unsigned int, long);
00059 
00060 extern char       PeekByte(portstream_fd, unsigned char *);
00061 extern int    numPendingInputChars(portstream_fd portstream);
00062 extern char       FlushInputBuffer(portstream_fd);
00063 extern void   do_delay(long); /* in milliseconds */
00064 
00065 extern char   SerialStringOut(portstream_fd, unsigned char*); /* Output a string to the serial port */
00066 extern char   ReadSerialLine(portstream_fd, unsigned char*, long, int*);
00067 
00068 extern char       GetSignedShort(portstream_fd, signed short*, long);    // 2 byte signed short int
00069 extern char       PutSignedShort(portstream_fd, signed short*);
00070 extern char   GetUnsignedShort(portstream_fd, unsigned short*, long); // 2 byte unsigned short int
00071 extern char       PutUnsignedShort(portstream_fd, unsigned short*);
00072 extern char   GetSignedLong(portstream_fd, signed long*, long);          // 4 byte signed long
00073 extern char   PutSignedLong(portstream_fd, signed long*);
00074 
00075 extern int joystick_control(void);
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines