6699d4d4f9
Add driver that based on RPI-PICO's PIO feature for ws2812. This driver can handle WS2812 or compatible LED strips. The single PIO node can handle up to 4 strips. Any pins that can be configured for PIO can be used for strips. I verified the samples/driver/led_ws2812 sample working with WS2812(144 pcs) led strip using following patches. - samples/drivers/led_ws2812/boards/rpi_pico.overlay ``` / { aliases { led-strip = &ws2812; }; }; &pinctrl { ws2812_pio0_default: ws2812_pio0_default { ws2812 { pinmux = <PIO0_P21>; }; }; }; &pio0 { status = "okay"; pio-ws2812 { compatible = "worldsemi,ws2812-rpi_pico-pio"; status = "okay"; pinctrl-0 = <&ws2812_pio0_default>; pinctrl-names = "default"; bit-waveform = <3>, <3>, <4>; ws2812: ws2812 { status = "okay"; output-pin = <21>; chain-length = <144>; color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>; reset-delay = <280>; frequency = <800000>; }; }; }; ``` - samples/drivers/led_ws2812/boards/rpi_pico.conf ``` CONFIG_WS2812_STRIP_RPI_PICO_PIO=y ``` Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
12 lines
553 B
CMake
12 lines
553 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_library()
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_APA102_STRIP apa102.c)
|
|
zephyr_library_sources_ifdef(CONFIG_LPD880X_STRIP lpd880x.c)
|
|
zephyr_library_sources_ifdef(CONFIG_WS2812_STRIP_GPIO ws2812_gpio.c)
|
|
zephyr_library_sources_ifdef(CONFIG_WS2812_STRIP_SPI ws2812_spi.c)
|
|
zephyr_library_sources_ifdef(CONFIG_WS2812_STRIP_I2S ws2812_i2s.c)
|
|
zephyr_library_sources_ifdef(CONFIG_WS2812_STRIP_RPI_PICO_PIO ws2812_rpi_pico_pio.c)
|
|
zephyr_library_sources_ifdef(CONFIG_TLC5971_STRIP tlc5971.c)
|