Rename RGBW
define to WS2812_RGBW
(#23585)
This commit is contained in:
parent
8f8fffc174
commit
0ff53b2498
24 changed files with 68 additions and 44 deletions
|
@ -237,7 +237,7 @@ If you define these options you will enable the associated feature, which may in
|
|||
* units to step when in/decreasing saturation
|
||||
* `#define RGBLIGHT_VAL_STEP 12`
|
||||
* units to step when in/decreasing value (brightness)
|
||||
* `#define RGBW`
|
||||
* `#define WS2812_RGBW`
|
||||
* Enables RGBW LED support
|
||||
|
||||
## Mouse Key Options
|
||||
|
|
|
@ -6,7 +6,7 @@ QMK has the ability to control RGB LEDs attached to your keyboard. This is commo
|
|||
|
||||
Some keyboards come with RGB LEDs preinstalled. Others must have them installed after the fact. See the [Hardware Modification](#hardware-modification) section for information on adding RGB lighting to your keyboard.
|
||||
|
||||
Currently QMK supports the following addressable LEDs (however, the white LED in RGBW variants is not supported):
|
||||
Currently QMK supports the following addressable LEDs:
|
||||
|
||||
* WS2811, WS2812, WS2812B, WS2812C, etc.
|
||||
* SK6812, SK6812MINI, SK6805
|
||||
|
|
|
@ -588,9 +588,6 @@ Configures the [RGB Lighting](feature_rgblight.md) feature.
|
|||
* `max_brightness`
|
||||
* The maximum value which the HSV "V" component is scaled to, from 0 to 255.
|
||||
* Default: `255`
|
||||
* `rgbw`
|
||||
* Enable RGBW LEDs.
|
||||
* Default: `false`
|
||||
* `saturation_steps`
|
||||
* The number of saturation adjustment steps.
|
||||
* Default: `17`
|
||||
|
@ -855,3 +852,6 @@ Configures the [WS2812](ws2812_driver.md) driver.
|
|||
* `i2c_timeout`
|
||||
* The I²C timeout in milliseconds (`i2c` driver only).
|
||||
* Default: `100` (100 ms)
|
||||
* `rgbw`
|
||||
* Enable RGBW LEDs.
|
||||
* Default: `false`
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue