Add BGR byte order for WS2812 drivers (#11562)
* add byte order bgr for ws2812 * update docs for driver change * Update ws2812_driver.md * Update docs/ws2812_driver.md Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
parent
0bf0977c02
commit
3d70766327
5 changed files with 59 additions and 4 deletions
|
@ -97,6 +97,10 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
|
|||
sendByte(ledarray[i].r);
|
||||
sendByte(ledarray[i].g);
|
||||
sendByte(ledarray[i].b);
|
||||
#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_BGR)
|
||||
sendByte(ledarray[i].b);
|
||||
sendByte(ledarray[i].g);
|
||||
sendByte(ledarray[i].r);
|
||||
#endif
|
||||
|
||||
#ifdef RGBW
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue