hyperion.ng
LedDeviceP9813.h
1 #pragma once
2 
3 // hyperion include
4 #include "ProviderSpi.h"
5 
9 class LedDeviceP9813 : public ProviderSpi
10 {
11 public:
17  LedDeviceP9813(const QJsonObject &deviceConfig);
18 
20  static LedDevice* construct(const QJsonObject &deviceConfig);
21 
22  virtual bool init(const QJsonObject &deviceConfig);
23 
24 private:
31  virtual int write(const std::vector<ColorRgb> &ledValues);
32 
39  uint8_t calculateChecksum(const ColorRgb & color) const;
40 };
Interface (pure virtual base class) for LedDevices.
Definition: LedDevice.h:32
static LedDevice * construct(const QJsonObject &deviceConfig)
constructs leddevice
Definition: LedDeviceP9813.cpp:9
virtual bool init(const QJsonObject &deviceConfig)
Sets configuration.
Definition: LedDeviceP9813.cpp:14
Implementation of the LedDevice interface for writing to P9813 led device.
Definition: LedDeviceP9813.h:9
The ProviderSpi implements an abstract base-class for LedDevices using the SPI-device.
Definition: ProviderSpi.h:12
LedDeviceP9813(const QJsonObject &deviceConfig)
Constructs specific LedDevice.
Definition: LedDeviceP9813.cpp:3
Plain-Old-Data structure containing the red-green-blue color specification.
Definition: ColorRgb.h:13