forked from Makuna/NeoPixelBus
Add support for SK9822 (#344)
Adds support for the reset frame of the SK9822 LEDS - should have no impact on APA102 Co-authored-by: feindsender <feindsender@users.noreply.github.com>
This commit is contained in:
@@ -78,6 +78,7 @@ public:
|
|||||||
void Update(bool)
|
void Update(bool)
|
||||||
{
|
{
|
||||||
const uint8_t startFrame[4] = { 0x00 };
|
const uint8_t startFrame[4] = { 0x00 };
|
||||||
|
const uint8_t resetFrame[4] = { 0x00 };
|
||||||
|
|
||||||
_wire.beginTransaction();
|
_wire.beginTransaction();
|
||||||
|
|
||||||
@@ -87,11 +88,15 @@ public:
|
|||||||
// data
|
// data
|
||||||
_wire.transmitBytes(_data, _sizeData);
|
_wire.transmitBytes(_data, _sizeData);
|
||||||
|
|
||||||
|
// reset frame
|
||||||
|
_wire.transmitBytes(resetFrame, sizeof(resetFrame));
|
||||||
|
|
||||||
// end frame
|
// end frame
|
||||||
|
|
||||||
// one bit for every two pixels with no less than 1 byte
|
// one bit for every two pixels with no less than 1 byte
|
||||||
for (size_t endFrameByte = 0; endFrameByte < _sizeEndFrame; endFrameByte++)
|
for (size_t endFrameByte = 0; endFrameByte < _sizeEndFrame; endFrameByte++)
|
||||||
{
|
{
|
||||||
_wire.transmitByte(0xff);
|
_wire.transmitByte(0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
_wire.endTransaction();
|
_wire.endTransaction();
|
||||||
|
Reference in New Issue
Block a user