Skip to content

Commit 92145a2

Browse files
thedjnKhenrikbrixandersen
authored andcommitted
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>
1 parent e911435 commit 92145a2

File tree

8 files changed

+1
-20
lines changed

8 files changed

+1
-20
lines changed

samples/drivers/led_strip/Kconfig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ config SAMPLE_LED_UPDATE_DELAY
99
help
1010
Delay between LED updates in ms.
1111

12-
config SAMPLE_LED_STRIP_LENGTH
13-
int "LED strip length"
14-
default 0
15-
help
16-
Number of LEDs in the strip.
17-
If the value is zero, use the 'chain-length' property in
18-
devicetree instead to determine LED numbers.
19-
2012
endmenu
2113

2214
source "Kconfig.zephyr"

samples/drivers/led_strip/README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ Building and Running
6565
The sample updates the LED strip periodically. The update frequency can be
6666
modified by changing the :kconfig:option:`CONFIG_SAMPLE_LED_UPDATE_DELAY`.
6767

68-
If there is no chain-length property in the devicetree node, you need to set
69-
the number of LEDs in the :kconfig:option:`CONFIG_SAMPLE_LED_STRIP_LENGTH` option.
70-
7168
Then build and flash the application:
7269

7370
.. zephyr-app-commands::
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
CONFIG_SPI_STM32_INTERRUPT=y
2-
3-
CONFIG_SAMPLE_LED_STRIP_LENGTH=1

samples/drivers/led_strip/boards/adafruit_itsybitsy.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

samples/drivers/led_strip/boards/adafruit_trinket_m0.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# Enable LED 5V Regulator
22
CONFIG_REGULATOR=y
3-
CONFIG_SAMPLE_LED_STRIP_LENGTH=4

samples/drivers/led_strip/boards/nucleo_l432kc.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

samples/drivers/led_strip/src/main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ LOG_MODULE_REGISTER(main);
2121

2222
#define STRIP_NODE DT_ALIAS(led_strip)
2323

24-
#if CONFIG_SAMPLE_LED_STRIP_LENGTH != 0
25-
#define STRIP_NUM_PIXELS CONFIG_SAMPLE_LED_STRIP_LENGTH
26-
#elif DT_NODE_HAS_PROP(DT_ALIAS(led_strip), chain_length)
24+
#if DT_NODE_HAS_PROP(DT_ALIAS(led_strip), chain_length)
2725
#define STRIP_NUM_PIXELS DT_PROP(DT_ALIAS(led_strip), chain_length)
2826
#else
2927
#error Unable to determine length of LED strip

0 commit comments

Comments
 (0)