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.
22 lines
552 B
C
22 lines
552 B
C
#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 /* ½ÓÊÕÊý¾Ý»º³åÇø×î´óÖµ*/
|
|
|
|
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
|