Skip to content

Commit

Permalink
samples: led: consolidate LED samples under same directory
Browse files Browse the repository at this point in the history
With over a dozen LED samples, grouping them in a common drivers/led/
folder helps keep things tidy and lays the groundwork for further
improvements in the way samples are showing up in the docs.

Signed-off-by: Benjamin Cabé <[email protected]>
  • Loading branch information
kartben authored and carlescufi committed Sep 5, 2024
1 parent b9b166c commit 55d9d1c
Show file tree
Hide file tree
Showing 119 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,7 @@ Release Notes:
- drivers/led/
- include/zephyr/drivers/led/
- include/zephyr/drivers/led.h
- samples/drivers/led_*/
- samples/drivers/led/
- tests/drivers/led/
- doc/hardware/peripherals/led.rst
- tests/drivers/build_all/led/
Expand Down
4 changes: 2 additions & 2 deletions boards/bcdevices/plt_demo_v2/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ an external programmer. The programmer is attached to the SWD header.
Build the Zephyr kernel and the :zephyr:code-sample:`led-strip` sample application.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_apa102
:zephyr-app: samples/drivers/led/apa102
:board: blueclover_plt_demo_v2/nrf52832
:goals: build
:compact:

Flash the image.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_apa102
:zephyr-app: samples/drivers/led/apa102
:board: blueclover_plt_demo_v2/nrf52832
:goals: flash
:compact:
Expand Down
2 changes: 1 addition & 1 deletion boards/shields/adafruit_neopixel_grid_bff/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ LED Strip Example
Set ``--shield adafruit_neopixel_grid_bff`` when you invoke ``west build``. For example:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_strip
:zephyr-app: samples/drivers/led/led_strip
:board: adafruit_qt_py_rp2040
:shield: adafruit_neopixel_grid_bff
:goals: build
Expand Down
2 changes: 1 addition & 1 deletion boards/shields/adafruit_pca9685/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Set ``--shield adafruit_pca9685`` when you invoke ``west build``.
For example:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_pwm
:zephyr-app: samples/drivers/led/pwm
:board: nrf52840dk/nrf52840
:shield: adafruit_pca9685
:goals: build
Expand Down
2 changes: 1 addition & 1 deletion boards/vcc-gnd/yd_esp32/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ The board contains an addressable RGB LED (`XL-5050RGBC-WS2812B`_), driven by GP
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_strip
:zephyr-app: samples/drivers/led/led_strip
:board: yd_esp32/esp32/procpu
:goals: flash

Expand Down
12 changes: 12 additions & 0 deletions doc/_scripts/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,20 @@
('samples/drivers/adc/README', 'samples/drivers/adc/adc_dt/README'),
('samples/drivers/kscan_touch', 'samples/subsys/input/input'),
('samples/drivers/led_apa102/README', 'samples/drivers/led_strip/README'),
('samples/drivers/led_is31fl3194/README', 'samples/drivers/led/is31fl3194/README'),
('samples/drivers/led_is31fl3216a/README', 'samples/drivers/led/is31fl3216a/README'),
('samples/drivers/led_is31fl3733/README', 'samples/drivers/led/is31fl3733/README'),
('samples/drivers/led_lp3943/README', 'samples/drivers/led/lp3943/README'),
('samples/drivers/led_lp50xx/README', 'samples/drivers/led/lp50xx/README'),
('samples/drivers/led_lp5562/README', 'samples/drivers/led/lp5562/README'),
('samples/drivers/led_lp5569/README', 'samples/drivers/led/lp5569/README'),
('samples/drivers/led_lpd8806/README', 'samples/drivers/led_strip/README'),
('samples/drivers/led_pca9633/README', 'samples/drivers/led/pca9633/README'),
('samples/drivers/led_pwm/README', 'samples/drivers/led/pwm/README'),
('samples/drivers/led_strip/README', 'samples/drivers/led/led_strip/README'),
('samples/drivers/led_sx1509b_intensity/README', 'samples/drivers/led/sx1509b_intensity/README'),
('samples/drivers/led_ws2812/README', 'samples/drivers/led_strip/README'),
('samples/drivers/led_xec/README', 'samples/drivers/led/xec/README'),
('samples/net/cloud/google_iot_mqtt/README', 'samples/net/net'),
('samples/sensor/wsen_hids/README', 'samples/sensor/sensor'),
('samples/sensor/wsen_itds/README', 'samples/sensor/sensor'),
Expand Down
2 changes: 2 additions & 0 deletions doc/releases/release-notes-4.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ Drivers and Sensors

* lp5569: added ``enable-gpios`` property to describe the EN/PWM GPIO of the lp5569.

* LED code samples have been consolidated under the :zephyr_file:`samples/drivers/led` directory.

* LED Strip

* LoRa
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:name: LED strip
:relevant-api: led_strip_interface

Control an LED strip example.
Control an LED strip.

Overview
********
Expand Down Expand Up @@ -68,7 +68,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_strip
:zephyr-app: samples/drivers/led/led_strip
:board: <board>
:goals: flash
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Build the application for the :ref:`96b_neonkey` board, which has an
LP3943 driver included.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_lp3943
:zephyr-app: samples/drivers/led/lp3943
:board: 96b_neonkey
:goals: build
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Build the application for the :ref:`nrf52840dk_nrf52840` board, and connect
a LP5562 LED driver on the bus I2C0 at the address 0x30.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_lp5562
:zephyr-app: samples/drivers/led/lp5562
:board: nrf52840dk/nrf52840
:goals: build
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Build the application for the :ref:`nrf52840dk_nrf52840` board, and connect
a LP5569 LED controller on the bus I2C0 at the address 0x32.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_lp5569
:zephyr-app: samples/drivers/led/lp5569
:board: nrf52840dk/nrf52840
:goals: build
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Build the application for the :ref:`nucleo_f334r8_board` board, and connect
a PCA9633 LED driver on the bus I2C Arduino.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_pca9633
:zephyr-app: samples/drivers/led/pca9633
:board: nucleo_f334r8_board
:goals: build
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Building and Running
********************

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_sx1509b_intensity
:zephyr-app: samples/drivers/led/sx1509b_intensity
:board: thingy52/nrf52832
:goals: build flash
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 55d9d1c

Please sign in to comment.