hyperion.ng/libsrc/leddevice/LedDeviceWs2801.h

36 lines
743 B
C
Raw Normal View History

#pragma once
// STL includes
#include <string>
// hyperion incluse
#include "LedSpiDevice.h"
2013-09-09 04:54:13 +02:00
///
/// Implementation of the LedDevice interface for writing to Ws2801 led device.
///
class LedDeviceWs2801 : public LedSpiDevice
{
public:
2013-09-09 04:54:13 +02:00
///
/// Constructs specific LedDevice
2013-09-09 04:54:13 +02:00
///
/// @param deviceConfig json device config
2013-09-09 04:54:13 +02:00
///
LedDeviceWs2801(const Json::Value &deviceConfig);
/// constructs leddevice
static LedDevice* construct(const Json::Value &deviceConfig);
2013-09-09 04:54:13 +02:00
///
/// Writes the led color values to the led-device
///
/// @param ledValues The color-value per led
/// @return Zero on succes else negative
///
virtual int write(const std::vector<ColorRgb> &ledValues);
/// Switch the leds off
virtual int switchOff();
};