samples: drivers: led_strip: Remove length Kconfig

The chain-length DTS property is now mandatory, so remove the
optional Kconfig for setting the length

Signed-off-by: Jamie McCrae <spam@helper3000.net>
This commit is contained in:
Jamie McCrae 2024-04-24 20:49:28 +01:00 committed by Henrik Brix Andersen
parent e911435d90
commit 92145a22d3
8 changed files with 1 additions and 20 deletions

View file

@ -9,14 +9,6 @@ config SAMPLE_LED_UPDATE_DELAY
help
Delay between LED updates in ms.
config SAMPLE_LED_STRIP_LENGTH
int "LED strip length"
default 0
help
Number of LEDs in the strip.
If the value is zero, use the 'chain-length' property in
devicetree instead to determine LED numbers.
endmenu
source "Kconfig.zephyr"

View file

@ -65,9 +65,6 @@ Building and Running
The sample updates the LED strip periodically. The update frequency can be
modified by changing the :kconfig:option:`CONFIG_SAMPLE_LED_UPDATE_DELAY`.
If there is no chain-length property in the devicetree node, you need to set
the number of LEDs in the :kconfig:option:`CONFIG_SAMPLE_LED_STRIP_LENGTH` option.
Then build and flash the application:
.. zephyr-app-commands::

View file

@ -1,3 +1 @@
CONFIG_SPI_STM32_INTERRUPT=y
CONFIG_SAMPLE_LED_STRIP_LENGTH=1

View file

@ -1 +0,0 @@
CONFIG_SAMPLE_LED_STRIP_LENGTH=4

View file

@ -1 +0,0 @@
CONFIG_SAMPLE_LED_STRIP_LENGTH=1

View file

@ -1,3 +1,2 @@
# Enable LED 5V Regulator
CONFIG_REGULATOR=y
CONFIG_SAMPLE_LED_STRIP_LENGTH=4

View file

@ -1 +0,0 @@
CONFIG_SAMPLE_LED_STRIP_LENGTH=1

View file

@ -21,9 +21,7 @@ LOG_MODULE_REGISTER(main);
#define STRIP_NODE DT_ALIAS(led_strip)
#if CONFIG_SAMPLE_LED_STRIP_LENGTH != 0
#define STRIP_NUM_PIXELS CONFIG_SAMPLE_LED_STRIP_LENGTH
#elif DT_NODE_HAS_PROP(DT_ALIAS(led_strip), chain_length)
#if DT_NODE_HAS_PROP(DT_ALIAS(led_strip), chain_length)
#define STRIP_NUM_PIXELS DT_PROP(DT_ALIAS(led_strip), chain_length)
#else
#error Unable to determine length of LED strip