⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comm.h

📁 LINUX下VC++写的串口通信程序
💻 H
字号:
// Comm.h: interface for the CComm class.
//
//////////////////////////////////////////////////////////////////////

#ifndef COMMH
#define COMMH

#include     <stdio.h>      /*标准输入输出定义*/
#include     <stdlib.h>     /*标准函数库定义*/
#include     <unistd.h>     /*Unix 标准函数定义*/
#include     <sys/types.h>  
#include     <sys/stat.h>   
#include     <fcntl.h>      /*文件控制定义*/
#include     <termios.h>    /*PPSIX 终端控制定义*/
#include     <errno.h>      /*错误号定义*/

#include <string.h>

bool OpenComm(const char* pPort, char *nBaudRate="9600", char *cParity= "N", char *nDataBits="8", char *nStopBits="1");

bool CloseComm();

void WriteComm(void* pData, int nLength);

int ReadComm(char* pData);

void m_setparms(int fd,char *baudr,char *par,char *bits,char *stopb,int hwf='Y',int swf='Y');

int setcbreak(int mode);

int init_modem();

int check_io(int fd1, int fd2, int tmout,char *buf, int *buflen);

int sendtext(const char *destnum,const char *msg);

#endif // !defined(COMM_H__)


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -