summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJosh Hinnebusch <joshhinnebusch@gmail.com>2020-12-06 01:15:48 -0500
committerGitHub <noreply@github.com>2020-12-06 17:15:48 +1100
commitc59f87a5d73a2d8a2085663ae329c4d7c75c83e3 (patch)
treeb1778e21ae0dd43261e79cbca5d2779a35b96627 /docs
parent08bf9f9e740a741d674585b5920e4c3a107825b9 (diff)
downloadqmk_firmware-c59f87a5d73a2d8a2085663ae329c4d7c75c83e3.tar.gz
qmk_firmware-c59f87a5d73a2d8a2085663ae329c4d7c75c83e3.zip
add definition WS2812_BYTE_ORDER to fix RGB LED issues (#10184)
* add define for WS2812B-2020 to fix RGB issues * update driver doc * add WS2812_BYTE_ORDER definition to correct RGB byte issues * add definition variable thing * update per PR request * update per PR reqs * update per PR request * inital changes * move defines to color.h and add rgbw incase * Update docs/ws2812_driver.md Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: hineybush <hineybushkeyboards@gmail.com> Co-authored-by: Xelus22 <preyas22@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/ws2812_driver.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md
index c1b96329e9..da5db01dbd 100644
--- a/docs/ws2812_driver.md
+++ b/docs/ws2812_driver.md
@@ -28,6 +28,17 @@ The default setting is 280 µs, which should work for most cases, but this can b
#define WS2812_TRST_US 80
```
+#### Byte Order
+
+Some variants of the WS2812 may have their color components in a different physical or logical order. For example, the WS2812B-2020 has physically swapped red and green LEDs, which causes the wrong color to be displayed, because the default order of the bytes sent over the wire is defined as GRB.
+In this case, you can change the byte order by defining `WS2812_BYTE_ORDER` as one of the following values:
+
+| Byte order | Known devices |
+|-----------------------------------|-------------------------------|
+| `WS2812_BYTE_ORDER_GRB` (default) | Most WS2812's, SK6812, SK6805 |
+| `WS2812_BYTE_ORDER_RGB` | WS2812B-2020 |
+
+
### Bitbang
Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk: