Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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