构建新的cmakelist工程
修改了 delay_tc函数 修返回频率为20hz 修改波特率修改后先重新设置通讯波特率在保存
This commit is contained in:
25
source/serialportbase.h
Normal file
25
source/serialportbase.h
Normal 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
|
Reference in New Issue
Block a user