Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

nsser.h

Go to the documentation of this file.
00001 /*
00002 NeuroServer
00003  
00004 A collection of programs to translate between EEG data and TCP network
00005 messages. This is a part of the OpenEEG project, see http://openeeg.sf.net
00006 for details.
00007     
00008 Copyright (C) 2003, 2004 Rudi Cilibrasi (cilibrar@ofb.net)
00009      
00010 This library is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU Lesser General Public
00012 License as published by the Free Software Foundation; either
00013 version 2.1 of the License, or (at your option) any later version.
00014          
00015 This library is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 Lesser General Public License for more details.
00019              
00020 You should have received a copy of the GNU Lesser General Public
00021 License along with this library; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00023 */
00024                 
00025 #ifndef __NSSER_H
00026 #define __NSSER_H
00027 
00028 #ifdef __MINGW32__
00029 #define DEFAULTDEVICE "COM1"
00030 #include <windows.h>
00031 #include <winbase.h>
00032 #define ser_t HANDLE
00033 #else
00034 #include <unistd.h>
00035 #include <fcntl.h>
00036 #include <errno.h>   /* Error number definitions */
00037 #include <termios.h> /* POSIX terminal control definitions */
00038 #define DEFAULTDEVICE "/dev/ttyS0"
00039 #define ser_t int
00040 #endif
00041 
00043 ser_t openSerialPort(const char *devname, unsigned int BaudRate);
00044 
00046 int readSerial(ser_t s, char *buf, int size);
00047 
00049 int writeSerial(ser_t s, char *buf, int size);
00050 
00052 int set_port_options(int fd, unsigned int BaudRate);
00053 
00054 #endif

Generated on Tue Feb 8 00:05:16 2005 for Neuroserver by doxygen 1.3.3