You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#ifndef _SERIAL_H
|
|
|
|
|
#define _SERIAL_H
|
|
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
#include <termios.h>
|
|
|
|
|
#include <signal.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
#define RECVDATA_MAXLENTH 1300 /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݻ<EFBFBD><DDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ*/
|
|
|
|
|
|
|
|
|
|
int SerialOpen(const char *dev_name,int baud,int databit,int stopbit,int chk_mode);
|
|
|
|
|
int SerialRead(int m_comFd,unsigned char *buf,int sz,int timeout);
|
|
|
|
|
int SerialWrite(int m_comFd,const unsigned char *buf,int sz);
|
|
|
|
|
int SerialReadEx(int m_comFd,unsigned char *buf,int sz);
|
|
|
|
|
long long get_msec(void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|