#ifndef SERIALTOOL_H
#define SERIALTOOL_H

#include <QtSerialPort/QtSerialPort>
#include <QString>
#include "define.h"
#include <QByteArray>
#include "ToolFunc/ToolFunc.h"


class SerialTool
{
public:
    SerialTool();
    static bool SerialOpen(QSerialPort* mySerialPort,QString PortName,QString Baud, QString DataBits,QString Parity, QString stopBit);
    static bool sendBytes(QSerialPort* mySerialPort,INT8U* sendDates,INT32S lenght);//发送数据
    static bool sendBytes_9data(QSerialPort *SerialPort,INT8U* buff,INT8U* buff_9bit,INT32S length);
};

#endif // SERIALTOOL_H
