#ifndef HARDWARESETUP_H #define HARDWARESETUP_H #include #include #include #include #include #include #ifdef ATMEGA #include #endif #include "datatypes.h" #include "serial_port.h" class HardwareSetup : public QThread { Q_OBJECT protected: void run(); private: bool shellBefore; bool deaBefore; #ifdef ATMEGA libusb_device_handle * handle; libusb_context * usbContext; int usbGetDescriptorString(libusb_device_handle * dev, int index, int langid, char * buf, int buflen); libusb_device_handle * usbOpenDevice(int vendor, int product); #endif int fd; bool stop; boost::asio::io_context context; // boost::asio::serial_port serialPort{}; void connectSTM32(); void connectSTM32Boost(); bool getShell(); bool getDea(); int * findBit(int * array, int zahl); std::unique_ptr sport; public: void setStop(); ~HardwareSetup(); HardwareSetup(); signals: void Shell(int, int); void Dea(int, int); }; #endif // HARDWARESETUP_H