Browse Source

Documentation

pull/23585/head
fauxpark 1 week ago
parent
commit
5beb1e3083
1 changed files with 22 additions and 0 deletions
  1. +22
    -0
      docs/ws2812_driver.md

+ 22
- 0
docs/ws2812_driver.md View File

@ -33,6 +33,7 @@ Add the following to your `config.h`:
|`WS2812_T0H` |`350` |The length of a "0" bit's high phase in nanoseconds |
|`WS2812_TRST_US` |`280` |The length of the reset phase in microseconds |
|`WS2812_BYTE_ORDER`|`WS2812_BYTE_ORDER_GRB`|The byte order of the RGB data |
|`WS2812_RGBW` |*Not defined* |Enables RGBW support (except `i2c` driver) |
### Timing Adjustment :id=timing-adjustment
@ -58,6 +59,27 @@ Where the byte order may be one of:
|`RGB` |WS2812B-2020 |
|`BGR` |TM1812 |
### RGBW Support :id=rgbw-support
Rendering the color white with RGB LEDs is typically inconsistent due to inherent variations between each individual LED die. However, some WS2812 variants (such as SK6812RGBW) also possess a white LED along with the red, green, and blue channels, which allows for a more accurate white to be displayed.
QMK can automatically convert the RGB data to be sent to the LEDs to mix in the white channel:
```
w = min(r, g, b)
r -= w
g -= w
b -= w
```
Thus, an RGB triplet of `255,255,255` will simply turn on the white LED fully (`0,0,0,255`).
To enable RGBW conversion, add the following to your `config.h`:
```c
#define WS2812_RGBW
```
## Driver Configuration :id=driver-configuration
Driver selection can be configured in `rules.mk` as `WS2812_DRIVER`, or in `info.json` as `ws2812.driver`. Valid values are `bitbang` (default), `i2c`, `spi`, `pwm`, `vendor`, or `custom`. See below for information on individual drivers.


Loading…
Cancel
Save