11 #include <leddevice/LedDevice.h> 21 CMD_WRITE_WS2801 = 10,
37 bool init(
const QJsonObject &deviceConfig);
62 virtual int write(
const std::vector<ColorRgb>& ledValues);
71 static libusb_device_handle * openDevice(libusb_device * device);
73 static QString getString(libusb_device * device,
int stringDescriptorIndex);
86 static uint16_t _usbProductId;
87 static QString _usbProductDescription;
Interface (pure virtual base class) for LedDevices.
Definition: LedDevice.h:32
libusb_device_handle * _deviceHandle
libusb device handle
Definition: LedDeviceHyperionUsbasp.h:82
int open()
Opens and configures the output device.
Definition: LedDeviceHyperionUsbasp.cpp:61
LedDeviceHyperionUsbasp(const QJsonObject &deviceConfig)
Constructs specific LedDevice.
Definition: LedDeviceHyperionUsbasp.cpp:14
static LedDevice * construct(const QJsonObject &deviceConfig)
constructs leddevice
Definition: LedDeviceHyperionUsbasp.cpp:55
uint8_t _writeLedsCommand
command to write the leds
Definition: LedDeviceHyperionUsbasp.h:76
virtual int write(const std::vector< ColorRgb > &ledValues)
Writes the RGB-Color values to the leds.
Definition: LedDeviceHyperionUsbasp.cpp:140
virtual ~LedDeviceHyperionUsbasp()
Destructor of the LedDevice; closes the output device if it is open.
Definition: LedDeviceHyperionUsbasp.cpp:22
LedDevice implementation for a USBasp programmer with modified firmware (https://github.com/poljvd/hyperion-usbasp)
Definition: LedDeviceHyperionUsbasp.h:16
bool init(const QJsonObject &deviceConfig)
Sets configuration.
Definition: LedDeviceHyperionUsbasp.cpp:40
int testAndOpen(libusb_device *device)
Test if the device is a Hyperion Usbasp device.
Definition: LedDeviceHyperionUsbasp.cpp:103
static uint16_t _usbVendorId
Usb device identifiers.
Definition: LedDeviceHyperionUsbasp.h:85
libusb_context * _libusbContext
libusb context
Definition: LedDeviceHyperionUsbasp.h:79