fix(underglow): Add newly required color-mapping prop.
This commit is contained in:
parent
8afe124153
commit
bf2fc68070
24 changed files with 133 additions and 15 deletions
|
|
@ -67,6 +67,8 @@ To identify which pin number you need to put in the config you need do to a bit
|
|||
Here's an example on a definition that uses P0.06:
|
||||
|
||||
```
|
||||
#include <dt-bindings/led/led.h>
|
||||
|
||||
&spi1 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
status = "okay";
|
||||
|
|
@ -87,6 +89,9 @@ Here's an example on a definition that uses P0.06:
|
|||
chain-length = <10>; /* number of LEDs */
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
color-mapping = <LED_COLOR_ID_GREEN
|
||||
LED_COLOR_ID_RED
|
||||
LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
|
@ -98,6 +103,13 @@ Ignoring these restrictions may result in poor wireless performance. You can fin
|
|||
|
||||
:::
|
||||
|
||||
:::note
|
||||
|
||||
Standard WS2812 LEDs use a wire protocol where the bits for the colors green, red, and blue values are sent in that order.
|
||||
If your board/shield uses LEDs that require the data sent in a different order, the `color-mapping` property ordering should be changed to match.
|
||||
|
||||
:::
|
||||
|
||||
### Other boards
|
||||
|
||||
For other boards, you must select an SPI definition that has the `MOSI` pin as your data pin going to your LED strip.
|
||||
|
|
@ -105,6 +117,8 @@ For other boards, you must select an SPI definition that has the `MOSI` pin as y
|
|||
Here's another example for a non-nRF52 board on `spi1`:
|
||||
|
||||
```
|
||||
#include <dt-bindings/led/led.h>
|
||||
|
||||
&spi1 {
|
||||
|
||||
led_strip: ws2812@0 {
|
||||
|
|
@ -119,6 +133,9 @@ Here's another example for a non-nRF52 board on `spi1`:
|
|||
chain-length = <10>; /* number of LEDs */
|
||||
spi-one-frame = <0x70>; /* make sure to configure this properly for your SOC */
|
||||
spi-zero-frame = <0x40>; /* make sure to configure this properly for your SOC */
|
||||
color-mapping = <LED_COLOR_ID_GREEN
|
||||
LED_COLOR_ID_RED
|
||||
LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue