samples: drivers: Rename led_ws2812 to led_strip

Rename it so that it can be used as a sample of various LED strips.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
TOKITA Hiroshi 2024-03-09 16:06:25 +09:00 committed by David Leach
commit 0929a8db37
28 changed files with 21 additions and 21 deletions

View file

@ -39,7 +39,7 @@ LED Strip Example
Set ``-DSHIELD=adafruit_neopixel_grid_bff`` when you invoke ``west build``. For example:
.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_ws2812
:zephyr-app: samples/drivers/led_strip
:board: adafruit_qt_py_rp2040
:shield: adafruit_neopixel_grid_bff
:goals: build

View file

@ -233,10 +233,10 @@ RGB LED
=======
The board contains an addressable RGB LED (`XL-5050RGBC-WS2812B`_), driven by GPIO16.
Here is an example of how to test it using the :zephyr:code-sample:`led-ws2812` application.
Here is an example of how to test it using the :zephyr:code-sample:`led-strip` application.
.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_ws2812
:zephyr-app: samples/drivers/led_strip
:board: yd_esp32/esp32/procpu
:goals: flash

View file

@ -3,7 +3,7 @@
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(led_ws2812)
project(led_strip)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

View file

@ -1,5 +1,5 @@
.. zephyr:code-sample:: led-ws2812
:name: WS2812 LED strip
.. zephyr:code-sample:: led-strip
:name: LED strip sample
:relevant-api: led_strip_interface
Control an LED strip using a WS2812 (or compatible) driver chip.
@ -41,14 +41,14 @@ Wiring on a thingy52
The thingy52 has integrated NMOS transistors, that can be used instead of a level shifter.
The I2S driver supports inverting the output to suit this scheme, using the ``out-active-low`` dts
property. See the overlay file
:zephyr_file:`samples/drivers/led_ws2812/boards/thingy52_nrf52832.overlay` for more detail.
:zephyr_file:`samples/drivers/led_strip/boards/thingy52_nrf52832.overlay` for more detail.
Building and Running
*********************
********************
.. _blog post on WS2812 timing: https://wp.josh.com/2014/05/13/ws2812-neopixels-are-not-so-finicky-once-you-get-to-know-them/
This sample's source directory is :zephyr_file:`samples/drivers/led_ws2812/`.
This sample's source directory is :zephyr_file:`samples/drivers/led_strip/`.
To make sure the sample is set up properly for building, you must:
@ -80,7 +80,7 @@ modified by changing the :kconfig:option:`CONFIG_SAMPLE_LED_UPDATE_DELAY`.
Then build and flash the application:
.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_ws2812
:zephyr-app: samples/drivers/led_strip
:board: <board>
:goals: flash
:compact:

View file

@ -0,0 +1,11 @@
sample:
description: Demonstration of the LED strip driver
name: LED strip sample
tests:
sample.drivers.led_strip:
tags: LED
filter: dt_alias_exists("led-strip")
harness_config:
fixture: fixture_led_strip
integration_platforms:
- mimxrt1050_evk

View file

@ -1,11 +0,0 @@
sample:
description: Demonstration of the WS2812 LED driver
name: WS2812 sample
tests:
sample.drivers.led.ws2812:
tags: LED
filter: dt_compat_enabled("worldsemi,ws2812-spi")
harness_config:
fixture: fixture_led_ws2812
integration_platforms:
- mimxrt1050_evk