Added "invert" and "spimode" options to ws2801, ws2812spi and sk6812spi devices (#172)

* Added "invert" and "spimode" options to ws2801, ws2812spi and sk6812spi devices

* fixed test/TestSpi.cpp

* some coding style wish
This commit is contained in:
penfold42
2016-08-14 03:54:08 +10:00
committed by redPanther
parent 9c27db390d
commit 5a902add81
10 changed files with 61 additions and 29 deletions

View File

@@ -11,9 +11,10 @@
// hyperion local includes
#include "LedDeviceWs2801.h"
LedDeviceWs2801::LedDeviceWs2801(const std::string& outputDevice, const unsigned baudrate, const unsigned latchTime) :
LedSpiDevice(outputDevice, baudrate, latchTime),
mLedCount(0)
LedDeviceWs2801::LedDeviceWs2801(const std::string& outputDevice, const unsigned baudrate, const unsigned latchTime,
const int spiMode, const bool spiDataInvert)
: LedSpiDevice(outputDevice, baudrate, latchTime, spiMode, spiDataInvert)
, mLedCount(0)
{
// empty
}