Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Garcia <danielgarcia@gmail.com>2014-10-20 01:26:41 +0400
committerDaniel Garcia <danielgarcia@gmail.com>2014-10-20 01:26:41 +0400
commit4fe768688f421b42eff299782300348ddb465c6d (patch)
treeafd01facc57c1c009a5377089cba1fdbb0e81e21
parent5b2c7cfa635c264a8b8823535d7b916735dda5ef (diff)
Change default order of APA102 RGB to BGR.
-rw-r--r--chipsets.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/chipsets.h b/chipsets.h
index 7faf384e..5e15baa6 100644
--- a/chipsets.h
+++ b/chipsets.h
@@ -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: