diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2016-04-21 20:02:12 +0300 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2016-04-21 20:02:12 +0300 |
commit | 149b5bdf2287b22162861425e4b1193281bca044 (patch) | |
tree | 5bd8851c275beddf173f356fbaa2ce49920c8f52 | |
parent | 4624cd902e41bcb17031e08b2d46c74ec68fcfb6 (diff) |
Write out black pixels for the end frame for apa102's
-rw-r--r-- | chipsets.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -160,7 +160,7 @@ class APA102Controller : public CPixelLEDController<RGB_ORDER> { SPI mSPI; void startBoundary() { mSPI.writeWord(0); mSPI.writeWord(0); } - void endBoundary(int nLeds) { int nBytes = (nLeds/32); do { mSPI.writeByte(0xFF); mSPI.writeByte(0xFF); mSPI.writeByte(0xFF); mSPI.writeByte(0xFF); } while(nBytes--); } + void endBoundary(int nLeds) { int nDWords = (nLeds/32); do { mSPI.writeByte(0xFF); mSPI.writeByte(0x00); mSPI.writeByte(0x00); mSPI.writeByte(0x00); } while(nDWords--); } inline void writeLed(uint8_t b0, uint8_t b1, uint8_t b2) __attribute__((always_inline)) { mSPI.writeByte(0xFF); mSPI.writeByte(b0); mSPI.writeByte(b1); mSPI.writeByte(b2); |