构建新的cmakelist工程

修改了  delay_tc函数
修返回频率为20hz
修改波特率修改后先重新设置通讯波特率在保存
This commit is contained in:
xin
2023-02-13 09:15:17 +08:00
parent d870c42486
commit 277e347e56
12 changed files with 61 additions and 7 deletions

25
source/serialportbase.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef SERIALPORTBASE_H
#define SERIALPORTBASE_H
#include <iostream>
using namespace std;
class SerialPortBase
{
public:
// SerialPortBase();
// ~SerialPortBase();
virtual int OpenSerialPort(string portName, int baudrate) = 0;
virtual int CloseSerialPort() = 0;
virtual int SetBaudrate(int baudrate) = 0;
virtual int SendData1(const char *data, const unsigned int len) = 0;
virtual int SendData(const char chrSendBuffer[],const unsigned short usLen) = 0;
virtual int ReadData(char * receivedData) = 0;
protected:
private:
};
#endif // SERIALPORTBASE_H