diff options
Diffstat (limited to 'qt/RGBController/serial_communication.h')
-rw-r--r-- | qt/RGBController/serial_communication.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/qt/RGBController/serial_communication.h b/qt/RGBController/serial_communication.h new file mode 100644 index 0000000..d037757 --- /dev/null +++ b/qt/RGBController/serial_communication.h @@ -0,0 +1,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 |