libHartwer - Documentation

bcs_com.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (c) 2008-2011 Marius Zwicker / Elefant Racing Bayreuth. 
00003 * All rights reserved.
00004 *
00005 * @ERB_OPEN_LICENSE_HEADER_START@
00006 *
00007 * Licensed under the Apache License, Version 2.0 (the "License");
00008 * you may not use this file except in compliance with the License.
00009 * You may obtain a copy of the License at
00010 * 
00011 *     http://www.apache.org/licenses/LICENSE-2.0
00012 * 
00013 * Unless required by applicable law or agreed to in writing, software
00014 * distributed under the License is distributed on an "AS IS" BASIS,
00015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016 * See the License for the specific language governing permissions and
00017 * limitations under the License.
00018 *
00019 *      http://www.elefantracing.de
00020 *
00021 * @ERB_OPEN_LICENSE_HEADER_END@
00022 */
00023 
00033 #ifndef BCS_COM_H_
00034 #define BCS_COM_H_
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00040 #include "bcs_general.h"
00041 
00047 #define BCS_COM_GPS_MOUSE "/dev/ttyS2"
00048 
00054 #define BCS_COM_GPS_SPEED BCS_COM_B4800
00055 
00061 #define BCS_COM_TELEMETRY "/dev/ttyS0"
00062 
00068 #define BCS_COM_TELEMETRY_SPEED BCS_COM_B38400
00069 
00070 
00074 typedef enum {
00075        BCS_COM_B4800=4800,
00076        BCS_COM_B19200=19200,
00077        BCS_COM_B38400=38400,
00078        BCS_COM_B57600=57600,
00079        BCS_COM_B76800=76800,
00080        BCS_COM_B115200=115200
00081 } BCS_COM_speeds;
00082 
00089 BCS_ERROR BCS_COM_openPort(BCS_comport* fd, const char * port);
00090 
00094 void BCS_COM_closePort(BCS_comport* filedescriptor);
00095 
00101 void BCS_COM_configSpeed(BCS_comport* filedescriptor, BCS_COM_speeds baudrate);
00102 
00110 BCS_ERROR BCS_COM_write(BCS_comport* filedescriptor, char * data, size_t bytes);
00111 
00120 Int32 BCS_COM_read(BCS_comport* filedescriptor, char * data, size_t bytes);
00121 
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125 
00126 #endif /* BCS_COM_H_ */

Generated on Fri Feb 11 2011 18:25:46 for libHartwer by Doxygen 1.7.3
Content © 2009-2011 Elefant Racing Bayreuth & MLBA (About) – Design © 2010 Emzeat. All Rights reserved.