33 lines
632 B
Plaintext
33 lines
632 B
Plaintext
/*
|
|
* Copyright (c) 2021, STMicroelectronics
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <zephyr/dt-bindings/led/led.h>
|
|
|
|
&arduino_spi {
|
|
led_strip: ws2812@0 {
|
|
compatible = "worldsemi,ws2812-spi";
|
|
|
|
/* SPI */
|
|
reg = <0>; /* ignored, but necessary for SPI bindings */
|
|
spi-max-frequency = <4000000>;
|
|
frame-format = <32768>; /* SPI_FRAME_FORMAT_TI */
|
|
|
|
/* WS2812 */
|
|
chain-length = <16>; /* arbitrary; change at will */
|
|
spi-one-frame = <0x70>;
|
|
spi-zero-frame = <0x40>;
|
|
color-mapping = <LED_COLOR_ID_GREEN
|
|
LED_COLOR_ID_RED
|
|
LED_COLOR_ID_BLUE>;
|
|
};
|
|
};
|
|
|
|
/ {
|
|
aliases {
|
|
led-strip = &led_strip;
|
|
};
|
|
};
|