diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2014-10-20 01:26:41 +0400 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2014-10-20 01:26:41 +0400 |
commit | 4fe768688f421b42eff299782300348ddb465c6d (patch) | |
tree | afd01facc57c1c009a5377089cba1fdbb0e81e21 | |
parent | 5b2c7cfa635c264a8b8823535d7b916735dda5ef (diff) |
Change default order of APA102 RGB to BGR.
-rw-r--r-- | chipsets.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -129,7 +129,7 @@ class WS2803Controller : public WS2801Controller<DATA_PIN, CLOCK_PIN, RGB_ORDER, // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint8_t SPI_SPEED = DATA_RATE_MHZ(12)> +template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = BGR, uint8_t SPI_SPEED = DATA_RATE_MHZ(12)> class APA102Controller : public CLEDController { typedef SPIOutput<DATA_PIN, CLOCK_PIN, SPI_SPEED> SPI; SPI mSPI; @@ -137,8 +137,8 @@ class APA102Controller : public CLEDController { void startBoundary() { mSPI.writeWord(0); mSPI.writeWord(0); } void endBoundary() { /*mSPI.writeWord(0xFFFF); mSPI.writeWord(0xFFFF); */} - inline void writeLed(uint8_t r, uint8_t g, uint8_t b) __attribute__((always_inline)) { - mSPI.writeByte(0xFF); mSPI.writeByte(r); mSPI.writeByte(g); mSPI.writeByte(b); + 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); } public: |