24 lines
533 B
C++
24 lines
533 B
C++
#include "sharedata.h"
|
|
|
|
ShareData::ShareData(QObject *parent) : QObject(parent)
|
|
{
|
|
mSerialController = new SerialController(nullptr);
|
|
}
|
|
|
|
int ShareData::OpenUart(QString port, QString baudRate, QString dataBits, QString stopBits, QString flow)
|
|
{
|
|
qDebug()<<port<<baudRate<<dataBits<<stopBits<<flow;
|
|
if(mSerialController->OpenSerial(port,baudRate,dataBits,stopBits,flow) == 0){
|
|
qDebug()<<"openserial ok";
|
|
return 0;
|
|
}
|
|
qDebug()<<"openserial failed";
|
|
return -1;
|
|
}
|
|
|
|
|
|
int ShareData::CloseSerial()
|
|
{
|
|
|
|
}
|