Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "pCommon.h"
00010
00011
00012
00013
00014 #ifndef _RSCOMM_H
00015 #define _RSCOMM_H
00016
00017 #define PAR_NON 0
00018 #define PAR_ODD 1
00019 #define PAR_EVEN 2
00020
00021 #define BIT_LEN_7 7
00022 #define BIT_LEN_8 8
00023
00024 #define CHR_STX 0x02
00025 #define CHR_ETX 0x03
00026 #define CHR_EOT 0x04
00027 #define CHR_ENQ 0x05
00028 #define CHR_ACK 0x06
00029 #define CHR_LF 0x0A
00030 #define CHR_CR 0x0D
00031 #define CHR_DLE 0x10
00032 #define CHR_NAK 0x15
00033 #define CHR_SUB 0x1A
00034
00035 int Comm_Open(const char * dev);
00036 void Comm_Close(void);
00037 void Comm_Setup(long baud, int parity, int bitlen, int rts, int dtr, char code);
00038 int Comm_SendData(UCHAR *buff, int l);
00039 int Comm_CheckRcv(void);
00040 int Comm_GetRcvData(UCHAR *buff);
00041 void Comm_Rcv(void);
00042
00043 #endif