zephyr/samples/drivers/led_ws2812/boards/nucleo_l476rg.overlay

33 lines
593 B
Plaintext

/*
* Copyright (c) 2021, STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <dt-bindings/led/led.h>
&arduino_spi {
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* 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;
};
};