summaryrefslogtreecommitdiff
path: root/qt/RGBController/serial_communication.h
blob: d03775764d84c056d310ac307f010cbe84a96f5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef SERIAL_COMMUNICATION_H
#define SERIAL_COMMUNICATION_H

/* includes */
#include <QSerialPort>
#include <QSerialPortInfo>


class serial_communication
{
public:
    /* function declares */
    serial_communication();
    bool serial_connect(QString port);
    bool serial_disconnect();
    void rgb_change(int r, int g, int b);
    /* variables */
    QString port_name;
    QSerialPort serial;
    QByteArray data;
};

#endif // SERIAL_COMMUNICATION_H