serial.h

来自「嵌入式开发很不错的资料!其中包括了全部的源码和文档!做的还可以!有一定的借鉴性!」· C头文件 代码 · 共 25 行

H
25
字号
#ifndef _SERIAL_H_#define _SERIAL_H_#include <stdio.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <termios.h>#include <stdlib.h>#include <errno.h>class MySerial{public:    MySerial();    ~MySerial();public:	static int set_opt(int fd,int nSpeed, int nBits, char nEvent, int nStop);	static int open_port(int fd,int comport);	static int nwrite(int serialfd,const char *data,int datalength);};#endif

⌨️ 快捷键说明

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